Beispiel #1
0
 def test_asarray(self):
     x = np.linspace(0, 5)
     y = x**2
     cs = CoordString(np.c_[x, y])
     arr = cs.asarray()
     self.assertTrue(np.all(arr == np.c_[x, y]))
     return
Beispiel #2
0
 def test_asarray_empty(self):
     cs = CoordString([])
     arr = cs.asarray()
     self.assertTrue(np.all(arr == np.array([[]], dtype=np.float64)))