Skip to content

Commit 30f017f

Browse files
authored
Merge pull request AntSimi#12 from koldunovn/coord_fix
convert coordinates to floats
2 parents ac0188b + 10507e5 commit 30f017f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/py_eddy_tracker/dataset/grid.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ def setup_coordinates(self):
424424
x_name, y_name = self.coordinates
425425
if self.is_centered:
426426
logger.info("Grid center")
427-
self.x_c = self.vars[x_name]
428-
self.y_c = self.vars[y_name]
427+
self.x_c = self.vars[x_name].astype('float64')
428+
self.y_c = self.vars[y_name].astype('float64')
429429

430430
self.x_bounds = concatenate((self.x_c, (2 * self.x_c[-1] - self.x_c[-2],)))
431431
self.y_bounds = concatenate((self.y_c, (2 * self.y_c[-1] - self.y_c[-2],)))
@@ -437,8 +437,8 @@ def setup_coordinates(self):
437437
self.y_bounds[-1] -= d_y[-1] / 2
438438

439439
else:
440-
self.x_bounds = self.vars[x_name]
441-
self.y_bounds = self.vars[y_name]
440+
self.x_bounds = self.vars[x_name].astype('float64')
441+
self.y_bounds = self.vars[y_name].astype('float64')
442442

443443
if len(self.x_dim) == 1:
444444
self.x_c = self.x_bounds.copy()

0 commit comments

Comments
 (0)