Ticket #3390: numpy-1.1.patch

File numpy-1.1.patch, 3.8 kB (added by jason, 5 months ago)
  • a/sage/calculus/calculus.py

    old new  
    31223122            sage: f.find_maximum_on_interval(0,5) 
    31233123            (0.5610963381910451, 0.8603335890...) 
    31243124            sage: f.find_maximum_on_interval(0,5, tol=0.1, maxfun=10) 
    3125             (0.561090323458081..., 0.857926501456
     3125            (0.561090323458081..., 0.857926501456...
    31263126        """ 
    31273127        minval, x = (-self).find_minimum_on_interval(a, b, var=var, tol=tol, maxfun=maxfun) 
    31283128        return -minval, x 
     
    31503150        EXAMPLES: 
    31513151            sage: f = x*cos(x) 
    31523152            sage: f.find_minimum_on_interval(1, 5) 
    3153             (-3.2883713955908962, 3.42561846957
     3153            (-3.2883713955908962, 3.4256184695...
    31543154            sage: f.find_minimum_on_interval(1, 5, tol=1e-3) 
    31553155            (-3.288371361890984, 3.42575079030572) 
    31563156            sage: f.find_minimum_on_interval(1, 5, tol=1e-2, maxfun=10) 
    3157             (-3.2883708459837844, 3.42508402203
     3157            (-3.2883708459837844, 3.4250840220...
    31583158            sage: show(f.plot(0, 20)) 
    31593159            sage: f.find_minimum_on_interval(1, 15) 
    3160             (-9.4772942594797929, 9.52933441095
     3160            (-9.4772942594797929, 9.5293344109...
    31613161 
    31623162        ALGORITHM: Uses \module{scipy.optimize.fminbound} which uses Brent's method. 
    31633163 
  • a/sage/matrix/matrix1.pyx

    old new  
    274274        Type \code{numpy.typecodes} for a list of the possible typecodes: 
    275275            sage: import numpy 
    276276            sage: numpy.typecodes 
    277             {'All': '?bhilqpBHILQPfdgFDGSUVO', 'AllInteger': 'bBhHiIlLqQpP', 'AllFloat': 'fdgFDG', 'UnsignedInteger': 'BHILQP', 'Float': 'fdg', 'Character': 'S1', 'Complex': 'FDG', 'Integer': 'bhilqp'} 
     277            {'All': '?bhilqpBHILQPfdgFDGSUVO', 'AllInteger': 'bBhHiIlLqQpP', 'AllFloat': 'fdgFDG', 'UnsignedInteger': 'BHILQP', 'Float': 'fdg', 'Character': 'c', 'Complex': 'FDG', 'Integer': 'bhilqp'} 
    278278        """ 
    279279        import numpy 
    280280        A = numpy.matrix(self.list(), dtype=dtype) 
  • a/sage/numerical/optimize.py

    old new  
    101101    EXAMPLES: 
    102102        sage: f = lambda x: x*cos(x) 
    103103        sage: find_maximum_on_interval(f, 0,5) 
    104         (0.561096338191, 0.8603335890...) 
     104        (0.561096338191..., 0.8603335890...) 
    105105        sage: find_maximum_on_interval(f, 0,5, tol=0.1, maxfun=10) 
    106         (0.561090323458, 0.857926501456
     106        (0.561090323458..., 0.857926501456...
    107107    """ 
    108108    def g(z): 
    109109        r""" 
     
    137137    EXAMPLES: 
    138138        sage: f = lambda x: x*cos(x) 
    139139        sage: find_minimum_on_interval(f, 1, 5) 
    140         (-3.28837139559, 3.42561846957
     140        (-3.28837139559..., 3.4256184695...
    141141        sage: find_minimum_on_interval(f, 1, 5, tol=1e-3) 
    142         (-3.28837136189098, 3.42575079030572
     142        (-3.28837136189098..., 3.42575079030572...
    143143        sage: find_minimum_on_interval(f, 1, 5, tol=1e-2, maxfun=10) 
    144         (-3.28837084598, 3.42508402203
     144        (-3.28837084598..., 3.4250840220...
    145145        sage: show(plot(f, 0, 20)) 
    146146        sage: find_minimum_on_interval(f, 1, 15) 
    147         (-9.47729425948, 9.52933441095
     147        (-9.4772942594..., 9.5293344109...
    148148 
    149149    ALGORITHM: Uses scipy.optimize.fminbound which uses Brent's method. 
    150150