Skip to content

Commit

Permalink
Fix file_pattern param (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Mar 13, 2021
1 parent 76a78a2 commit ab716dd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions geoviews/operation/regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ def _get_regridder(self, element):

x_range = str(tuple('%.3f' % r for r in x_range)).replace("'", '')
y_range = str(tuple('%.3f' % r for r in y_range)).replace("'", '')
filename = self.file_pattern.format(method=self.p.interpolation,
width=width, height=height,
x_range=x_range, y_range=y_range)
filename = self.p.file_pattern.format(
method=self.p.interpolation, width=width, height=height,
x_range=x_range, y_range=y_range
)
reuse_weights = os.path.isfile(os.path.abspath(filename))
save_filename = filename if self.p.save_weights or reuse_weights else None
regridder = xe.Regridder(ds, ds_out, self.p.interpolation,
Expand Down

0 comments on commit ab716dd

Please sign in to comment.