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
assert_array_equal also shows you which elements are different between two arrays.
My previous tips on NumPy.
array-to-latex: Turn a Numpy Array into Latex
unyt: Manipulate and Convert Units in NumPy Arrays
NumPy.take: Take Elements From an Array
Your email address will not be published. Required fields are marked *
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Δ