Skip to content

Commit

Permalink
pandas...
Browse files Browse the repository at this point in the history
  • Loading branch information
mullenkamp committed Nov 6, 2024
1 parent f835fbb commit c307c38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eto/param_est.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def param_est(self, df, freq='D', z_msl=None, lat=None, lon=None, TZ_lon=None, z

####################################
##### Set up the DataFrame and estimated values series
new_cols = met_names[~np.in1d(met_names, df.columns)]
new_cols = met_names[~np.isin(met_names, df.columns)]
new_df = pd.DataFrame(np.nan, index=df.index, columns=new_cols)
self.ts_param = pd.concat([df, new_df], axis=1).copy()

Expand Down
8 changes: 4 additions & 4 deletions eto/tests/test_eto.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@


def test_eto_fao_daily():
et1 = ETo(tsdata, 'D', z_msl, lat, lon, TZ_lon)
et1 = ETo(tsdata, 'd', z_msl, lat, lon, TZ_lon)
eto1 = et1.eto_fao().sum()
res1 = tsresults['ETo_FAO_mm'].sum()

assert eto1 == res1

et1 = ETo(tsdata, 'D', z_msl, lat, lon, TZ_lon)
et1 = ETo(tsdata, 'd', z_msl, lat, lon, TZ_lon)

def test_eto_har_daily():
eto2 = et1.eto_hargreaves().sum()
Expand All @@ -52,8 +52,8 @@ def test_eto_har_daily():

def test_eto_fao_hourly():
tsdata2 = et1.ts_param[['R_s', 'T_mean', 'e_a']]
tsdata3 = et1.tsreg(tsdata2, 'H', 'time')
et2 = ETo(tsdata3, 'H', z_msl, lat, lon, TZ_lon)
tsdata3 = et1.tsreg(tsdata2, 'h', 'time')
et2 = ETo(tsdata3, 'h', z_msl, lat, lon, TZ_lon)
eto3 = et2.eto_fao().sum()

res1 = tsresults['ETo_FAO_mm'].sum()
Expand Down

0 comments on commit c307c38

Please sign in to comment.