Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions camels/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ def plot_overview(self, start, end):
plt.tight_layout()
plt.show()

def get_dates(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a docstring?

start = self.data.index[0] - timedelta(1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you add the timedelta here?

end = self.data.index[-1] + timedelta(1)

return start, end

class DataLoader:
"""
General DataLoader object providing access to batched sequences of
Expand Down
3 changes: 3 additions & 0 deletions camels/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ def data_loader(self,
return DataLoader(self,
batch_size,
shuffle=shuffle)

def get_dates(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be required because it is inherited from StreamflowDataset.

return super().get_dates()