You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the following test causes a TypeError at the last line (with healpy 1.16.2):
import healpy as hp
import numpy as np
alm_dp = np.zeros((10,), dtype=np.complex128)
alm_sp = np.zeros((10,), dtype=np.complex64)
hp.alm2map(alm_dp, nside=1, lmax=3)
hp.alm2map_spin([alm_dp,alm_dp], nside=1, lmax=3, spin=2)
hp.alm2map_spin([alm_sp,alm_sp], nside=1, lmax=3, spin=2)
hp.alm2map(alm_sp, nside=1, lmax=3)
martin@marvin:~/codes/ducc$ python3 bug.py
Traceback (most recent call last):
File "/home/martin/codes/ducc/bug.py", line 10, in <module>
hp.alm2map(alm_sp, nside=1, lmax=3)
File "/usr/lib/python3/dist-packages/astropy/utils/decorators.py", line 607, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/.local/lib/python3.11/site-packages/healpy/sphtfunc.py", line 504, in alm2map
output = sphtlib._alm2map(
^^^^^^^^^^^^^^^^^
TypeError: Type must be Complex for this function
It seems that alm2map_spin can deal with single precision and double precision inputs, but alm2map fails for single precision. I think this must be some kind of oversight.
The text was updated successfully, but these errors were encountered:
Running the following test causes a
TypeError
at the last line (with healpy 1.16.2):It seems that
alm2map_spin
can deal with single precision and double precision inputs, butalm2map
fails for single precision. I think this must be some kind of oversight.The text was updated successfully, but these errors were encountered: