array_equal#
- class brainunit.math.array_equal(x, y, *args, **kwargs)#
Return True if two arrays have the same shape and elements.
When both inputs are Quantities,
yis converted to the unit ofxbefore comparison.- Parameters:
- Returns:
out – True if the arrays are equal.
- Return type:
bool|Array
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> u.math.array_equal(jnp.array([1, 2]), jnp.array([1, 2])) Array(True, dtype=bool) >>> u.math.array_equal(jnp.array([1, 2]), jnp.array([1, 3])) Array(False, dtype=bool)