Ticket #8825: trac_8825_norm_docstring.patch

File trac_8825_norm_docstring.patch, 885 bytes (added by johan, 12 years ago)

Patch

  • sage/misc/functional.py

    # HG changeset patch
    # User Johan Grönqvist <johan.gronqvist@gmail.com>
    # Date 1272570845 -7200
    # Node ID 4288ffc0537a779495d904564b751cd19bcb8ba4
    # Parent  e5264d202a8568007c5571b2ecf2658a4bf325fd
    Trac 8825: Improve documentation of "norm".
    
    diff -r e5264d202a85 -r 4288ffc0537a sage/misc/functional.py
    a b  
    10611061def norm(x):
    10621062    """
    10631063    Returns the norm of x.
    1064    
     1064
     1065    For matrices and vectors, this returns the L2-norm.
     1066    For complex numbers, it returns the field norm.
     1067       
    10651068    EXAMPLES::
    10661069   
    10671070        sage: z = 1+2*I
    10681071        sage: norm(z)
    10691072        5
     1073        sage: norm(vector([z]))
     1074        sqrt(5)
     1075        sage: norm(matrix([[z]]))
     1076        2.2360679775
    10701077        sage: norm(CDF(z))
    10711078        5.0
    10721079        sage: norm(CC(z))