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


Python mlab.detrend_mean方法代码示例

本文整理汇总了Python中matplotlib.mlab.detrend_mean方法的典型用法代码示例。如果您正苦于以下问题:Python mlab.detrend_mean方法的具体用法?Python mlab.detrend_mean怎么用?Python mlab.detrend_mean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.mlab的用法示例。


在下文中一共展示了mlab.detrend_mean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_detrend_mean_0D_zeros

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_0D_zeros(self):
        input = 0.
        targ = 0.
        res = mlab.detrend_mean(input)
        assert_almost_equal(res, targ) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例2: test_detrend_detrend_mean_0D_zeros

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_detrend_mean_0D_zeros(self):
        input = 0.
        targ = 0.
        res = mlab.detrend(input, key=mlab.detrend_mean)
        assert_almost_equal(res, targ) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例3: test_detrend_mean_0D_off

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_0D_off(self):
        input = 5.5
        targ = 0.
        res = mlab.detrend_mean(input)
        assert_almost_equal(res, targ) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例4: test_detrend_detrend_mean_0D_off

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_detrend_mean_0D_off(self):
        input = 5.5
        targ = 0.
        res = mlab.detrend(input, key=mlab.detrend_mean)
        assert_almost_equal(res, targ) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例5: test_detrend_mean_1D_zeros

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_1D_zeros(self):
        input = self.sig_zeros
        targ = self.sig_zeros
        res = mlab.detrend_mean(input)
        assert_allclose(res, targ, atol=self.atol) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例6: test_detrend_mean_1D_base_off

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_1D_base_off(self):
        input = self.sig_base + self.sig_off
        targ = self.sig_base
        res = mlab.detrend_mean(input)
        assert_allclose(res, targ, atol=self.atol) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例7: test_detrend_mean_1D_base_slope

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_1D_base_slope(self):
        input = self.sig_base + self.sig_slope
        targ = self.sig_base + self.sig_slope_mean
        res = mlab.detrend_mean(input)
        assert_allclose(res, targ, atol=self.atol) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例8: test_detrend_mean_1D_base_slope_off

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_1D_base_slope_off(self):
        input = self.sig_base + self.sig_slope + self.sig_off
        targ = self.sig_base + self.sig_slope_mean
        res = mlab.detrend_mean(input)
        assert_allclose(res, targ, atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例9: test_detrend_mean_1D_base_slope_off_axis0

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_1D_base_slope_off_axis0(self):
        input = self.sig_base + self.sig_slope + self.sig_off
        targ = self.sig_base + self.sig_slope_mean
        res = mlab.detrend_mean(input, axis=0)
        assert_allclose(res, targ, atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例10: test_detrend_mean_1D_base_slope_off_list

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_1D_base_slope_off_list(self):
        input = self.sig_base + self.sig_slope + self.sig_off
        targ = self.sig_base + self.sig_slope_mean
        res = mlab.detrend_mean(input.tolist())
        assert_allclose(res, targ, atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:7,代码来源:test_mlab.py

示例11: test_detrend_mean_2D_default

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_2D_default(self):
        arri = [self.sig_off,
                self.sig_base + self.sig_off]
        arrt = [self.sig_zeros,
                self.sig_base]
        input = np.vstack(arri)
        targ = np.vstack(arrt)
        res = mlab.detrend_mean(input)
        assert_allclose(res, targ, atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:11,代码来源:test_mlab.py

示例12: test_detrend_mean_2D_none

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_2D_none(self):
        arri = [self.sig_off,
                self.sig_base + self.sig_off]
        arrt = [self.sig_zeros,
                self.sig_base]
        input = np.vstack(arri)
        targ = np.vstack(arrt)
        res = mlab.detrend_mean(input, axis=None)
        assert_allclose(res, targ,
                        atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:12,代码来源:test_mlab.py

示例13: test_detrend_mean_2D_none_T

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_2D_none_T(self):
        arri = [self.sig_off,
                self.sig_base + self.sig_off]
        arrt = [self.sig_zeros,
                self.sig_base]
        input = np.vstack(arri).T
        targ = np.vstack(arrt)
        res = mlab.detrend_mean(input, axis=None)
        assert_allclose(res.T, targ,
                        atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:12,代码来源:test_mlab.py

示例14: test_detrend_mean_2D_axis0

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_2D_axis0(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]
        arrt = [self.sig_base,
                self.sig_base,
                self.sig_base + self.sig_slope_mean,
                self.sig_base + self.sig_slope_mean]
        input = np.vstack(arri).T
        targ = np.vstack(arrt).T
        res = mlab.detrend_mean(input, axis=0)
        assert_allclose(res, targ,
                        atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:16,代码来源:test_mlab.py

示例15: test_detrend_mean_2D_axis1

# 需要导入模块: from matplotlib import mlab [as 别名]
# 或者: from matplotlib.mlab import detrend_mean [as 别名]
def test_detrend_mean_2D_axis1(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]
        arrt = [self.sig_base,
                self.sig_base,
                self.sig_base + self.sig_slope_mean,
                self.sig_base + self.sig_slope_mean]
        input = np.vstack(arri)
        targ = np.vstack(arrt)
        res = mlab.detrend_mean(input, axis=1)
        assert_allclose(res, targ,
                        atol=1e-08) 
开发者ID:miloharper,项目名称:neural-network-animation,代码行数:16,代码来源:test_mlab.py


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