Skip to content

Commit

Permalink
Use pd.Index instead of deprecated pd.Float64Index (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Augspurger authored Mar 24, 2022
1 parent 1c6553a commit a1816bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stackstac/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,9 @@ def to_coords(

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

coords["x"] = xs
coords["y"] = ys
Expand Down

0 comments on commit a1816bc

Please sign in to comment.