Did I find the right examples for you? yes no

# scipy.signal._peak_finding._identify_ridge_lines

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

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])

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])