is_float

Contents

is_float#

class brainunit.math.is_float(array)#

Check if the array has a floating-point dtype.

Parameters:

array (array_like or Quantity) – The input array.

Returns:

outTrue if the array dtype is a floating-point type.

Return type:

bool

Examples

>>> import jax.numpy as jnp
>>> import saiunit.math as sumath
>>> sumath.is_float(jnp.array([1.0]))
True
>>> sumath.is_float(jnp.array([1]))
False