Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.array_equiv

numpy.array_equiv(a1,a2)[source]

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

Shape consistent means they are either the same shape, or one input arraycan be broadcasted to create the same shape as the other one.

Parameters:

a1, a2 : array_like

Input arrays.

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

Showing the shape equivalence:

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

Previous topic

numpy.array_equal

Next topic

numpy.greater

  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp