Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/mpifield/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from typing import TYPE_CHECKING, Any

import cunumpy as xp
import numpy as np

if TYPE_CHECKING:
Expand Down Expand Up @@ -74,7 +75,8 @@ def evaluate_field(
# Collective under MPI: every rank gathers the global field.
data = np.asarray(field.to_numpy())
grid_points = [
np.asarray(points, dtype=float) for points in field.get_grid_points()
np.asarray(xp.to_numpy(points), dtype=float)
for points in field.get_grid_points()
]
lower = [float(bound) for bound in field.lower_bound]
upper = [float(bound) for bound in field.upper_bound]
Expand Down
Loading