Did I find the right examples for you? yes no

All Samples(16)  |  Call(14)  |  Derive(0)  |  Import(2)

src/s/c/scipy-0.13.3/scipy/signal/tests/test_peak_finding.py   scipy(Download)
    assert_almost_equal, assert_array_equal, assert_array_almost_equal, \
    assert_raises, assert_
from scipy.signal._peak_finding import argrelmax, find_peaks_cwt, _identify_ridge_lines
from scipy.lib.six.moves import xrange
 
    def test_empty(self):
        test_matr = np.zeros([20, 100])
        lines = _identify_ridge_lines(test_matr, 2*np.ones(20), 1)
        assert_(len(lines) == 0)
 
    def test_minimal(self):
        test_matr = np.zeros([20, 100])
        test_matr[0, 10] = 1
        lines = _identify_ridge_lines(test_matr, 2*np.ones(20), 1)
        test_matr = np.zeros([20, 100])
        test_matr[0:2, 10] = 1
        lines = _identify_ridge_lines(test_matr, 2*np.ones(20), 1)
        assert_(len(lines) == 1)
 
        test_matr[line[0], line[1]] = 1
        max_distances = max(distances)*np.ones(20)
        identified_lines = _identify_ridge_lines(test_matr, max_distances, max(gaps) + 1)
        assert_array_equal(identified_lines, [line])
 

src/s/c/scipy-HEAD/scipy/signal/tests/test_peak_finding.py   scipy(Download)
    assert_almost_equal, assert_array_equal, assert_array_almost_equal, \
    assert_raises, assert_
from scipy.signal._peak_finding import argrelmax, find_peaks_cwt, _identify_ridge_lines
 
 
    def test_empty(self):
        test_matr = np.zeros([20, 100])
        lines = _identify_ridge_lines(test_matr, 2*np.ones(20), 1)
        assert_(len(lines) == 0)
 
    def test_minimal(self):
        test_matr = np.zeros([20, 100])
        test_matr[0, 10] = 1
        lines = _identify_ridge_lines(test_matr, 2*np.ones(20), 1)
        test_matr = np.zeros([20, 100])
        test_matr[0:2, 10] = 1
        lines = _identify_ridge_lines(test_matr, 2*np.ones(20), 1)
        assert_(len(lines) == 1)
 
        test_matr[line[0], line[1]] = 1
        max_distances = max(distances)*np.ones(20)
        identified_lines = _identify_ridge_lines(test_matr, max_distances, max(gaps) + 1)
        assert_array_equal(identified_lines, [line])