Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using absolute_luminance_calibration_Lagarde2016() #36

Closed
ahemberger opened this issue Jun 26, 2022 · 1 comment
Closed

Error when using absolute_luminance_calibration_Lagarde2016() #36

ahemberger opened this issue Jun 26, 2022 · 1 comment

Comments

@ahemberger
Copy link

Question

Hiyo again;

I have a bit of code that does this:

        (img, attribs) = colour.read_image(os.path.abspath(file), 
                                method="OpenImageIO", 
                                attributes=True )

        img = colour_hdri.absolute_luminance_calibration_Lagarde2016(img, LUX) # lux is an input arg

Trying to run it, I see:

numpy.core._exceptions._UFuncNoLoopError: ufunc 'multiply' did not contain a loop with signature matching types (dtype('float64'), dtype('<U5')) -> None

Is there a data type conversion I should be doing when passing the image to this function?

@KelSolaar
Copy link
Member

Hi @ahemberger,

Seems like "LUX" is a Unicode string here, try to cast it to float and this will work!

Cheers,

Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants