On 5/7/07, dmitrey <[EMAIL PROTECTED]> wrote:
> hi all,
> I have some troubles with Python2.5+matplotlib, so now I'm using
> Python2.4.3. I failed to compile both numpy1.0.1 and 1.0.2
> (Mandrake2007) so currently I'm using 1.0b.
> Howto check if numpy.array instances x and y are equal? (i.e. all
> elements are same)

numpy.all(A==B) should do it.  But if you're dealing with floating
point, then numpy.allclose(A,B) is probably a better choice.

>
> Please answer one more question - what is the best (fastest) way to
> create copy of numpy.array instance?

B = A.copy()

Unless you don't mind the "copy" referring to the same memory, and then just

B = A

--bb
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to