Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 37aeb6e

Browse files
Nans updated in place
1 parent 47e336b commit 37aeb6e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ocf_datapipes/training/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ def fill_nans_in_arrays(
474474
if np.isnan(v).any():
475475
_filled_keys.update({f"{_key_prefix}{k}"})
476476
batch[k] = np.nan_to_num(v, copy=True, nan=0.0)
477+
np.nan_to_num(v, copy=False, nan=0.0)
477478

478479
# Recursion is included to reach NWP arrays in subdict
479480
elif isinstance(v, dict):

0 commit comments

Comments
 (0)