ksmet1977/luxpy

deprecation issue in numpy float

Closed this issue · 2 comments

I am using Python 3.11.3 with numpy==1.25.1

import luxpy as lx
Rf = lx.cri.spd_to_cri(...)

The spd_to_cri function uses 'np.float' which is deprecated and aliases have been removed since Numpy ver 1.20. The error occurs in the function...
_get_hue_bin_data
inside the file...
luxpy/color/cri/utils/helpers.py.
inside the command...
wr = np.nansum(cndr_hj,axis=0,keepdims=True).astype(np.float)

The returned error is...
module 'numpy' has no attribute 'float'
and basically tells you to just use 'float' instead of 'np.float.'

I'd fix this myself but I am not a trained coder and am more comfortable with you looking into it.
-Jim

Have you tried the luxpy version downloaded directly from github? That should normally have that issue already dealt with, along with some other changes. I’ve been waiting for numpy to release version 2.0 to update luxpy and release a new version on pypi and conda.
Regards
Kevin

Thank you so much for this quick and easy fix. All is working.