本文整理汇总了Python中matplotlib.mlab.detrend_none方法的典型用法代码示例。如果您正苦于以下问题:Python mlab.detrend_none方法的具体用法?Python mlab.detrend_none怎么用?Python mlab.detrend_none使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.mlab
的用法示例。
在下文中一共展示了mlab.detrend_none方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_detrend_none_0D_zeros
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_0D_zeros(self):
input = 0.
targ = input
res = mlab.detrend_none(input)
assert_equal(input, targ)
示例2: test_detrend_none_0D_zeros_axis1
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_0D_zeros_axis1(self):
input = 0.
targ = input
res = mlab.detrend_none(input, axis=1)
assert_equal(input, targ)
示例3: test_detrend_detrend_none_0D_zeros
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_detrend_none_0D_zeros(self):
input = 0.
targ = input
res = mlab.detrend(input, key=mlab.detrend_none)
assert_equal(input, targ)
示例4: test_detrend_none_0D_off
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_0D_off(self):
input = 5.5
targ = input
res = mlab.detrend_none(input)
assert_equal(input, targ)
示例5: test_detrend_none_1D_off
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_1D_off(self):
input = self.sig_off
targ = input
res = mlab.detrend_none(input)
assert_array_equal(res, targ)
示例6: test_detrend_none_1D_base
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_1D_base(self):
input = self.sig_base
targ = input
res = mlab.detrend_none(input)
assert_array_equal(res, targ)
示例7: test_detrend_none_1D_base_slope_off_list
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_1D_base_slope_off_list(self):
input = self.sig_base + self.sig_slope + self.sig_off
targ = input.tolist()
res = mlab.detrend_none(input.tolist())
assert_equal(res, targ)
示例8: test_detrend_none_2D
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_2D(self):
arri = [self.sig_base,
self.sig_base + self.sig_off,
self.sig_base + self.sig_slope,
self.sig_base + self.sig_off + self.sig_slope]
input = np.vstack(arri)
targ = input
res = mlab.detrend_none(input)
assert_array_equal(res, targ)
示例9: test_detrend_none_2D_T
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_2D_T(self):
arri = [self.sig_base,
self.sig_base + self.sig_off,
self.sig_base + self.sig_slope,
self.sig_base + self.sig_off + self.sig_slope]
input = np.vstack(arri)
targ = input
res = mlab.detrend_none(input.T)
assert_array_equal(res.T, targ)
示例10: test_detrend_none_0D_zeros
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_0D_zeros(self):
input = 0.
targ = input
res = mlab.detrend_none(input)
assert input == targ
示例11: test_detrend_none_0D_zeros_axis1
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_0D_zeros_axis1(self):
input = 0.
targ = input
res = mlab.detrend_none(input, axis=1)
assert input == targ
示例12: test_detrend_detrend_none_0D_zeros
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_detrend_none_0D_zeros(self):
input = 0.
targ = input
res = mlab.detrend(input, key=mlab.detrend_none)
assert input == targ
示例13: test_detrend_none_0D_off
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_0D_off(self):
input = 5.5
targ = input
res = mlab.detrend_none(input)
assert input == targ
示例14: test_detrend_none_1D_base_slope_off_list
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_detrend_none_1D_base_slope_off_list(self):
input = self.sig_base + self.sig_slope + self.sig_off
targ = input.tolist()
res = mlab.detrend_none(input.tolist())
assert res == targ
示例15: test_psd_onesided_norm
# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_none [as 别名]
def test_psd_onesided_norm():
u = np.array([0, 1, 2, 3, 1, 2, 1])
dt = 1.0
Su = np.abs(np.fft.fft(u) * dt)**2 / (dt * u.size)
P, f = mlab.psd(u, NFFT=u.size, Fs=1/dt, window=mlab.window_none,
detrend=mlab.detrend_none, noverlap=0, pad_to=None,
scale_by_freq=None,
sides='onesided')
Su_1side = np.append([Su[0]], Su[1:4] + Su[4:][::-1])
assert_allclose(P, Su_1side, atol=1e-06)