Python matplotlib.mlab.logspace() Examples

The following are 11 code examples of matplotlib.mlab.logspace(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module matplotlib.mlab , or try the search function .
Example #1
Source File: test_mlab.py    From neural-network-animation with MIT License 5 votes vote down vote up
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) 
Example #2
Source File: test_mlab.py    From neural-network-animation with MIT License 5 votes vote down vote up
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) 
Example #3
Source File: test_mlab.py    From neural-network-animation with MIT License 5 votes vote down vote up
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) 
Example #4
Source File: test_mlab.py    From neural-network-animation with MIT License 5 votes vote down vote up
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) 
Example #5
Source File: test_mlab.py    From python3_ios with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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 
Example #6
Source File: test_mlab.py    From ImageFusion with MIT License 5 votes vote down vote up
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) 
Example #7
Source File: test_mlab.py    From ImageFusion with MIT License 5 votes vote down vote up
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) 
Example #8
Source File: test_mlab.py    From ImageFusion with MIT License 5 votes vote down vote up
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) 
Example #9
Source File: test_mlab.py    From ImageFusion with MIT License 5 votes vote down vote up
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) 
Example #10
Source File: test_mlab.py    From coffeegrindsize with MIT License 5 votes vote down vote up
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 
Example #11
Source File: test_mlab.py    From twitter-stock-recommendation with MIT License 5 votes vote down vote up
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