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

Method test_csd_padding

lib/matplotlib/tests/test_mlab.py:454–464  ·  view source on GitHub ↗

Test zero padding of csd().

(self)

Source from the content-addressed store, hash-verified

452 assert spec.shape == freqs.shape
453
454 def test_csd_padding(self):
455 """Test zero padding of csd()."""
456 if self.NFFT_density is None: # for derived classes
457 return
458 sargs = dict(x=self.y, y=self.y+1, Fs=self.Fs, window=mlab.window_none,
459 sides=self.sides)
460
461 spec0, _ = mlab.csd(NFFT=self.NFFT_density, **sargs)
462 spec1, _ = mlab.csd(NFFT=self.NFFT_density*2, **sargs)
463 assert_almost_equal(np.sum(np.conjugate(spec0)*spec0).real,
464 np.sum(np.conjugate(spec1/2)*spec1/2).real)
465
466 def test_psd(self):
467 freqs = self.freqs_density

Callers

nothing calls this directly

Calls 2

csdMethod · 0.80
conjugateMethod · 0.80

Tested by

no test coverage detected