Deprecation in pq.Quantity of the copy argument
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).
@zm711 can you handle this?
Sure looks like a pretty quick fix. I'll assign myself. I'm busy today, but will work on this week!
@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.