-
Notifications
You must be signed in to change notification settings - Fork 3
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
Remove Volume.arraydata because it does not round-trip to the correct Volume shape #93
Comments
ylep
added a commit
that referenced
this issue
Feb 13, 2023
Actually we would need to raise a (more visible) RuntimeWarning, because the behaviour of arraydata() has already changed, and DeprecationWarnings are invisible by default... but we are goinrg to remove arraydata() or make it raise an exception, so this is good enough for now. See #93
ylep
changed the title
Get rid of Volume.arraydata
Remove Volume.arraydata because it does not round-trip to the correct Volume shape
Feb 13, 2023
10 tasks
Originally posted by @denisri in #92 (comment) |
ylep
added a commit
that referenced
this issue
Feb 17, 2023
ylep
added a commit
that referenced
this issue
Mar 10, 2023
denisri
added a commit
that referenced
this issue
Jan 12, 2024
denisri
added a commit
to brainvisa/anatomist-gpl
that referenced
this issue
Jan 12, 2024
denisri
added a commit
to brainvisa/brainvisa_freesurfer
that referenced
this issue
Jan 12, 2024
denisri
added a commit
to brainvisa/sulci-nonfree
that referenced
this issue
Jan 12, 2024
denisri
added a commit
to brainvisa/morphologist-gpl
that referenced
this issue
Jan 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Volume.arraydata()
function is used by many scripts, both in our distributed code and in user scripts. However, this is the incorrect function to use, people should usenumpy.asarray
orvolume.np
instead.Scripts that use
Volume
->arraydata()
-> NumPy Array ->Volume
used to work by sheer chance because of a bug inaims.Volume
, but that bug is now fixed and thus user scripts needs to be fixed (see #92 for details).I propose to drop support for
arraydata()
entirely, making it raise an exception telling people to fix their code and usenumpy.asarray
orvolume.np
instead. If some specific use-cases need its functionality, we can make it available under another name (e.g.raw_internal_array
or something similar).We also need to fix the code that we distribute: I counted 487 uses of
arraydata
in Python code in thecea
distro on the 5.1 branch:The text was updated successfully, but these errors were encountered: