# 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


391  391  
392  392  sage: s = spline(points) 
393  393  sage: s(3*pi / 4) 
394   0.00121587378429... 
 394  0.0012158... 
395  395  sage: plot(s,0,2*pi) # plot the kernel 
396  396  
397  397  The unit circle with a small hole:: 
… 
… 

464  464  
465  465  sage: s = spline(points) 
466  466  sage: s(3*pi / 4) 
467   1.62766037996... 
 467  1.627660... 
468  468  
469  469  The unit circle with a small hole:: 
470  470  
… 
… 

569  569  sage: fprime(t) = I*e^(I*t) + 0.5*I*e^(I*t) 
570  570  sage: m = Riemann_Map([f], [fprime], 0) 
571  571  sage: m.riemann_map(0.25 + sqrt(0.5)) 
572   (0.137514...+0.87669602...j) 
 572  (0.137514...+0.876696...j) 
573  573  sage: m.riemann_map(1.3*I) 
574  574  (1.56...e05+0.989694...j) 
575  575  sage: I = CDF.gen() 
576  576  sage: m.riemann_map(0.4) 
577   (0.733242677...+3.2...e06j) 
 577  (0.73324...+3.2...e06j) 
578  578  sage: import numpy as np 
579  579  sage: m.riemann_map(np.complex(3, 0.0001)) 
580  580  (1.405757...e05+8.06...e10j) 
… 
… 

655  655  sage: fprime(t) = I*e^(I*t) + 0.5*I*e^(I*t) 
656  656  sage: m = Riemann_Map([f], [fprime], 0) 
657  657  sage: m.inverse_riemann_map(0.5 + sqrt(0.5)) 
658   (0.406880548363...+0.361470279816...j) 
 658  (0.406880...+0.3614702...j) 
659  659  sage: m.inverse_riemann_map(0.95) 
660   (0.486319431795...4.90019052...j) 
 660  (0.486319...4.90019052...j) 
661  661  sage: m.inverse_riemann_map(0.25  0.3*I) 
662   (0.165324498558...0.180936785500...j) 
 662  (0.1653244...0.180936...j) 
663  663  sage: import numpy as np 
664  664  sage: m.inverse_riemann_map(np.complex(0.2, 0.5)) 
665   (0.156280570579...+0.321819151891...j) 
 665  (0.156280...+0.321819...j) 
666  666  """ 
667  667  if self.exterior: 
668  668  pt = 1/pt 
… 
… 

1057  1057  dtheta = np.divide(dr,zabs) 
1058  1058  return dr, dtheta 
1059  1059  
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 nonnegative 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   
1091  1060  cpdef 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): 
1092  1061  """ 
1093  1062  Converts a grid of complex numbers into a matrix containing rgb data 