Example #1
0
def test_nse_some_q_ts(read_obs, read_sim):
    ''' Use the DataFrame with only ones to test and a single 0'''
    nse = gof_python.nse(read_obs, read_sim)
    assert pytest.approx(nse, 0.001) == [-109.64]
Example #2
0
def test_nse_mean(obs_simple_1, sim_simple_1):
    ''' Check whether the we get zero if the simulation is exactly the mean of
    the observation.'''
    nse = gof_python.nse(obs_simple_1, sim_simple_1)
    assert nse == [0]
Example #3
0
def test_nse_is_nan(obs_simple, sim_simple):
    ''' Use the DataFrame with only ones to test'''
    nse = gof_python.nse(obs_simple, sim_simple)
    assert np.isnan(nse)
Example #4
0
def test_nse(obs_simple, sim_simple):
    ''' Use the DataFrame with only ones to test'''
    obs_simple[:4] = 100
    sim_simple[:4] = 100
    nse = gof_python.nse(obs_simple, sim_simple)
    assert nse == [1.0]
Example #5
0
def test_nse_some_zeros(obs_some_zeros, sim_some_zeros):
    ''' Use the DataFrame with only ones to test and a single 0'''
    nse = gof_python.nse(obs_some_zeros, sim_some_zeros)
    assert pytest.approx(nse, 0.001) == [-3.307692]