[SciPy-user] matlab isequal equivalent in python or numpy

dmitrey openopt@ukr....
Wed Jul 11 02:11:13 CDT 2007

I need check does array1 equal to array2 or no, lots of times.
In MATLAB I just used

if isequal(array1, array2) ...

I guess it uses binary code comparison, w/o translating to numbers, 
because isequal works with any types of objects, not only numeric ones

in python I use

if array1.shape==array2.shape and all(array1==array2):...

is it possible to use something more faster and/or better?

More information about the SciPy-user mailing list