From 194927d5aa993f6b68248b24d374a29d26a261dd Mon Sep 17 00:00:00 2001 From: Joseph Fox-Rabinovitz Date: Wed, 27 Feb 2019 09:14:04 -0500 Subject: [PATCH] DOC: Added maximum_sctype to documentation --- doc/source/reference/routines.dtype.rst | 3 +-- numpy/core/numerictypes.py | 1 + numpy/tests/test_public_api.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/source/reference/routines.dtype.rst b/doc/source/reference/routines.dtype.rst index ec8d2981d6c8..e9189ca07737 100644 --- a/doc/source/reference/routines.dtype.rst +++ b/doc/source/reference/routines.dtype.rst @@ -17,11 +17,9 @@ Data type routines Creating data types ------------------- - .. autosummary:: :toctree: generated/ - dtype format_parser @@ -53,3 +51,4 @@ Miscellaneous typename sctype2char mintypecode + maximum_sctype diff --git a/numpy/core/numerictypes.py b/numpy/core/numerictypes.py index 5bc37b73aae6..70cc484b1f84 100644 --- a/numpy/core/numerictypes.py +++ b/numpy/core/numerictypes.py @@ -140,6 +140,7 @@ 'complex32', 'complex64', 'complex128', 'complex160', 'complex192', 'complex256', 'complex512', 'object'] +@set_module('numpy') def maximum_sctype(t): """ Return the scalar type of highest precision of the same kind as the input. diff --git a/numpy/tests/test_public_api.py b/numpy/tests/test_public_api.py index 194f8ecbb8a5..807c98652b94 100644 --- a/numpy/tests/test_public_api.py +++ b/numpy/tests/test_public_api.py @@ -43,7 +43,6 @@ def test_numpy_namespace(): 'get_include': 'numpy.lib.utils.get_include', 'int_asbuffer': 'numpy.core._multiarray_umath.int_asbuffer', 'mafromtxt': 'numpy.lib.npyio.mafromtxt', - 'maximum_sctype': 'numpy.core.numerictypes.maximum_sctype', 'ndfromtxt': 'numpy.lib.npyio.ndfromtxt', 'recfromcsv': 'numpy.lib.npyio.recfromcsv', 'recfromtxt': 'numpy.lib.npyio.recfromtxt',