Ticket #11028: trac_11028-reviewer.patch

File trac_11028-reviewer.patch, 1.8 KB (added by kcrisman, 10 years ago)
  • sage/calculus/riemann.pyx

    # HG changeset patch
    # User Karl-Dieter Crisman <kcrisman@gmail.com>
    # Date 1337964775 14400
    # Node ID a1b7737b00612237f0b721157e3a68c3253a774b
    # Parent  478f75faf11f9b3c40204913b73057558c8f884d
    Trac 11028 - documentation fixes, added test for input error message
    
    diff --git a/sage/calculus/riemann.pyx b/sage/calculus/riemann.pyx
    a b  
    105105    EXAMPLES:
    106106
    107107    The unit circle identity map::
     108
    108109        sage: f(t) = e^(I*t)
    109110        sage: fprime(t) = I*e^(I*t)
    110111        sage: m = Riemann_Map([f], [fprime], 0)  # long time (4 sec)
     
    802803
    803804        Plot zoomed in on a specific spot::
    804805
    805             sage: m.plot_colored(plot_range=[-1,1,2,3])
     806            sage: m.plot_colored(plot_range=[0,1,.25,.75])
    806807
    807808        High resolution plot::
    808809
     
    899900    return 1 - r
    900901
    901902cpdef complex_to_rgb(np.ndarray z_values):
    902     """
    903     Convert from an array of complex numbers to its corresponding matrix of
    904     RGB values.
     903    r"""
     904    Convert from a (Numpy) array of complex numbers to its corresponding
     905    matrix of RGB values.  For internal use of :meth:`~Riemann_Map.plot_colored`
     906    only.
    905907
    906908    INPUT:
    907909
    908     - ``z_values`` -- A grid of complex numbers, as a list of lists.
     910    - ``z_values`` -- A Numpy array of complex numbers.
    909911
    910912    OUTPUT:
    911913
     
    924926        array([[[  1.00000000e+00,   1.00000000e+00,   1.00000000e+00],
    925927                [  5.00000000e-01,   1.00000000e+00,   0.00000000e+00],
    926928                [ -4.99000000e+02,  -9.98000000e+02,   0.00000000e+00]]])
     929
     930    TESTS::
     931
     932        sage: complex_to_rgb([[0, 1, 10]])
     933        Traceback (most recent call last):
     934        ...
     935        TypeError: Argument 'z_values' has incorrect type (expected numpy.ndarray, got list)
    927936    """
    928937    cdef unsigned int i, j, imax, jmax
    929938    cdef double x, y, mag, arg