21 Dec
2012
21 Dec
'12
1:59 p.m.
Dag Sverre Seljebotn <d.s.seljebotn <at> astro.uio.no> writes: [clip]
Do you have an implemention of the Bessel functions that work as you wish in C or Fortran? If so, that could be wrapped and called from Python.
For spherical Bessel functions it's possible to also use the relation to Bessel functions, which have a better implementation (AMOS) in Scipy: import numpy as np from scipy.special import jv def sph_jn(n, z): return jv(n + 0.5, z) * np.sqrt(np.pi / (2 * z)) print sph_jn(536, 2513.2741228718346 + 201.0619298974676j) # (2.5167666386507171e+81+3.3576357192536334e+81j) This should solve the problem. -- Pauli Virtanen