Skip to content

Commit daea7c0

Browse files
committed
fix(tensorstore): Correctly determine size of nulls
1 parent 320452b commit daea7c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nwp_consumer/internal/entities/tensorstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def _calc_null_percentage(data: np.typing.NDArray[np.float32]) -> float:
335335
"to coordinate values in the dataset",
336336
)
337337
return 1.0
338-
return float(nulls.sum() / len(nulls))
338+
return float(nulls.sum() / np.prod(nulls.shape))
339339

340340
if "latitude" in store_da.dims:
341341
spatial_dims: list[str] = ["latitude", "longitude"]

0 commit comments

Comments
 (0)