示例#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)
示例#2
0
文件: test_numpy.py 项目: wiki01/pint
 def test_count_nonzero_numpy_func(self):
     q = [1, 0, 5, 6, 0, 9] * self.ureg.m
     assert np.count_nonzero(q) == 4