本文整理汇总了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