Skip to content

Conversation

dcherian
Copy link
Contributor

@dcherian dcherian commented Oct 22, 2024

We were not replacing NaNs and Infs with the string versions.

[Description of PR]

TODO:

  • Add unit tests and/or doctests in docstrings
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

We were not replacing NaNs and Infs with the string versions.
store = MemoryStore({}, mode="w")
Array.create(store=store, shape=(1,), dtype=np.complex64, fill_value=fill_value)
content = await store.get("zarr.json", prototype=default_buffer_prototype())
assert content is not None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't we get an error later in the test if content is None? or is this just for mypy (in which case I'd prefer explicitly ignore the type error)?

Copy link
Contributor Author

@dcherian dcherian Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for mypy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that store.get can return None is an unfortunate part of our store API that we need to fix IMO...

@dcherian dcherian merged commit bc588a7 into zarr-developers:main Oct 23, 2024
28 checks passed
@dcherian dcherian deleted the fix-complex-fill-value branch November 2, 2024 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants