#17642: Update numpy
-------------------------------------+-------------------------------------
       Reporter:  jpflori            |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.8
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  François Bissey    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  5e622125bbfa8097f8537b523f857203e8b68c6b
  u/jdemeyer/numpy-1.9               |     Stopgaps:
   Dependencies:  #17618, #18142     |
-------------------------------------+-------------------------------------
Changes (by fbissey):

 * commit:  7fb70fc804de38796465837977af64cf301e77fb =>
     5e622125bbfa8097f8537b523f857203e8b68c6b


Comment:

 Thanks for the rebasing Jeroen. Just commenting
 {{{
     if dtype is None:
         dtype = result_type(start, stop, float(num))
 }}}
 in the `linspace` code in `numpy/core/function_base.py` resolve a lot of
 doctests failures related to plotting like
 `sage/geometry/riemannian_manifolds/parametrized_surface3d.py` noted in a
 previous comment. It seems `result_type` doesn't do coercion very well and
 is probably behind some othe doctest failing, most of them with a warning
 but the following ones clearly tell us something is wrong with coercion
 {{{
 sage -t --long /usr/lib64/python2.7/site-
 packages/sage/structure/coerce.pyx
 **********************************************************************
 File "/usr/lib64/python2.7/site-packages/sage/structure/coerce.pyx", line
 309, in sage.structure.coerce.CoercionModel_cache_maps
 Failed example:
     numpy.float32('1.5') * x
 Exception raised:
     Traceback (most recent call last):
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 496, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 858, in compile_and_execute
         exec(compiled, globs)
       File "<doctest sage.structure.coerce.CoercionModel_cache_maps[9]>",
 line 1, in <module>
         numpy.float32('1.5') * x
     ValueError: setting an array element with a sequence.
 }}}

 {{{
 sage -t --long /usr/lib64/python2.7/site-
 packages/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx
 too many failed tests, not using stored timings
 Running doctests with ID 2015-07-16-14-04-50-52700f7d.
 Using --optional=optional,sage
 Doctesting 1 file.
 sage -t --long /usr/lib64/python2.7/site-
 packages/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx
 **********************************************************************
 File "/usr/lib64/python2.7/site-
 packages/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx", line 13,
 in sage.rings.polynomial.polynomial_real_mpfr_dense
 Failed example:
     numpy.int32('1') * x
 Exception raised:
     Traceback (most recent call last):
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 496, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 858, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 sage.rings.polynomial.polynomial_real_mpfr_dense[3]>", line 1, in <module>
         numpy.int32('1') * x
     ValueError: setting an array element with a sequence.
 **********************************************************************
 File "/usr/lib64/python2.7/site-
 packages/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx", line 17,
 in sage.rings.polynomial.polynomial_real_mpfr_dense
 Failed example:
     numpy.int64('1') * x
 Exception raised:
     Traceback (most recent call last):
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 496, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 858, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 sage.rings.polynomial.polynomial_real_mpfr_dense[5]>", line 1, in <module>
         numpy.int64('1') * x
     ValueError: setting an array element with a sequence.
 **********************************************************************
 File "/usr/lib64/python2.7/site-
 packages/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx", line 21,
 in sage.rings.polynomial.polynomial_real_mpfr_dense
 Failed example:
     numpy.float32('1.5') * x
 Exception raised:
     Traceback (most recent call last):
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 496, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py",
 line 858, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 sage.rings.polynomial.polynomial_real_mpfr_dense[7]>", line 1, in <module>
         numpy.float32('1.5') * x
     ValueError: setting an array element with a sequence.
 **********************************************************************
 }}}

 So I will raise this upstream where I think the problem lies as it was the
 case when we tried to upgrade to numpy 1.6.
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=0ffb140f76fa37ffaad6ab23b2ea5464327e59b8
 0ffb140]||{{{Merge tag '6.8.beta8' into t/17642/numpy-1.9}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=5e622125bbfa8097f8537b523f857203e8b68c6b
 5e62212]||{{{Fix patch loop}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/17642#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to