Summary
This is a tracking issue for all of the things that (will) need to change for numpy 2.0
xref numpy/numpy#24306
Edit 2023-08-03: Updated to list according to numpy/numpy#24306 (comment)
- Note that almost all (aside from
NaN and Inf fall into the "tentative" category, which is to say possibly removed, but not fully decided.
Edit 2023-08-31: Updated to list according to most recent numpy list
Proposed fix
List of functions affected
Most of the changes are relatively simple namespace swaps... but if we wish to be backwards compatible, may require some finagling in the interim
Some of these we may wish to advocate with numpy to keep, particularly some of the things we use that numpy would say "use scipy" for, as I don't think we are prepared to take on scipy as a dependency.
Some of them (e.g. hanning/blackman window functions) it may be better to just vendor or deprecate mlab functions/change examples to avoid using them (we already vendor GaussianKDE...)
Removed from top level, kept/moved to np.linalg
-
np.cross
- used in proj3d.py, art3d.py
-
np.inner
-
np.outer
-
np.transpose
- used in several places, often with list inputs
Removed from top level, moved to np.dtypes
-
np.iscomplexobj
-
np.isreal
- used in cbook.py, bezier.py, test_mlab.py
-
np.isscalar
- used in _axes.py, cbook.py, figure.py
-
np.issubdtype
- used in several places, usually in conjuction with other things that are moving
-
np.min_scalar_type
-
np.promote_types
- used in stackplot.py, colors.py
Removed from top level, moved to np.rec
Removed from top level, kept in np.index_tricks
-
np.c_
- used in angle_annotation example only
-
np.r_
- used in test_agg.py and demo_agg_filter.py (example)
Removed in favor of alias/similar func
Fully removed (?)
-
np.isfortran
- used in test_triangulation.py
-
np.putmask
- used in colors.py
- may be replaced by
a[mask]=b[mask], but doesn't do repeating behavior, so would have to verif
- comment supports the idea that a simple replacement is possible
-
np.s_
- used in cbook, 3dplot example
Possibly renamed, but not settled
np.ix_
- used in _triinterpolate.py, test_image.py
Summary
This is a tracking issue for all of the things that (will) need to change for numpy 2.0
xref numpy/numpy#24306
Edit 2023-08-03: Updated to list according to numpy/numpy#24306 (comment)
NaNandInffall into the "tentative" category, which is to say possibly removed, but not fully decided.Edit 2023-08-31: Updated to list according to most recent numpy list
Proposed fix
List of functions affected
Most of the changes are relatively simple namespace swaps... but if we wish to be backwards compatible, may require some finagling in the interim
Some of these we may wish to advocate with numpy to keep, particularly some of the things we use that numpy would say "use scipy" for, as I don't think we are prepared to take on scipy as a dependency.
Some of them (e.g. hanning/blackman window functions) it may be better to just vendor or deprecate mlab functions/change examples to avoid using them (we already vendor GaussianKDE...)
Removed from top level, kept/moved to np.linalgnp.crossnp.innernp.outernp.transposeRemoved from top level, moved to np.dtypesnp.iscomplexobjnp.isrealnp.isscalarnp.issubdtypenp.min_scalar_typenp.promote_typesRemoved from top level, moved to np.rec
np.recarrayMAINT: Reflect changes fromnumpynamespace refactor Part 5 #26664Removed from top level, kept in np.index_tricksnp.c_np.r_Removed in favor of alias/similar func
np.Inf(almost certain to be removed, trivial to replace) Remove soon to be deprecated nan/inf aliases #26458np.infnp.NaN(almost certain to be removed, trivial to replace) Remove soon to be deprecated nan/inf aliases #26458np.nannp.array_splitnp.splitnp.in1DMAINT: Numpy 2.0 deprecations for row_stack and in1d #26566np.isinnp.nanmin/maxnp.max(..., nan='ignore')or similar instead of separate, parallel funcsnp.polyfit/polyvalnp.polynomial.Polynomial.fitnp.rootsnp.rowstackMAINT: Numpy 2.0 deprecations for row_stack and in1d #26566np.vstackFully removed (?)np.isfortrannp.putmaska[mask]=b[mask], but doesn't do repeating behavior, so would have to verifnp.s_Possibly renamed, but not settlednp.ix_