plestylib.data.types#
Functions#
|
Resolve schema dtype strings into Python types. |
|
|
|
|
|
Helper function to check if a value is of a specified data type, including basic types and iterable types. |
|
Module Contents#
- plestylib.data.types.resolve_dtype(dtype: Any) type | None#
Resolve schema dtype strings into Python types.
Supports scalar aliases and array types in the form array_<numpy_dtype>, e.g. array_float, array_int32, array_float64.
- Parameters:
dtype (Any)
- Return type:
type | None
- plestylib.data.types.resolve_array_item_dtype(dtype: Any) Any#
- Parameters:
dtype (Any)
- Return type:
Any
- plestylib.data.types.normalize_shape(shape: Any) tuple[Any, Ellipsis] | None#
- Parameters:
shape (Any)
- Return type:
tuple[Any, Ellipsis] | None
- plestylib.data.types.istype(value, dtype)#
Helper function to check if a value is of a specified data type, including basic types and iterable types.
- plestylib.data.types.cast_basic_type(value, dtype)#