Skip to content

Commit a1816bc

Browse files
author
Tom Augspurger
authored
Use pd.Index instead of deprecated pd.Float64Index (#143)
1 parent 1c6553a commit a1816bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stackstac/prepare.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,9 @@ def to_coords(
410410

411411
height, width = spec.shape
412412
# Wish pandas had an RangeIndex that supported floats...
413-
xs = pd.Float64Index(np.linspace(minx, maxx, width, endpoint=False))
414-
ys = pd.Float64Index(np.linspace(maxy, miny, height, endpoint=False))
413+
# https://github.com/pandas-dev/pandas/issues/46484
414+
xs = pd.Index(np.linspace(minx, maxx, width, endpoint=False), dtype="float64")
415+
ys = pd.Index(np.linspace(maxy, miny, height, endpoint=False), dtype="float64")
415416

416417
coords["x"] = xs
417418
coords["y"] = ys

0 commit comments

Comments
 (0)