Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.array_equal

numpy.array_equal(a1,a2)[source]

True if two arrays have the same shape and elements, False otherwise.

Parameters:
a1, a2:array_like

Input arrays.

Returns:
b:bool

Returns True if the arrays are equal.

See also

allclose
Returns True if two arrays are element-wise equal within a tolerance.
array_equiv
Returns True if input arrays are shape consistent and all elements equal.

Examples

>>>np.array_equal([1,2],[1,2])True>>>np.array_equal(np.array([1,2]),np.array([1,2]))True>>>np.array_equal([1,2],[1,2,3])False>>>np.array_equal([1,2],[1,4])False

Previous topic

numpy.isclose

Next topic

numpy.array_equiv

Quick search

  • © Copyright 2008-2018, The SciPy community.
  • Last updated on Jul 24, 2018.
  • Created usingSphinx 1.6.6.

[8]ページ先頭

©2009-2025 Movatter.jp