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

Method check_freqs

lib/matplotlib/tests/test_mlab.py:358–365  ·  view source on GitHub ↗
(self, vals, targfreqs, resfreqs, fstims)

Source from the content-addressed store, hash-verified

356 cls.NFFT_density_real = NFFT_density_real
357
358 def check_freqs(self, vals, targfreqs, resfreqs, fstims):
359 assert resfreqs.argmin() == 0
360 assert resfreqs.argmax() == len(resfreqs)-1
361 assert_allclose(resfreqs, targfreqs, atol=1e-06)
362 for fstim in fstims:
363 i = np.abs(resfreqs - fstim).argmin()
364 assert vals[i] > vals[i+2]
365 assert vals[i] > vals[i-2]
366
367 def check_maxfreq(self, spec, fsp, fstims):
368 # skip the test if there are no frequencies

Callers 3

test_psdMethod · 0.95
test_spectrumMethod · 0.95
test_specgramMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected