Skip to content

Commit

Permalink
Default to not rescale coordinates in Linear/Cubic (#391)
Browse files Browse the repository at this point in the history
Rescaling can have problems and generate unintended outputs. Since Scipy
defaults to not rescaling, let's do that here as well.
  • Loading branch information
leouieda committed Nov 16, 2022
1 parent 7a4ad37 commit 31e49ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/gallery_src/cubic_gridder.py
Expand Up @@ -87,5 +87,5 @@
ax.plot(*coordinates, ".k", markersize=0.1, transform=crs)
# Use an utility function to setup the tick labels and the land feature
vd.datasets.setup_baja_bathymetry_map(ax)
ax.set_title("Linear gridding of bathymetry")
ax.set_title("Cubic gridding of bathymetry")
plt.show()
8 changes: 4 additions & 4 deletions verde/scipygridder.py
Expand Up @@ -124,7 +124,7 @@ class Linear(_BaseScipyGridder):
rescale : bool
If ``True``, rescale the data coordinates to [0, 1] range before
interpolation. Useful when coordinates vary greatly in scale. Default
is ``True``.
is ``False``.
Attributes
----------
Expand All @@ -137,7 +137,7 @@ class Linear(_BaseScipyGridder):
"""

def __init__(self, rescale=True):
def __init__(self, rescale=False):
super().__init__()
self.rescale = rescale

Expand All @@ -161,7 +161,7 @@ class Cubic(_BaseScipyGridder):
rescale : bool
If ``True``, rescale the data coordinates to [0, 1] range before
interpolation. Useful when coordinates vary greatly in scale. Default
is ``True``.
is ``False``.
Attributes
----------
Expand All @@ -174,7 +174,7 @@ class Cubic(_BaseScipyGridder):
"""

def __init__(self, rescale=True):
def __init__(self, rescale=False):
super().__init__()
self.rescale = rescale

Expand Down

0 comments on commit 31e49ee

Please sign in to comment.