bundles / astropy latest / astropy / utils / misc / dtype_bytes_or_chars
function
astropy.utils.misc:dtype_bytes_or_chars
source: /astropy/utils/misc.py :539
Signature
def dtype_bytes_or_chars ( dtype ) Summary
Parse the number out of a dtype.str value like '<U5' or '<f8'.
Extended Summary
See #5819 for discussion on the need for this function for getting the number of characters corresponding to a string dtype.
Parameters
dtype: numpy dtype objectInput dtype
Returns
bytes_or_chars: int or NoneBits (for numeric types) or characters (for string types)
Aliases
-
astropy.utils.dtype_bytes_or_chars