Skip to content

Commit

Permalink
changes to solve deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoAcunaEspinoza committed Feb 22, 2024
1 parent cda3e3e commit 5ff7a1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LSTM/LSTM_CAMELS_GB.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
" \n",
" # create a list that contain the indexes (basin, day) of the valid samples\n",
" valid_samples = np.argwhere(flag == 1)\n",
" self.valid_entities.extend([(id, int(f)) for f in valid_samples])\n",
" self.valid_entities.extend([(id, int(f[0])) for f in valid_samples])\n",
" \n",
" # only store data if this basin has at least one valid sample in the given period\n",
" if valid_samples.size>0:\n",
Expand Down
2 changes: 1 addition & 1 deletion LSTM/LSTM_CAMELS_US.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
" \n",
" # create a list that contain the indexes (basin, day) of the valid samples\n",
" valid_samples = np.argwhere(flag == 1)\n",
" self.valid_entities.extend([(id, int(f)) for f in valid_samples])\n",
" self.valid_entities.extend([(id, int(f[0])) for f in valid_samples])\n",
" \n",
" # only store data if this basin has at least one valid sample in the given period\n",
" if valid_samples.size>0:\n",
Expand Down
2 changes: 1 addition & 1 deletion aux_functions/functions_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _load_discharge(path_data: str, catch_id: str, area: int)-> pd.DataFrame:
file_path = file_path[0]

col_names = ['basin', 'Year', 'Mnth', 'Day', 'QObs', 'flag']
df = pd.read_csv(file_path, sep='\s+', header=None, names=col_names)
df = pd.read_csv(file_path, sep=r'\s+', header=None, names=col_names)
df["date"] = pd.to_datetime(df.Year.map(str) + "/" + df.Mnth.map(str) + "/" + df.Day.map(str), format="%Y/%m/%d")
df = df.set_index("date")

Expand Down

0 comments on commit 5ff7a1e

Please sign in to comment.