Example #1
0
 def test_empty_range(self):
     mds = Path([], kdims=['x', 'y'], datatype=[self.datatype])
     self.assertIs(mds.interface, self.interface)
     x0, x1 = mds.range(0)
     self.assertFalse(np.isfinite(x0))
     self.assertFalse(np.isfinite(x0))
     y0, y1 = mds.range(1)
     self.assertFalse(np.isfinite(y0))
     self.assertFalse(np.isfinite(y1))
 def test_multi_array_range(self):
     arrays = [
         np.column_stack([np.arange(i, i + 2),
                          np.arange(i, i + 2)]) for i in range(2)
     ]
     mds = Path(arrays, kdims=['x', 'y'], datatype=['multitabular'])
     self.assertEqual(mds.range(0), (0, 2))
 def test_array_range(self):
     arrays = [
         np.column_stack([np.arange(i, i + 2),
                          np.arange(i, i + 2)]) for i in range(2)
     ]
     mds = Path(arrays, kdims=['x', 'y'], datatype=[self.datatype])
     self.assertIs(mds.interface, self.interface)
     self.assertEqual(mds.range(0), (0, 2))
 def test_multi_empty_range(self):
     mds = Path([], kdims=['x', 'y'], datatype=['multitabular'])
     low, high = mds.range(0)
     self.assertFalse(np.isfinite(np.NaN))
     self.assertFalse(np.isfinite(np.NaN))
 def test_multi_empty_range(self):
     mds = Path([], kdims=['x', 'y'], datatype=['multitabular'])
     low, high = mds.range(0)
     self.assertFalse(np.isfinite(np.NaN))
     self.assertFalse(np.isfinite(np.NaN))
 def test_multi_array_range(self):
     arrays = [np.column_stack([np.arange(i, i+2), np.arange(i, i+2)]) for i in range(2)]
     mds = Path(arrays, kdims=['x', 'y'], datatype=['multitabular'])
     self.assertEqual(mds.range(0), (0, 2))