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

Method test_spectrum

lib/matplotlib/tests/test_mlab.py:679–688  ·  view source on GitHub ↗
(self, kind)

Source from the content-addressed store, hash-verified

677 @pytest.mark.parametrize(
678 "kind", ["complex", "magnitude", "angle", "phase"])
679 def test_spectrum(self, kind):
680 freqs = self.freqs_spectrum
681 spec, fsp = getattr(mlab, f"{kind}_spectrum")(
682 x=self.y,
683 Fs=self.Fs, sides=self.sides, pad_to=self.pad_to_spectrum)
684 assert_allclose(fsp, freqs, atol=1e-06)
685 assert spec.shape == freqs.shape
686 if kind == "magnitude":
687 self.check_maxfreq(spec, fsp, self.fstims)
688 self.check_freqs(spec, freqs, fsp, self.fstims)
689
690 @pytest.mark.parametrize(
691 'kwargs',

Callers

nothing calls this directly

Calls 2

check_maxfreqMethod · 0.95
check_freqsMethod · 0.95

Tested by

no test coverage detected