Opened 4 years ago
Last modified 3 years ago
#27000 closed enhancement
Upgrade NumPy to 1.16 — at Version 8
Reported by: | thansen | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.7 |
Component: | packages: standard | Keywords: | upgrade, numpy |
Cc: | arojas, fbissey, slelievre, thansen, tmonteil | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #27020, #27058 | Stopgaps: |
Description (last modified by )
Numpy 1.16.0 was released on 2019-01-14.
- Release announcement
- Tarball: https://files.pythonhosted.org/packages/04/b6/d7faa70a3e3eac39f943cc6a6a64ce378259677de516bd899dd9eb8f9b32/numpy-1.16.0.zip
From the release announcement:
On behalf of the NumPy team I'm pleased to announce the release of NumPy 1.16.0. This is the last NumPy release to support Python 2.7 and will be maintained as a long term release with bug fixes until 2020. This release has seen a lot of refactoring and features many bug fixes, improved code organization, and better cross platform compatibility. Not all of these improvements will be visible to users, but they should help make maintenance easier going forward. Highlights are
- Experimental support for overriding numpy functions in downstream projects.
- The matmul function is now a ufunc and can be overridden using array_ufunc.
- Improved support for the ARM, POWER, and SPARC architectures.
- Improved support for AIX and PyPy.
- Improved interoperation with ctypes.
- Improved support for PEP 3118.
The supported Python versions are 2.7 and 3.5-3.7, support for 3.4 has been dropped. The wheels on PyPI are linked with OpenBLAS v0.3.4+, which should fix the known threading issues found in previous OpenBLAS versions. Downstream developers building this release should use Cython >= 0.29.2 and, if linking OpenBLAS, OpenBLAS > v0.3.4.
So this depends on the upgrade to OpenBlas? 0.3.5 (from 0.3.3) in #27020, and on the upgrade to Cython 0.29.2 in #27058.
Debian developers warn us that NumPy 1.16.0rc1 in Debian leads to some deprecation warnings:
DeprecationWarning: np.asscalar(a) is deprecated since NumPy v1.16, use a.item() instead
It would be nice if SageMath could update the package soon after the NumPy 1.16 release.
Change History (8)
comment:1 Changed 4 years ago by
- Cc fbissey added
comment:2 Changed 3 years ago by
- Cc tmonteil added
comment:3 Changed 3 years ago by
- Cc arojas slelievre added
- Description modified (diff)
- Keywords upgrade numpy added
comment:4 Changed 3 years ago by
- Description modified (diff)
comment:5 Changed 3 years ago by
comment:6 Changed 3 years ago by
Upstream fix to matplotlib: https://github.com/matplotlib/matplotlib/pull/12478
comment:7 Changed 3 years ago by
I'm getting this on Arch after updating to 1.16.0
sage -t /usr/lib/python2.7/site-packages/sage/misc/inline_fortran.py ********************************************************************** File "/usr/lib/python2.7/site-packages/sage/misc/inline_fortran.py", line 134, in sage.misc.inline_fortran._import_module_from_path._import_module_from_path_impl Failed example: fortran(code, globals()) Exception raised: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run self.compile_and_execute(example, compiler, test.globs) File "/usr/lib/python2.7/site-packages/sage/doctest/forker.py", line 1086, in compile_and_execute exec(compiled, globs) File "<doctest sage.misc.inline_fortran._import_module_from_path._import_module_from_path_impl[1]>", line 1, in <module> fortran(code, globals()) File "sage/misc/lazy_import.pyx", line 354, in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:3684) return self.get_object()(*args, **kwds) File "/usr/lib/python2.7/site-packages/sage/misc/inline_fortran.py", line 96, in __call__ return self.eval(*args, **kwds) File "/usr/lib/python2.7/site-packages/sage/misc/inline_fortran.py", line 191, in eval with open(log) as fobj: IOError: [Errno 2] No such file or directory: 'fortran_module.log' **********************************************************************
comment:8 Changed 3 years ago by
- Cc thansen added
- Dependencies set to #27020, #27058
- Description modified (diff)
- Type changed from defect to enhancement
Editing ticket description now that NumPy 1.16.0 is released.
The release announcement for NumPy 1.16.0 warns:
Downstream developers building this release should use Cython >= 0.29.2 and, if linking OpenBLAS, OpenBLAS > v0.3.4.
So this depends on the upgrade to OpenBLAS 0.3.5 (from 0.3.3) in #27020, and on the upgrade to Cython 0.29.2 in #27058.
It seems most, if not all of these
DeprecationWarning
s are actually coming via matplotlib. I don't even see any explictnp.asscalar()
calls in the Sage sources.