Fixed symmetrify for when C/F compiler doesn't work

This commit is contained in:
Andreas 2013-05-28 15:50:18 +01:00
parent a491b52371
commit 3853721355

View file

@ -313,7 +313,10 @@ def symmetrify(A,upper=False):
elif A.flags['F_CONTIGUOUS'] and not upper:
weave.inline(f_contig_code,['A','N'], extra_compile_args=['-O3'])
else:
tmp = np.tril(A)
if upper:
tmp = np.tril(A.T)
else:
tmp = np.tril(A)
A[:] = 0.0
A += tmp
A += np.tril(tmp,-1).T