Example #1
0
 def test_pow_ivar(self, ivar, value, power, expected):
     ivar = Map._pow_ivar(ivar, value, power)
     ivar[np.isnan(ivar)] = 0
     ivar[np.isinf(ivar)] = 0
     assert ivar == pytest.approx(expected)
Example #2
0
 def test_pow_ivar_none(self, power):
     assert Map._pow_ivar(None, np.arange(4),
                          power) == pytest.approx(np.zeros(4))
Example #3
0
 def test_pow_ivar(self, ivar, value, power, expected):
     assert pytest.approx(Map._pow_ivar(ivar, value, power), expected)