ksmet1977 / luxpy

Python toolbox for lighting and color science
GNU General Public License v3.0
113 stars 31 forks source link

UnboundLocalError: local variable 'dotAB' referenced before assignment in dot23() #16

Closed joshuakraemer closed 3 years ago

joshuakraemer commented 3 years ago

Calling luxpy.color.cam.zcam(numpy.array([10, 20, 30])) results in the error UnboundLocalError: local variable 'dotAB' referenced before assignment. The traceback points to function "dot23()". The reason for this error seems to be that all assignments of the returned variable "dotAB" are behind if conditions.

ksmet1977 commented 3 years ago

your input is a vector, but all colorimetric data in luxpy is always either 2D or 3D arrays with the actual colorimetric values on the last axis. Calling luxpy.color.cam.zcam(numpy.array([[10, 20, 30]])) works without a problem.

joshuakraemer commented 3 years ago

Thanks and sorry for the mistake!