Skip to content

Commit

Permalink
cast roi boundary to float64
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariana Barzinpour committed Dec 2, 2024
1 parent 210ae22 commit 5da3ea1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions odc/geo/roi.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ def roi_boundary(roi: NormalizedROI, pts_per_side: int = 2) -> np.ndarray:
roi needs to be in the normalised form, i.e. no open-ended start/stop,
:returns:
``Nx2 <float32>`` array of ``X,Y`` points on the perimeter of the envelope defined by ``roi``
``Nx2 <float64>`` array of ``X,Y`` points on the perimeter of the envelope defined by ``roi``
.. seealso:: :py:func:`~odc.geo.roi.roi_normalise`
"""
yy, xx = roi
xx = np.linspace(xx.start, xx.stop, pts_per_side, dtype="float32")
yy = np.linspace(yy.start, yy.stop, pts_per_side, dtype="float32")
xx = np.linspace(xx.start, xx.stop, pts_per_side, dtype="float64")
yy = np.linspace(yy.start, yy.stop, pts_per_side, dtype="float64")

return polygon_path(xx, yy, closed=False).T

Expand Down

0 comments on commit 5da3ea1

Please sign in to comment.