Skip to content

Commit 19b5c69

Browse files
committed
Cast to float
1 parent c8d4f91 commit 19b5c69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modelskill/model/grid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ def _extract_point(
170170
# TODO: avoid runtrip to pandas if possible (potential loss of metadata)
171171
if "z" in self.data.dims and z is not None:
172172
ds = self.data.interp(
173-
coords=dict(x=x, y=y, z=z), method=method # type: ignore
173+
coords=dict(x=float(x), y=float(y), z=float(z)), method=method # type: ignore
174174
)
175175
else:
176-
ds = self.data.interp(coords=dict(x=x, y=y), method=method) # type: ignore
176+
ds = self.data.interp(coords=dict(x=float(x), y=float(y)), method=method) # type: ignore
177177
# TODO: exclude aux cols in dropna
178178
df = ds.to_dataframe().drop(columns=["x", "y"]).dropna()
179179
if len(df) == 0:

0 commit comments

Comments
 (0)