summaryrefslogtreecommitdiff
path: root/numpy/ma
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-09-20 23:26:23 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-09-20 23:38:04 -0700
commit6bfd1db8228a22c3a3aff11357e8812c3ebaeb6a (patch)
tree2bd3b8b7cb4b16431f6d08b07052df98725b14e2 /numpy/ma
parentbb72516d9227d8447d9b39e5ab56c17ccdc639ac (diff)
downloadnumpy-6bfd1db8228a22c3a3aff11357e8812c3ebaeb6a.tar.gz
MAINT: Eliminate the private `numerictypes._typestr`
This was used internally only by a private function that is also unused. The loop adding type aliases was shown by #12007 to have no effect.
Diffstat (limited to 'numpy/ma')
-rw-r--r--numpy/ma/mrecords.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/numpy/ma/mrecords.py b/numpy/ma/mrecords.py
index 90a5141b3..daf2f8770 100644
--- a/numpy/ma/mrecords.py
+++ b/numpy/ma/mrecords.py
@@ -29,7 +29,6 @@ from numpy.core.records import (
)
_byteorderconv = np.core.records._byteorderconv
-_typestr = ntypes._typestr
import numpy.ma as ma
from numpy.ma import (
@@ -48,24 +47,6 @@ __all__ = [
reserved_fields = ['_data', '_mask', '_fieldmask', 'dtype']
-def _getformats(data):
- """
- Returns the formats of arrays in arraylist as a comma-separated string.
-
- """
- if hasattr(data, 'dtype'):
- return ",".join([desc[1] for desc in data.dtype.descr])
-
- formats = ''
- for obj in data:
- obj = np.asarray(obj)
- formats += _typestr[obj.dtype.type]
- if issubclass(obj.dtype.type, ntypes.flexible):
- formats += repr(obj.itemsize)
- formats += ','
- return formats[:-1]
-
-
def _checknames(descr, names=None):
"""
Checks that field names ``descr`` are not reserved keywords.