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

Test with numpy 2.0 #32

Open
howff opened this issue Nov 28, 2024 · 0 comments · May be fixed by #33
Open

Test with numpy 2.0 #32

howff opened this issue Nov 28, 2024 · 0 comments · May be fixed by #33

Comments

@howff
Copy link
Collaborator

howff commented Nov 28, 2024

Error from dicom_ocr.py
ERROR:root:Cannot extract frame 0 from foo.dcm (Python integer 65535 out of bounds for int16)

https://github.com/SMI/dicompixelanon/blob/main/src/applications/dicom_ocr.py#L264

dicomimg.next_image()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/smi-fs01-nfs/tmp/pixel-anon/venv/lib/python3.10/site-packages/DicomPixelAnon/dicomimage.py", line 340, in next_image
    return self.image(frame = n)
File "/mnt/smi-fs01-nfs/tmp/pixel-anon/venv/lib/python3.10/site-packages/DicomPixelAnon/dicomimage.py", line 234, in image
    pix_extracted = (self.pixel_data & self.bit_mask)
OverflowError: Python integer 65535 out of bounds for int16

Possible workaround: NPY_PROMOTION_STATE=legacy

@howff howff linked a pull request Dec 9, 2024 that will close this issue
@howff howff linked a pull request Dec 9, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant