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

geom_imshow: unclear error message when mixing transparencies #1088

Open
ASmirnov-HORIS opened this issue Apr 27, 2024 · 0 comments
Open

geom_imshow: unclear error message when mixing transparencies #1088

ASmirnov-HORIS opened this issue Apr 27, 2024 · 0 comments
Milestone

Comments

@ASmirnov-HORIS
Copy link
Collaborator

Example:

img_array = np.array([
    [[0, 0, 255, 255], [0, 0, 255, 127]],
    [[255, 0, 0, 127], [255, 0, 0, 255]]
])
ggplot() + geom_imshow(img_array, alpha=.5)

The code throws:

UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('int32') with casting rule 'same_kind'

But the real problem is that we are using the alpha channel in the image and the alpha param of the geom_imshow() function at the same time, and Lets-Plot cannot handle this case.

@alshan alshan added this to the New milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants