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

Problem with preview: TypeError: ufunc 'invert' not supported for the input types #54

Closed
lachesis opened this issue Apr 28, 2022 · 3 comments

Comments

@lachesis
Copy link

lachesis commented Apr 28, 2022


$ python3 ./print.py -b none -s ~/cat.png
Traceback (most recent call last):
  File "/home/user/build/catprinter/./print.py", line 83, in <module>
    main()
  File "/home/user/build/catprinter/./print.py", line 69, in main
    show_preview(bin_img)
  File "/home/user/build/catprinter/catprinter/img.py", line 143, in show_preview
    preview_img = ~bin_img.astype(float)
TypeError: ufunc 'invert' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

cat

@rbaron
Copy link
Owner

rbaron commented Apr 28, 2022

Seems like the refactoring in #51 broke the preview. @akx could you please take a look?

@rbaron rbaron closed this as completed in 74493b1 Apr 28, 2022
@rbaron
Copy link
Owner

rbaron commented Apr 28, 2022

Actually I think that fixes it. Please let me know if it works for you @lachesis.

@akx
Copy link
Contributor

akx commented May 3, 2022

Sorry, I've been away on holiday for a bit :) Should've realized the precedence works like that, glad you got it fixed.

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

3 participants