get_dtype#
- class saiunit.math.get_dtype(a)#
Get the dtype of an array,
Quantity, or Python scalar.- Parameters:
a (array_like, Quantity, or scalar) – The input whose dtype is to be determined.
- Returns:
out – The data type of a.
- Return type:
Examples
>>> import jax.numpy as jnp >>> import saiunit.math as sumath >>> sumath.get_dtype(jnp.array([1.0, 2.0])) dtype('float32')