ColorPy
ColorPy copied to clipboard
Index in ciexyz.xyz_from_wavelength() should be explicitly converted to int.
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.
In my case, I directly get IndexError. Would be great to get it fixed.
It's an error in numpy 1.12.x now:
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
index = int(index)