[SciPy-user] Faster allclose, comparing arrays
Tom Johnson
tjhnson at gmail.com
Fri Feb 1 14:47:37 EST 2008
Frequently, I am comparing vectors to one another, and I am finding
that a good portion of my time is spent in allclose. This is done
through a class which stores a bunch of metadata and also a 'vector'
attribute:
def __eq__(self, other):
return allclose(self.vector, other.vector, rtol=RTOL, atol=ATOL)
So I place these objects in a list and check equality via "if x in
objlist". Couple of questions:
1) Is this a "good" method for comparing arrays?
2) Is there any way to speed up allclose?
Thanks.
More information about the SciPy-User
mailing list