Follow-up Comment #4, bug #22032 (project relax):
Acccording to these guys:
http://stackoverflow.com/questions/6736590/fast-check-for-nan-in-numpy
The fastest way to check for numpy errors is a sum of the list.
That can then be checked for isfinite() or isnan()
# Skip the error search.
etapos = etapos_part / cpmg_frqs
etaneg = etaneg_part / cpmg_frqs
fact = Dpos * cosh(etapos) - Dneg * cos(etaneg)
if isfinite(sum(fact)):
R2eff = r20_kex - cpmg_frqs * arccosh(fact)
for i in range(num_points):
back_calc[i] = R2eff[i]
else:
R2eff = array([10**7]*num_points)
for i in range(num_points):
back_calc[i] = R2eff[i]
http://docs.scipy.org/doc/numpy/reference/generated/numpy.isfinite.html
http://docs.scipy.org/doc/numpy/reference/generated/numpy.isnan.html
http://docs.scipy.org/doc/numpy/reference/generated/numpy.isinf.html
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?22032>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel