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

Deprecation in pq.Quantity of the copy argument #1529

Open
mscheltienne opened this issue Aug 27, 2024 · 3 comments · May be fixed by #1554
Open

Deprecation in pq.Quantity of the copy argument #1529

mscheltienne opened this issue Aug 27, 2024 · 3 comments · May be fixed by #1554
Assignees
Labels
Milestone

Comments

@mscheltienne
Copy link

Spotted today on CIs in MNE-Python: https://github.com/mne-tools/mne-python/actions/runs/10577451925/job/29305474492?pr=12815#step:17:5232

 neo/io/proxyobjects.py:296: in load
    anasig = AnalogSignal(
neo/core/analogsignal.py:202: in __new__
    obj = pq.Quantity(signal, units=units, dtype=dtype, copy=copy).view(cls)
quantities/quantity.py:120: in __new__
    warnings.warn(("The 'copy' argument in Quantity is deprecated and will be removed in the future. "
E   quantities.QuantitiesDeprecationWarning: The 'copy' argument in Quantity is deprecated and will be removed in the future. The argument has no effect since quantities-0.16.0 (to aid numpy-2.0 support).
@apdavison
Copy link
Member

@zm711 can you handle this?

@zm711
Copy link
Contributor

zm711 commented Aug 27, 2024

Sure looks like a pretty quick fix. I'll assign myself. I'm busy today, but will work on this week!

@zm711 zm711 self-assigned this Aug 27, 2024
@zm711
Copy link
Contributor

zm711 commented Aug 27, 2024

@apdavison,

We have a huge portion of our object model that relies on copy vs view of the data. The new default is now always a view, so we have some test failures here because we are testing for copy vs view. Do we want to try to maintain this behavior at the Neo level instead of the quantities level. I think we could just add some deepcopies into the Neo code instead of passing copy to Quantities. I think I will actually move discussion to my issue #1534 for us to strategize.

@zm711 zm711 added this to the 0.14.0 milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants