plestylib.data.types
====================

.. py:module:: plestylib.data.types


Functions
---------

.. autoapisummary::

   plestylib.data.types.resolve_dtype
   plestylib.data.types.resolve_array_item_dtype
   plestylib.data.types.normalize_shape
   plestylib.data.types.istype
   plestylib.data.types.cast_basic_type


Module Contents
---------------

.. py:function:: 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.


.. py:function:: resolve_array_item_dtype(dtype: Any) -> Any

.. py:function:: normalize_shape(shape: Any) -> tuple[Any, Ellipsis] | None

.. py:function:: istype(value, dtype)

   Helper function to check if a value is of a specified data type, including basic types and iterable types.


.. py:function:: cast_basic_type(value, dtype)

