nums.numpy.array_equiv

nums.numpy.array_equiv(a, b)[source]

Returns True if input arrays are shape consistent and all elements equal.

This docstring was copied from numpy.array_equiv.

Some inconsistencies with the NumS version may exist.

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
Returns

out – True if equivalent, False otherwise.

Return type

BlockArray

Examples

The doctests shown below are copied from NumPy. They won’t show the correct result until you operate get().

>>> nps.array_equiv(nps.array([1, 2]), nps.array([1, 2])).get()  
array(True)
>>> nps.array_equiv(nps.array([1, 2]), nps.array([1, 3])).get()  
array(False)