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
{{ message }}
Repository navigation
Index in ciexyz.xyz_from_wavelength() should be explicitly converted to int. #23
The index used in ciexyz.xyz_from_wavelength() is intended to be an integer, but is actually a floating point type with an integral value. It should be explicitly converted to an integer to avoid a deprecation warning.
File "/vls/lib/python2.7/site-packages/colorpy/ciexyz.py", line 709, in xyz_from_wavelength
return _xyz_colors [index] + frac_wl_nm * _xyz_deltas [index]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
Activity
jmllorens commentedon May 12, 2017
In my case, I directly get
IndexError. Would be great to get it fixed.thecere commentedon Jun 4, 2017
It's an error in numpy 1.12.x now:
GordonDongZHAO commentedon Dec 12, 2019
index = int(index)