def test_parameters(self): p = pykrige_interface.pykrige_params(self.V) params = self.V.parameters self.assertAlmostEqual(p[0], params[1], places=4) self.assertAlmostEqual(p[1], params[0], places=4) self.assertAlmostEqual(p[2], params[2], places=4)
def test_parameters(self): if not PYKRIGE_AVAILABLE: # pragma: no cover return True p = pykrige_interface.pykrige_params(self.V) params = self.V.parameters self.assertAlmostEqual(p[0], params[1], places=4) self.assertAlmostEqual(p[1], params[0], places=4) self.assertAlmostEqual(p[2], params[2], places=4)
def test_as_kwargs(self): args = pykrige_interface.pykrige_as_kwargs(self.V) pars = pykrige_interface.pykrige_params(self.V) # test self.assertEqual(args['variogram_model'], 'custom') assert_array_almost_equal(pars, args['variogram_parameters']) xi = np.arange(1, 80) yi = self.V.transform(xi) assert_array_almost_equal( yi, args['variogram_function']([], xi), decimal=6 )
def test_as_kwargs(self): if not PYKRIGE_AVAILABLE: # pragma: no cover return True args = pykrige_interface.pykrige_as_kwargs(self.V) pars = pykrige_interface.pykrige_params(self.V) # test self.assertEqual(args['variogram_model'], 'custom') assert_array_almost_equal(pars, args['variogram_parameters']) xi = np.arange(1, 80) yi = self.V.transform(xi) assert_array_almost_equal(yi, args['variogram_function']([], xi), decimal=6)