desihub / redrock

Redshift fitting for spectroperfectionism
BSD 3-Clause "New" or "Revised" License
21 stars 13 forks source link

"A builtin ctypes object gave a PEP3118 format string that does not match its itemsize" #285

Closed moustakas closed 2 months ago

moustakas commented 4 months ago

This call to rrdesi

rrdesi -i /global/cfs/cdirs/desi/users/ioannis/fastspecfit/redrock-templates/stacks/redux-templates-NMF-0.4-zscan01/vitiles/coadd-7-80606.fits \
  -o /global/cfs/cdirs/desi/users/ioannis/fastspecfit/redrock-templates/stacks/redux-templates-NMF-0.4-zscan01/vitiles/redrock-7-80606.fits  \
  -d /global/cfs/cdirs/desi/users/ioannis/fastspecfit/redrock-templates/stacks/redux-templates-NMF-0.4-zscan01/vitiles/rrdetails-7-80606.h5 \
  --zscan-galaxy=-0.005,1.7,3e-4 --gpu

produced a RuntimeWarning:

[snip]
Read and broadcast of 13 templates: 0.1 seconds
Creating GPU context: 0.0 seconds
Rebinning templates: 11.3 seconds
Computing redshifts
  Scanning redshifts for template GALAXY:::BGS
/global/homes/i/ioannis/code/desihub/redrock/py/redrock/utils.py:173: RuntimeWarning: A builtin ctypes object gave a PEP3118 format string that does not match its itemsize, so a best-guess will be made of the data type. Newer versions of python may behave correctly.
  nd = np.array(raw, dtype=typecode, copy=False).view()
    Progress:   0 %
    Progress:  10 %
    Progress:  20 %
[snip]
moustakas commented 2 months ago

This was a duplicate of #250 and was fixed in #298.