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

integer wraparound in Cascade test case #6638

Open
grlee77 opened this issue Nov 28, 2022 · 1 comment
Open

integer wraparound in Cascade test case #6638

grlee77 opened this issue Nov 28, 2022 · 1 comment
Labels

Comments

@grlee77
Copy link
Contributor

grlee77 commented Nov 28, 2022

Description:

Testing with the recent NumPy 1.24rc1 pre-release revealed a potential issue with the XML file used for our test_detector_astronaut test case.

Specifically there is a warning about:
"DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays. The conversion of -67130709 to uint32 will fail in the future."

It seems that the data in the test XML file has negative values that have been getting silently wrapped to positive ones on cast to uint32.

Way to reproduce:

install NumPy>=1.24rc1 and run the test case:

`pytest feature/tests/test_cascade.py`

(note, the warning may soon be suppressed by changes in #6637 in which case the catch_warnings context would have to be removed from the test case to see it)

Traceback or output:

From the CI log [here](https://github.com/scikit-image/scikit-image/actions/runs/3567086648/jobs/5994344865)

FAILED feature/tests/test_cascade.py::test_detector_astronaut - DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -67130709 to uint32 will fail in the future.
For the old behavior, usually:
    np.array(value).astype(dtype)`
will give the desired result (the cast overflows).

Version information:

3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:49:35) 
[GCC 10.4.0]
Linux-5.14.0-1054-oem-x86_64-with-glibc2.10
scikit-image version: 0.20.0.dev0+git20221128.f25ae8557
numpy version: 1.24.0rc1
@github-actions
Copy link

Hey, there hasn't been any activity on this issue for more than 180 days. For now, we have marked it as "dormant" until there is some new activity. You are welcome to reach out to people by mentioning them here or on our forum if you need more feedback! If you think that this issue is no longer relevant, you may close it by yourself; otherwise, we may do it at some point (either way, it will be done manually). In any case, thank you for your contributions so far!

@github-actions github-actions bot added the 😴 Dormant no recent activity label May 28, 2023
@github-actions github-actions bot removed the 😴 Dormant no recent activity label Sep 9, 2023
@lagru lagru added the 🐛 Bug label Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants