diff --git a/doc/source/numpy_2_0_migration_guide.rst b/doc/source/numpy_2_0_migration_guide.rst index 5772298b5662..ae7eb29fb402 100644 --- a/doc/source/numpy_2_0_migration_guide.rst +++ b/doc/source/numpy_2_0_migration_guide.rst @@ -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().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 diff --git a/numpy/_expired_attrs_2_0.py b/numpy/_expired_attrs_2_0.py index cb0f2d8c8cff..1dad38c5a60f 100644 --- a/numpy/_expired_attrs_2_0.py +++ b/numpy/_expired_attrs_2_0.py @@ -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 "