Skip to content

Commit

Permalink
DOC: Provide migration notes for scalar inspection functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsokol committed Nov 9, 2023
1 parent 29cbb1f commit 5a077d8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
14 changes: 8 additions & 6 deletions doc/source/numpy_2_0_migration_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,29 @@ geterrobj Use the np.errstate context manager instead.
Inf Use ``np.inf`` instead.
Infinity Use ``np.inf`` instead.
infty Use ``np.inf`` instead.
issctype
issctype Use ``issubclass(rep, np.generic)`` instead.
issubclass\_ Use ``issubclass`` builtin instead.
issubsctype Use ``np.issubdtype`` instead.
mat Use ``np.asmatrix`` instead.
maximum_sctype
maximum_sctype Use a specific dtype instead. You should avoid relying
on any implicit mechanism and select the largest dtype of
a kind explicitly in the code.
NaN Use ``np.nan`` instead.
nbytes Use ``np.dtype(<dtype>).itemsize`` instead.
NINF Use ``-np.inf`` instead.
NZERO Use ``-0.0`` instead.
longcomplex Use ``np.clongdouble`` instead.
longfloat Use ``np.longdouble`` instead.
longfloat Use ``np.longdouble`` instead.
lookfor Search NumPy's documentation directly.
obj2sctype
obj2sctype Use ``np.dtype(obj).type`` instead.
PINF Use ``np.inf`` instead.
PZERO Use ``0.0`` instead.
recfromcsv Use ``np.genfromtxt`` with comma delimiter instead.
recfromtxt Use ``np.genfromtxt`` instead.
round\_ Use ``np.round`` instead.
safe_eval Use ``ast.literal_eval`` instead.
sctype2char
sctypes
sctype2char Use ``np.dtype(obj).char`` instead.
sctypes Access dtypes explicitly instead.
seterrobj Use the np.errstate context manager instead.
set_numeric_ops For the general case, use ``PyUFunc_ReplaceLoopBySignature``.
For ndarray subclasses, define the ``__array_ufunc__`` method
Expand Down
13 changes: 8 additions & 5 deletions numpy/_expired_attrs_2_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@
"Infinity": "Use `np.inf` instead.",
"NaN": "Use `np.nan` instead.",
"infty": "Use `np.inf` instead.",
"issctype": "",
"maximum_sctype": "",
"obj2sctype": "",
"sctype2char": "",
"sctypes": "",
"issctype": "Use `issubclass(rep, np.generic)` instead.",
"maximum_sctype":
"Use a specific dtype instead. You should avoid relying "
"on any implicit mechanism and select the largest dtype of "
"a kind explicitly in the code.",
"obj2sctype": "Use `np.dtype(obj).type` instead.",
"sctype2char": "Use `np.dtype(obj).char` instead.",
"sctypes": "Access dtypes explicitly instead.",
"issubsctype": "Use `np.issubdtype` instead.",
"set_string_function":
"Use `np.set_printoptions` instead with a formatter for "
Expand Down

0 comments on commit 5a077d8

Please sign in to comment.