Converting PyTaco Data Type to NumPy

pytaco.as_np_dtype(dtype)

Converts a pytaco.dtype its equivalent NumPy data type.

Parameters
dtypepytaco.dtype

Any PyTaco data type object.

Returns
numpy.dtype

The NumPy equivalent of the PyTaco data type passed in.

Examples

>>> import pytaco as pt
>>> import numpy as np
>>> pt.as_np_dtype(pt.float32)
<class 'numpy.float32'>