Skip to content

Commit

Permalink
[ENH] Use numpy assert array equal in test_multitaper_cohere_perfect_…
Browse files Browse the repository at this point in the history
…cohere (NeuralEnsemble#573)

* use numpy assert_array_equal for unit test
* fix issue with element-wise multiplication of ndarrays and np.complex128 by casting to np.complex128
* skip unit test for numpy 1.25.0 and 1.25.1
  • Loading branch information
Moritz-Alexander-Kern committed Jul 12, 2023
1 parent af4a0a4 commit 4ea3c9a
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 107 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ venv/
env/
.pytest_cache/
**/*/__pycache__
*.vscode

# Compiled source #
###################
Expand Down
2 changes: 1 addition & 1 deletion elephant/spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ def welch_coherence(signal_i, signal_j, n_segments=8, len_segment=None,
>>> coherency.flatten()
array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
>>> phase_lag.flatten()
>>> phase_lag.flatten() # doctest: +SKIP
array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) * rad
"""
Expand Down

0 comments on commit 4ea3c9a

Please sign in to comment.