예제 #1
0
 def test_booltype_array(self):
     x = np.array([1, 0, 1, 1, 0], dtype="i1")
     bx = conventions.BoolTypeArray(x)
     assert bx.dtype == np.bool
     assert_array_equal(
         bx, np.array([True, False, True, True, False], dtype=np.bool)
     )
예제 #2
0
 def test_booltype_array(self):
     x = np.array([1, 0, 1, 1, 0], dtype='i1')
     bx = conventions.BoolTypeArray(x)
     self.assertEqual(bx.dtype, np.bool)
     self.assertArrayEqual(
         bx, np.array([True, False, True, True, False], dtype=np.bool))