MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_cohere

Function test_cohere

lib/matplotlib/tests/test_mlab.py:812–822  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

810
811# extra test for cohere...
812def test_cohere():
813 N = 1024
814 np.random.seed(19680801)
815 x = np.random.randn(N)
816 # phase offset
817 y = np.roll(x, 20)
818 # high-freq roll-off
819 y = np.convolve(y, np.ones(20) / 20., mode='same')
820 cohsq, f = mlab.cohere(x, y, NFFT=256, Fs=2, noverlap=128)
821 assert_allclose(np.mean(cohsq), 0.837, atol=1.e-3)
822 assert np.isreal(np.mean(cohsq))
823
824
825# *****************************************************************

Callers

nothing calls this directly

Calls 1

cohereMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…