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: 1 addition & 3 deletions src/zarr/core/dtype/npy/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,7 @@ def check_json_float_v2(data: JSON) -> TypeGuard[JSONFloatV2]:
Bool
True if the data is a float, False otherwise.
"""
if data == "NaN" or data == "Infinity" or data == "-Infinity":
return True
return isinstance(data, float | int)
return data in ("NaN", "Infinity", "-Infinity") or isinstance(data, float | int)


def check_json_float_v3(data: JSON) -> TypeGuard[JSONFloatV3]:
Expand Down
Loading