caput.util.typeutils#
memdata data type utilities.
This internal module contains utilities to help deal with incompatibilities
between numpy, mpi4py, and/or HDF5 data types.
This is mostly just conversions between numpy “U” unicode strings and
“S” bytestrings.
Functions#
|
Ensure that a string (or collection of) are unicode. |
|
Test if a native byteorder; if not, check if byteorder matches the architecture. |
|
Test if dataset contains unicode so we can raise an appropriate error. |
|
Convert unicode strings in a dtype to byte strings. |
|
Convert byte strings in a dtype to unicode. |
|
If needed convert the array to contain bytestrings not unicode. |
|
If architecture and arr byteorder are the same, ensure byteorder is native. |
|
If needed convert the array to contain unicode strings not bytestrings. |
|
Test if data type contains any unicode fields. |
|
Test if a numpy datatype has any fields of a specified type. |
|
Test if byteorder marches the architecture. |
|
Test if data type contains any unicode fields. |