Skip to content

Fix test_time_slice_deepcopy_data() failure on numpy 2.4.x#1849

Open
apdavison wants to merge 1 commit into
NeuralEnsemble:masterfrom
apdavison:issue1848
Open

Fix test_time_slice_deepcopy_data() failure on numpy 2.4.x#1849
apdavison wants to merge 1 commit into
NeuralEnsemble:masterfrom
apdavison:issue1848

Conversation

@apdavison
Copy link
Copy Markdown
Member

numpy 2.4.x changed assert_array_compare, which in some circumstances causes a shape mismatch IndexError when comparing AnalogSignal objects, instead of the expected AssertionError.

This change tests deepcopy more directly, by taking a snapshot of the object before mutation and asserting it is unchanged afterwards.

Also add numpy 2.4.4 to the core-test CI matrix.

Fixes #1848

numpy 2.4.x changed assert_array_compare, which in some circumstances causes a shape mismatch IndexError when comparing AnalogSignal objects, instead of the expected AssertionError.

This change tests deepcopy more directly, by taking a snapshot of the object before mutation and asserting it is unchanged afterwards.

Also add numpy 2.4.4 to the core-test CI matrix.

Fixes NeuralEnsemble#1848
@apdavison
Copy link
Copy Markdown
Member Author

@sanjayankur31 can you take a look?

@sanjayankur31
Copy link
Copy Markdown

Thanks for the quick fix @apdavison . Re-ran the tests and can confirm that this fixes the issue. 👍

@apdavison apdavison requested a review from a team May 13, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.14.4: failing test: neo/test/coretest/test_analogsignal.py::TestAnalogSignalArrayMethods::test__time_slice_deepcopy_data

2 participants