Ticket #11273: trac_11273-rebase-part2.patch

File trac_11273-rebase-part2.patch, 3.5 KB (added by kcrisman, 9 years ago)

Rebased to 5.1.beta0

  • sage/calculus/riemann.pyx

    # HG changeset patch
    # User Ethan Van Andel <evlutte@gmail.com>
    # Date 1304017020 14400
    # Node ID 989218fcbf4bf1eaf96ff4246ebefb038b7a3fae
    # Parent  6228ec030e8af40aae61c4bc545f8b257a95ac6d
    reset the precision of the Riemann doctests
    
    diff --git a/sage/calculus/riemann.pyx b/sage/calculus/riemann.pyx
    a b  
    391391
    392392            sage: s = spline(points)
    393393            sage: s(3*pi / 4)
    394             0.00121587378429...
     394            0.0012158...
    395395            sage: plot(s,0,2*pi) # plot the kernel
    396396
    397397        The unit circle with a small hole::
     
    464464
    465465            sage: s = spline(points)
    466466            sage: s(3*pi / 4)
    467             1.62766037996...
     467            1.627660...
    468468
    469469        The unit circle with a small hole::
    470470
     
    569569            sage: fprime(t) = I*e^(I*t) + 0.5*I*e^(-I*t)
    570570            sage: m = Riemann_Map([f], [fprime], 0)
    571571            sage: m.riemann_map(0.25 + sqrt(-0.5))
    572             (0.137514...+0.87669602...j)
     572            (0.137514...+0.876696...j)
    573573            sage: m.riemann_map(1.3*I)
    574574            (-1.56...e-05+0.989694...j)
    575575            sage: I = CDF.gen()
    576576            sage: m.riemann_map(0.4)
    577             (0.733242677...+3.2...e-06j)
     577            (0.73324...+3.2...e-06j)
    578578            sage: import numpy as np
    579579            sage: m.riemann_map(np.complex(-3, 0.0001))
    580580            (1.405757...e-05+8.06...e-10j)
     
    655655            sage: fprime(t) = I*e^(I*t) + 0.5*I*e^(-I*t)
    656656            sage: m = Riemann_Map([f], [fprime], 0)
    657657            sage: m.inverse_riemann_map(0.5 + sqrt(-0.5))
    658             (0.406880548363...+0.361470279816...j)
     658            (0.406880...+0.3614702...j)
    659659            sage: m.inverse_riemann_map(0.95)
    660             (0.486319431795...-4.90019052...j)
     660            (0.486319...-4.90019052...j)
    661661            sage: m.inverse_riemann_map(0.25 - 0.3*I)
    662             (0.165324498558...-0.180936785500...j)
     662            (0.1653244...-0.180936...j)
    663663            sage: import numpy as np
    664664            sage: m.inverse_riemann_map(np.complex(-0.2, 0.5))
    665             (-0.156280570579...+0.321819151891...j)
     665            (-0.156280...+0.321819...j)
    666666        """
    667667        if self.exterior:
    668668            pt = 1/pt
     
    10571057    dtheta = np.divide(dr,zabs)
    10581058    return dr, dtheta
    10591059
    1060 -cdef inline double mag_to_lightness(double r):
    1061 -    Tweak this to adjust how the magnitude affects the color.
    1062 -    Note this method is customized for riemann plots, the
    1063 -    magnitude loops rather than fading to black.
    1064 
    1065      INPUT:
    1066 
    1067 -    - ``r`` -- a non-negative real number.
    1068 
    1069      OUTPUT:
    1070  
    1071 -    A value between `-1` (black) and `+1` (white), inclusive.
    1072 
    1073 -    EXAMPLES:
    1074 
    1075  
    1076 -    This tests it implicitly::
    1077 -
    1078 -        sage: from sage.calculus.riemann import complex_to_rgb
    1079 -        sage: import numpy
    1080 -        sage: complex_to_rgb(numpy.array([[0, 1, 1000]],dtype = numpy.complex128))
    1081 -        array([[[   1.,    1.,    1.],
    1082 -                [   1.,    0.,    0.],
    1083 -                [-998.,    0.,    0.]]])
    1084      """
    1085 -    return 1 - r
    1086 -
    1087 -cpdef complex_to_rgb(np.ndarray z_values):
    1088 -    r"""
    1089 -    Convert from an array of complex numbers to its corresponding matrix of
    1090 
    10911060cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2]z_values, np.ndarray[FLOAT_T, ndim = 2] dr, np.ndarray[FLOAT_T, ndim = 2] dtheta, spokes, circles, rgbcolor, thickness, withcolor):
    10921061    """
    10931062    Converts a grid of complex numbers into a matrix containing rgb data