本文整理匯總了Python中matplotlib.mlab.logspace方法的典型用法代碼示例。如果您正苦於以下問題:Python mlab.logspace方法的具體用法?Python mlab.logspace怎麽用?Python mlab.logspace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類matplotlib.mlab
的用法示例。
在下文中一共展示了mlab.logspace方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_logspace_tens
# 需要導入模塊: from matplotlib import mlab [as 別名]
# 或者: from matplotlib.mlab import logspace [as 別名]
def test_logspace_tens(self):
xmin = .01
xmax = 1000.
N = 6
res = mlab.logspace(xmin, xmax, N)
targ = np.logspace(np.log10(xmin), np.log10(xmax), N)
assert_allclose(targ, res)
示例2: test_logspace_primes
# 需要導入模塊: from matplotlib import mlab [as 別名]
# 或者: from matplotlib.mlab import logspace [as 別名]
def test_logspace_primes(self):
xmin = .03
xmax = 1313.
N = 7
res = mlab.logspace(xmin, xmax, N)
targ = np.logspace(np.log10(xmin), np.log10(xmax), N)
assert_allclose(targ, res)
示例3: test_logspace_none
# 需要導入模塊: from matplotlib import mlab [as 別名]
# 或者: from matplotlib.mlab import logspace [as 別名]
def test_logspace_none(self):
xmin = .03
xmax = 1313.
N = 0
res = mlab.logspace(xmin, xmax, N)
targ = np.logspace(np.log10(xmin), np.log10(xmax), N)
assert_array_equal(targ, res)
assert_equal(res.size, 0)
示例4: test_logspace_single
# 需要導入模塊: from matplotlib import mlab [as 別名]
# 或者: from matplotlib.mlab import logspace [as 別名]
def test_logspace_single(self):
xmin = .03
xmax = 1313.
N = 1
res = mlab.logspace(xmin, xmax, N)
targ = np.logspace(np.log10(xmin), np.log10(xmax), N)
assert_array_equal(targ, res)
assert_equal(res.size, 1)
示例5: test_logspace
# 需要導入模塊: from matplotlib import mlab [as 別名]
# 或者: from matplotlib.mlab import logspace [as 別名]
def test_logspace(xmin, xmax, N):
with pytest.warns(MatplotlibDeprecationWarning):
res = mlab.logspace(xmin, xmax, N)
targ = np.logspace(np.log10(xmin), np.log10(xmax), N)
assert_allclose(targ, res)
assert res.size == N