summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-02-27 19:12:16 +0200
committerGitHub <noreply@github.com>2019-02-27 19:12:16 +0200
commita03afed3315c247ccb82878d4aba12fb3cd2aad6 (patch)
tree53ea2ba0bfb8df47d33d00b3ceb49ec92ebf083b
parenta8a0b870b4ef01baaed4faa87622d393668f5207 (diff)
parent194927d5aa993f6b68248b24d374a29d26a261dd (diff)
downloadnumpy-a03afed3315c247ccb82878d4aba12fb3cd2aad6.tar.gz
Merge pull request #13054 from madphysicist/maximum_sctype-docs
DOC: Added maximum_sctype to documentation
-rw-r--r--doc/source/reference/routines.dtype.rst3
-rw-r--r--numpy/core/numerictypes.py1
-rw-r--r--numpy/tests/test_public_api.py1
3 files changed, 2 insertions, 3 deletions
diff --git a/doc/source/reference/routines.dtype.rst b/doc/source/reference/routines.dtype.rst
index ec8d2981d..e9189ca07 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 5bc37b73a..70cc484b1 100644
--- a/numpy/core/numerictypes.py
+++ b/numpy/core/numerictypes.py
@@ -140,6 +140,7 @@ genericTypeRank = ['bool', 'int8', 'uint8', 'int16', 'uint16',
'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 194f8ecbb..807c98652 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',