def test_nested_list(self): """ Test the VIC weighting method with a nested list. """ self.assertAlmostEqualArrays( vic(get_matrix01()), np.array(get_vector24(), dtype=np.float64), )
def test_abspearson_linear(self): """ Test the VIC.AbsPearson weighting method with a linear association. """ self.assertAlmostEqualArrays( vic(np.array(get_matrix01(), dtype=np.float64), "AbsPearson"), np.array(get_vector26(), dtype=np.float64), )
def test_float32(self): """ Test the VIC weighting method with a float32 NumPy array. """ self.assertAlmostEqualArrays( vic(np.array(get_matrix01(), dtype=np.float32)), np.array(get_vector24(), dtype=np.float64), )
def test_nonlinear(self): """ Test the VIC weighting method with a non-linear association. """ self.assertAlmostEqualArrays( vic(np.array(get_matrix02(), dtype=np.float64)), np.array(get_vector25(), dtype=np.float64), )
def test_dcor_linear(self): """ Test the VIC.dCor weighting method with a linear association. """ self.assertAlmostEqualArrays( vic(np.array(get_matrix01(), dtype=np.float64), "dCor"), np.array(get_vector24(), dtype=np.float64), )
def test_abspearson_nested_list(self): """ Test the VIC.AbsPearson weighting method with a nested list. """ self.assertAlmostEqualArrays( vic(get_matrix01(), "AbsPearson"), np.array(get_vector26(), dtype=np.float64), )
def test_abspearson_float32(self): """ Test the VIC.AbsPearson weighting method with a float32 NumPy array. """ self.assertAlmostEqualArrays( vic(np.array(get_matrix01(), dtype=np.float32), "AbsPearson"), np.array(get_vector26(), dtype=np.float64), )