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

Dependency "lazy_loader" version? #2

Open
Chrisa142857 opened this issue Sep 22, 2024 · 3 comments
Open

Dependency "lazy_loader" version? #2

Chrisa142857 opened this issue Sep 22, 2024 · 3 comments

Comments

@Chrisa142857
Copy link

python3 main.py requires a module named 'lazy_loader'. After pip install , the default lazy_loader-0.4 is installed. Then, a data type error popped out

numpy._core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'clip' output from dtype('float64') to dtype('>u2') with casting rule 'same_kind

What is the version of lazy_loader should I use?

@Chrisa142857
Copy link
Author

This can be fixed by adding b = b.astype(float) between line 17 and 18 in poc/pgm.py

@slitvinov
Copy link
Collaborator

slitvinov commented Sep 23, 2024

b = b.astype(float) doesn't modify or clip the actual values in the PNG file. Which version of numpy you use? Mine is

$ python -c 'import numpy as np; print(np.version.version)'
1.24.3

@Chrisa142857
Copy link
Author

b = b.astype(float) doesn't modify or clip the actual values in the PNG file. Which version of numpy you use? Mine is

$ python -c 'import numpy as np; print(np.version.version)'
1.24.3

Mine is 2.0.2

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