You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While updating the package in Fedora to 0.13.4, I was testing the package dependencies and see that ephyviewer has a failing test now:
=================================== FAILURES ===================================
_______________________ test_traceviewer_cls_method_neo ________________________
interactive = False
def test_traceviewer_cls_method_neo(interactive=False):
sigs = np.random.rand(100000,16)
sample_rate = 1000.
t_start = 0.
> neo_anasig = neo.AnalogSignal(sigs*pq.mV, sampling_rate=sample_rate*pq.Hz, t_start=0*pq.s, copy=True)
ephyviewer/tests/test_traceviewer.py:74:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'neo.core.analogsignal.AnalogSignal'>
signal = array([[0.42289109, 0.87757422, 0.97128633, ..., 0.42063227, 0.33470735,
0.57933975],
[0.39828568, 0.78... 0.87677851],
[0.38279604, 0.85713246, 0.43967717, ..., 0.69529369, 0.73503751,
0.0068759 ]]) * mV
units = None, dtype = None, copy = True, t_start = array(0.) * s
sampling_rate = array(1000.) * Hz, sampling_period = None, name = None
file_origin = None, description = None, array_annotations = None
annotations = {}
def __new__(
cls,
signal,
units=None,
dtype=None,
copy=None,
t_start=0 * pq.s,
sampling_rate=None,
sampling_period=None,
name=None,
file_origin=None,
description=None,
array_annotations=None,
**annotations,
):
"""
Constructs new :class:`AnalogSignal` from data.
This is called whenever a new class:`AnalogSignal` is created from
the constructor, but not when slicing.
__array_finalize__ is called on the new object.
"""
if copy is not None:
> raise ValueError(
"`copy` is now deprecated in Neo due to removal in NumPy 2.0 and will be removed in 0.15.0."
)
E ValueError: `copy` is now deprecated in Neo due to removal in NumPy 2.0 and will be removed in 0.15.0.
/usr/lib/python3.13/site-packages/neo/core/analogsignal.py:202: ValueError
Is the intention here to throw an error (that makes the code stop)? Or is it to inform the user that they need to update their code---in which case, the deprecation warning should not make code fail (using a DeprecationWarning perhaps: https://docs.python.org/3/library/exceptions.html#DeprecationWarning ?)
The text was updated successfully, but these errors were encountered:
hey @sanjayankur31, You're right in that it's a deprecation but that error is not clear. Basically you need to to put copy=None to prevent the code from stopping. The copy argument is now ignored so we don't want to accept True/False. Put we should make it clear that the user should stop using copy because it does nothing. Thanks for reporting that this isn't clear. Looking back over this I think I got too deep in fixing things and didn't think about how end-users would understand the error :)
While updating the package in Fedora to 0.13.4, I was testing the package dependencies and see that ephyviewer has a failing test now:
Is the intention here to throw an error (that makes the code stop)? Or is it to inform the user that they need to update their code---in which case, the deprecation warning should not make code fail (using a DeprecationWarning perhaps: https://docs.python.org/3/library/exceptions.html#DeprecationWarning ?)
The text was updated successfully, but these errors were encountered: