Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Catch specgram warnings during tests #7985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 6, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Restore code coverage (second attempt).
  • Loading branch information
DietBru committed Feb 6, 2017
commit 850bb2eceff070c8ca1e4509c1cab50e839307e2
12 changes: 12 additions & 0 deletions 12 lib/matplotlib/tests/test_mlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,18 @@ def test_csd(self):
assert_allclose(fsp, freqs, atol=1e-06)
assert spec.shape == freqs.shape

def test_csd_padding(self):
"""Test zero padding of csd(). """
if self.NFFT_density is None: # for derived classes
return
sargs = dict(x=self.y, y=self.y+1, Fs=self.Fs, window=mlab.window_none,
sides=self.sides)

spec0, _ = mlab.csd(NFFT=self.NFFT_density, **sargs)
spec1, _ = mlab.csd(NFFT=self.NFFT_density*2, **sargs)
assert_almost_equal(np.sum(np.conjugate(spec0)*spec0).real,
np.sum(np.conjugate(spec1/2)*spec1/2).real)

def test_psd(self):
freqs = self.freqs_density
spec, fsp = mlab.psd(x=self.y,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.