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

Method test_detrend_linear

lib/matplotlib/tests/test_mlab.py:135–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

133 mlab.detrend_mean(signal, **kwargs)
134
135 def test_detrend_linear(self):
136 # 0D.
137 assert mlab.detrend_linear(0.) == 0.
138 assert mlab.detrend_linear(5.5) == 0.
139 assert mlab.detrend(5.5, key="linear") == 0.
140 assert mlab.detrend(5.5, key=mlab.detrend_linear) == 0.
141 for sig in [ # 1D.
142 self.sig_off,
143 self.sig_slope,
144 self.sig_slope + self.sig_off,
145 ]:
146 self.allclose(mlab.detrend_linear(sig), self.sig_zeros)
147
148 def test_detrend_str_linear_1d(self):
149 input = self.sig_slope + self.sig_off

Callers

nothing calls this directly

Calls 1

allcloseMethod · 0.95

Tested by

no test coverage detected