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

Tested code for for python > 3.9 and numpy >= 2.0 #864

Open
wants to merge 69 commits into
base: master
Choose a base branch
from

Conversation

erjel
Copy link

@erjel erjel commented Dec 18, 2024

Hi,

I don't know whether I will regret this in the future, but I decided to port the repository to recent python (currently 3.12), numpy (2.0.2), and opencv-python (4.10). All provided tests are passing on Ubuntu, Mac, and windows.

To @aleju : I am happy to maintain the project with it's current function set and I am also interested in providing PyPi packages so that it can be easily installed via pip. The question is how to push this forward. It would be nice, if I can become co-owner of this repository. A even better solution would be a new github organization imgaug which also owns the documentation and thus be independent of a single account.

This pull request would closed quite a lot of open issues:

AlexanderRagnarsson and others added 30 commits April 13, 2023 13:34
Use u7122029 pullrequest in upstream to fix failing tests
bugfix: cval is marked as depreciated but alternative is unused.
dep: opencv 4 introduces error in tests
* Move test dependencies into setup.py
* Delete unused `requirements.txt`
* Restrict testing in ubuntu-latest and windows-latest to pre-build python versions
* Restrict macos testing to version which comes with available wheels (mainly for scikit-image)
After trying back and forth I came to the conclusion that the target value is highly dependend
on the seed value. With `seed=1` for `iaa.ElasticTransformation` a couple lines above I could
push down `count_bad` to 0. This means that I can either use a different seed or relax the test
condition. Since I probably cannot control the exact values of future generators, I decided to
do the later.
… module and assumes existence of NDArray which was introduced in numpy 1.21
…ndle anymore.

Directly return zero-sized arrays in arithmetic function since there is
nothing to do.
…havior

Until this point, the polygon drawing exhibited inconsistent behavior between
left and right boundaries of polygons. This behavior was considered a bug and
the behavior thus changed. The changed tests mirrored this behavior and
therefore must adapt to the new (consistent) behavior of scikit-image.
Prior to scikit-image 0.19.0 transform.warp converted float16 images
implicitly to float64 prior to the calculation. This has changed such
that we need to convert the image to a supported floating point format
ourselves.
erjel and others added 29 commits December 16, 2024 15:13
ci: Decided not to support depreciated BatchLoader on Windows
Make repository numpy 2.0 ready:
* fixing comparisons between different dtypes
* modified test which relied on numpy overflow behavior
* made sure that C-arrays are passed when needed to opencv
* fixed bugs related to implicit output dtype changes
Support opencv4 in tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment