def test_line_intersection(self):
     data = self.collagen
     x = getx(data)
     sort = np.argsort(x)
     x = x[sort]
     ys = data.X[:, sort]
     boola = intersect_curves(x, ys, np.array([0, 1.15]), np.array([3000, 1.15]))
     intc = np.flatnonzero(boola)
     np.testing.assert_equal(intc, [191, 635, 638, 650, 712, 716, 717, 726])
Example #2
0
 def test_line_intersection(self):
     data = self.collagen
     x = getx(data)
     sort = np.argsort(x)
     x = x[sort]
     ys = data.X[:, sort]
     boola = intersect_curves(x, ys, np.array([0, 1.15]), np.array([3000, 1.15]))
     intc = np.flatnonzero(boola)
     np.testing.assert_equal(intc, [191, 635, 638, 650, 712, 716, 717, 726])