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

Commit 9560c12

Browse files
debug
1 parent b1059ce commit 9560c12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ocf_datapipes/training/common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,10 @@ def fill_nans_in_arrays(
472472
for k, v in batch.items():
473473
if isinstance(v, np.ndarray) and np.issubdtype(v.dtype, np.number):
474474
if np.isnan(v).any():
475+
logger.info(k)
475476
_filled_keys.update({f"{_key_prefix}{k}"})
476-
# batch[k] = np.nan_to_num(v, copy=True, nan=0.0)
477-
np.nan_to_num(v, copy=False, nan=0.0)
477+
logger.info('filling nans')
478+
batch[k] = np.nan_to_num(v, copy=True, nan=0.0)
478479

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

0 commit comments

Comments
 (0)