-
Notifications
You must be signed in to change notification settings - Fork 68
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
Use PyArray_SetBaseObject as ndarray.base is readonly property #201
Conversation
@letmaik - any thoughts on setting a minimum numpy version for rawpy? Given this method was introduced in numpy==1.7, rawpy coupled with lower versions of numpy will fail. |
@rafalstapinski Setting a lower version bound is theoretically possible via version specifiers in |
Looks like something else is currently broken unrelated to your PR which makes CI fail, probably due to an update of scikit-image. Do you want to have a look by any chance? I'm a little busy currently. |
Yeah, I'll take a poke around. |
I don't have the full context of your reasoning behind allowing for trying to use |
OpenCV, at least back then and maybe still now, is faster than scikit-image but is not as general, see the code comments for details. Let’s keep it as is for now and just patch the signature.
On 27 Apr 2023, at 01:00, Rafal Stapinski ***@***.***> wrote:
I don't have the full context of your reasoning behind allowing for trying to use median from skimage or opencv depending on availability. Totally fine with just using the new skimage signature<https://scikit-image.org/docs/stable/api/skimage.filters.rank.html#median> (footprint, instead of selem) as scikit-image seems to have renamed it a few versions ago - but would it be better to just stick to one library (and making it a requirement) instead of trying for both?
—
Reply to this email directly, view it on GitHub<#201 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAEBULHDJDWPULFBJQPSXLLXDGZJHANCNFSM6AAAAAAXMV7ANI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sounds good - I updated the calls, want to run the pipelines again? |
Alrighty - looks like its all passing. Is your preference to break these out into two isolated changes, or just merge as is? Updated the PR message to reflect both changes. |
Thanks again! Will kick off a new release soon. |
Change 1
Numpy 1.7 introduced the
PyArray_SetBaseObject
method of settingndarray.base
property as in recent versionsbase
has become a read-only.When compiling
rawpy
with a recent version of numpy (1.23.2) we get the following errors:Using numpy's
PyArray_SetBaseObject
fixes this (per: cython/cython#3690 (comment))Breaking out from this thread: #171 (comment)
Change 2
Additionally the signature for
skimage.filters.rank.median
has changed,selem
has changed tofootprint
so have updated that as well.