當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。