np.geterrobj, np.seterrobj and the related ufunc keyword argument
extobj= have been removed. The preferred replacement for all of these
is using the context manager with np.errstate():.
(gh-23922)
np.cast has been removed. The literal replacement for
np.cast[dtype](arg) is np.asarray(arg, dtype=dtype).
np.source has been removed. The preferred replacement is
inspect.getsource.
np.lookfor has been removed.
(gh-24144)
numpy.who has been removed. As an alternative for the removed functionality, one
can use a variable explorer that is available in IDEs such as Spyder or Jupyter Notebook.
(gh-24321)
Warnings and exceptions present in numpy.exceptions (e.g,
ComplexWarning,
VisibleDeprecationWarning) are no longer exposed in the
main namespace.
Multiple niche enums, expired members and functions have been removed from
the main namespace, such as: ERR_*, SHIFT_*, np.fastCopyAndTranspose,
np.kernel_version, np.numarray, np.oldnumeric and np.set_numeric_ops.
(gh-24316)
Replaced from ... import * in the numpy/__init__.py with explicit imports.
As a result, these main namespace members got removed: np.FLOATING_POINT_SUPPORT,
np.FPE_*, np.NINF, np.PINF, np.NZERO, np.PZERO, np.CLIP,
np.WRAP, np.WRAP, , , ,
, , , ,
, , and
.
Alias np.float_ has been removed. Use np.float64 instead.
Alias np.complex_ has been removed. Use np.complex128 instead.
Alias np.longfloat has been removed. Use np.longdouble instead.
Alias np.singlecomplex has been removed. Use np.complex64 instead.
Alias np.cfloat has been removed. Use np.complex128 instead.
Alias np.longcomplex has been removed. Use np.clongdouble instead.
Alias np.clongfloat has been removed. Use np.clongdouble instead.
Alias np.string_ has been removed. Use np.bytes_ instead.
Alias np.unicode_ has been removed. Use np.str_ instead.
Alias np.Inf has been removed. Use np.inf instead.
Alias np.Infinity has been removed. Use np.inf instead.
Alias np.NaN has been removed. Use np.nan instead.
Alias np.infty has been removed. Use np.inf instead.
Alias np.mat has been removed. Use np.asmatrix instead.
np.issubclass_ has been removed. Use the issubclass builtin instead.
np.asfarray has been removed. Use np.asarray with a proper dtype instead.
np.set_string_function has been removed. Use np.set_printoptions
instead with a formatter for custom printing of NumPy objects.
np.tracemalloc_domain is now only available from np.lib.
np.recfromcsv and np.recfromtxt were removed from the main namespace.
Use np.genfromtxt with comma delimiter instead.
np.issctype, np.maximum_sctype, np.obj2sctype, np.sctype2char,
np.sctypes, np.issubsctype were all removed from the
main namespace without replacement, as they where niche members.
Deprecated np.deprecate and np.deprecate_with_doc has been removed
from the main namespace. Use DeprecationWarning instead.
Deprecated np.safe_eval has been removed from the main namespace.
Use ast.literal_eval instead.
(gh-24376)
np.find_common_type has been removed. Use numpy.promote_types or
numpy.result_type instead. To achieve semantics for the scalar_types
argument, use numpy.result_type and pass 0, 0.0, or 0j as a
Python scalar instead.
np.round_ has been removed. Use np.round instead.
np.nbytes has been removed. Use np.dtype(<dtype>).itemsize instead.
(gh-24477)
np.compare_chararrays has been removed from the main namespace.
Use np.char.compare_chararrays instead.
The charrarray in the main namespace has been deprecated. It can be imported
without a deprecation warning from np.char.chararray for now,
but we are planning to fully deprecate and remove chararray in the future.
np.format_parser has been removed from the main namespace.
Use np.rec.format_parser instead.
(gh-24587)
Support for seven data type string aliases has been removed from np.dtype:
int0, uint0, void0, object0, str0, bytes0 and bool8.
(gh-24807)
The experimental numpy.array_api submodule has been removed. Use the main
numpy namespace for regular usage instead, or the separate
array-api-strict package for the compliance testing use case for which
numpy.array_api was mostly used.
(gh-25911)