diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-11-18 17:14:41 -0800 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2018-11-18 17:14:41 -0800 |
commit | ecaa29b9c9e7a57f5bfc66e4f57a0b5283304549 (patch) | |
tree | 6836d106c11864d8e02c0c8bcfbb0635c5a2f75f /numpy/core | |
parent | 1466e788a43b8d4356fe35951bf0c3b0aedb554f (diff) | |
download | numpy-ecaa29b9c9e7a57f5bfc66e4f57a0b5283304549.tar.gz |
MAINT: rename helper functions for consistency
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/_dtype_ctypes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/_dtype_ctypes.py b/numpy/core/_dtype_ctypes.py index 4d5191aab..54b70ac24 100644 --- a/numpy/core/_dtype_ctypes.py +++ b/numpy/core/_dtype_ctypes.py @@ -66,7 +66,7 @@ def _from_ctypes_structure(t): return np.dtype(fields, align=True) -def dtype_from_ctypes_scalar(t): +def _from_ctypes_scalar(t): """ Return the dtype type with endianness included if it's the case """ @@ -78,7 +78,7 @@ def dtype_from_ctypes_scalar(t): return np.dtype(t._type_) -def dtype_from_ctypes_union(t): +def _from_ctypes_union(t): formats = [] offsets = [] names = [] @@ -105,9 +105,9 @@ def dtype_from_ctypes_type(t): elif issubclass(t, _ctypes.Structure): return _from_ctypes_structure(t) elif issubclass(t, _ctypes.Union): - return dtype_from_ctypes_union(t) + return _from_ctypes_union(t) elif isinstance(t._type_, str): - return dtype_from_ctypes_scalar(t) + return _from_ctypes_scalar(t) else: raise NotImplementedError( "Unknown ctypes type {}".format(t.__name__)) |