Check if Two NumPy Arrays Are Equal

If you try to check whether two arrays are equal, using an assert statement will give you an error. Use assert_array_equal instead.

assert_array_equal also shows you which elements are different between two arrays.  

My previous tips on NumPy.

Related Posts

Comments are closed.

Related Posts

Scroll to Top