bundles / numpy 2.4.3 / numpy / array_equiv
_ArrayFunctionDispatcher
numpy:array_equiv
source: /numpy/_core/numeric.py :2625
Signature
def array_equiv ( a1 , a2 ) Summary
Returns True if input arrays are shape consistent and all elements equal.
Extended Summary
Shape consistent means they are either the same shape, or one input array can be broadcasted to create the same shape as the other one.
Parameters
a1, a2: array_likeInput arrays.
Returns
out: boolTrue if equivalent, False otherwise.
Examples
import numpy as np np.array_equiv([1, 2], [1, 2]) np.array_equiv([1, 2], [1, 3])✓
np.array_equiv([1, 2], [[1, 2], [1, 2]]) np.array_equiv([1, 2], [[1, 2, 1, 2], [1, 2, 1, 2]])✓
np.array_equiv([1, 2], [[1, 2], [1, 3]])
✓Aliases
-
numpy.array_equiv