Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/core-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
numpy-version: ['1.25.2', '1.26.4', '2.0.2','2.1.3', '2.2.6', '2.3.3']
numpy-version: ['1.25.2', '1.26.4', '2.0.2','2.1.3', '2.2.6', '2.3.3', '2.4.4']
# 1.25: 3.11, 1.26: 3.12
exclude:
- python-version: '3.10'
numpy-version: '2.3.3'
- python-version: '3.10'
numpy-version: '2.4.4'
- python-version: '3.12'
numpy-version: '1.25.2'
- python-version: '3.13'
Expand Down
14 changes: 8 additions & 6 deletions neo/test/coretest/test_analogsignal.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,15 +545,17 @@ def test__time_slice__no_explicit_time(self):
def test__time_slice_deepcopy_data(self):
result = self.signal1.time_slice(None, None)

# Change values of original array
self.signal1[2] = 7.3 * self.signal1.units
# Take a copy of sliced array before any modifications
result_data = result.magnitude.copy()

np.testing.assert_raises(AssertionError, assert_array_equal, self.signal1, result)
# Change values of original array, sliced array should be unaffected (proves deep copy)
self.signal1[2] = 7.3 * self.signal1.units
np.testing.assert_array_equal(result.magnitude, result_data)

# Change values of sliced array
# Take a copy of original array, then change values of sliced array, original array should be unaffected
signal1_data = self.signal1.magnitude.copy()
result[3] = 9.5 * result.units

np.testing.assert_raises(AssertionError, assert_array_equal, self.signal1, result)
np.testing.assert_array_equal(self.signal1.magnitude, signal1_data)

def test__slice_should_change_sampling_period(self):
result1 = self.signal1[:2, 0]
Expand Down
Loading