Skip to content

Commit

Permalink
bottleneck dependency for fast ffill operation, and others.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnb32 committed Aug 18, 2024
1 parent 9957800 commit 0f34e35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies = [
"sphinx>=7.0",
"tensorflow>2.4,<2.16",
"xarray>=2023.0",
"bottleneck>=1.3.5"
]

[project.optional-dependencies]
Expand Down
9 changes: 5 additions & 4 deletions sup3r/preprocessing/rasterizers/exo.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def get_cache_file(self, feature):
Returns
-------
cache_fp : str
Name of cache file. This is a netcdf files which will be saved with
:class:`Cacher` and loaded with :class:`LoaderNC`
Name of cache file. This is a netcdf file which will be saved with
:class:`~sup3r.preprocessing.cachers.Cacher` and loaded with
:class:`~sup3r.preprocessing.loaders.Loader`
"""
fn = f'exo_{feature}_{"_".join(map(str, self.input_handler.target))}_'
fn += f'{"x".join(map(str, self.input_handler.grid_shape))}_'
Expand Down Expand Up @@ -271,8 +272,8 @@ def data(self):
if Dimension.TIME not in data.dims:
data = data.expand_dims(**{Dimension.TIME: self.hr_shape[-1]})
data = data.reindex({Dimension.TIME: self.hr_time_index})
data = Sup3rX(data.ffill(Dimension.TIME))
return data
data = data.ffill(Dimension.TIME)
return Sup3rX(data.chunk('auto'))

def get_data(self):
"""Get a raster of source values corresponding to the
Expand Down

0 comments on commit 0f34e35

Please sign in to comment.