numpy.array_equiv

numpy.array_equiv(a1, a2)

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

Parameters:

a1 : array_like

Input array.

a2 : array_like

Input array.

Returns:

out : bool

True if equivalent, False otherwise.

Examples

>>> np.array_equiv([1,2],[1,2])
>>> True
>>> np.array_equiv([1,2],[1,3])
>>> False
>>> np.array_equiv([1,2], [[1,2],[1,2]])
>>> True
>>> np.array_equiv([1,2], [[1,2],[1,3]])
>>> False

Previous topic

numpy.array_equal

Next topic

numpy.greater

This Page

Quick search