Example #1
0
 def test_count_nonzero_numpy_func(self):
     q = [1, 0, 5, 6, 0, 9] * self.ureg.m
     self.assertEqual(np.count_nonzero(q), 4)
Example #2
0
 def test_count_nonzero_numpy_func(self):
     q = [1, 0, 5, 6, 0, 9] * self.ureg.m
     assert np.count_nonzero(q) == 4