Hi, On Wed, Feb 03, 2010 at 03:40:31AM -0800, smichr wrote: > And this suggests a little helper function knowing that a simple > expansion will do: > > >>> def mat_eq(a, b): > ... z = zip(iter(a), iter(b)) > ... for zi in z: > ... if (zi[0]-zi[1]).expand(): > ... return False > ... else: > ... return True > ... > >>> mat_eq(Sigma, Sigma.transpose()) > True >
Or you can use a one-liner, like this: In [5]: Sigma.applyfunc(simplify) == Sigma.transpose().applyfunc(simplify) Out[5]: True -- Mateusz
signature.asc
Description: This is a digitally signed message part