当前位置: 首页>>代码示例>>Python>>正文


Python mlab.detrend_none方法代码示例

本文整理汇总了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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:11,代码来源:test_mlab.py

示例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) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:11,代码来源:test_mlab.py

示例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 
开发者ID:holzschu,项目名称:python3_ios,代码行数:7,代码来源:test_mlab.py

示例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 
开发者ID:holzschu,项目名称:python3_ios,代码行数:7,代码来源:test_mlab.py

示例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 
开发者ID:holzschu,项目名称:python3_ios,代码行数:7,代码来源:test_mlab.py

示例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 
开发者ID:holzschu,项目名称:python3_ios,代码行数:7,代码来源:test_mlab.py

示例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 
开发者ID:holzschu,项目名称:python3_ios,代码行数:7,代码来源:test_mlab.py

示例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) 
开发者ID:holzschu,项目名称:python3_ios,代码行数:12,代码来源:test_mlab.py


注:本文中的matplotlib.mlab.detrend_none方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。