예제 #1
0
 def test_ones(self):
     data = np.ones((100, 100)) * 10
     am = tesla_to_am(data)
     assert data.shape == am.shape
     assert (data != 0.0).all()
예제 #2
0
 def test_known_value(self):
     tesla = 1
     am = tesla_to_am(tesla)
     assert np.isclose(am, 795774.7155, rtol=1e-4)
예제 #3
0
 def test_zero(self):
     data = np.zeros((100, 100))
     am = tesla_to_am(data)
     assert data.shape == am.shape
     assert (data == 0.00).all()