Skip to content

Conversation

slowjazz
Copy link

Decoding with PCodec is causing issues in upstream zarr because it's being expected to handle numpy arrays. It seems like the other codecs in this library perform input validation in their respective implementations and generally support numpy arrays as a buffer-like.

This PR:

  • calls ensure_bytes on the input type for PCodec.decode()
  • updates unit tests. the former check_encode_decode_array_to_bytes seems to be a more restrictive version of check_encode_decode_array.

ref: zarr-developers/zarr-python#3176

TODO:

  • Unit tests and/or doctests in docstrings
  • Tests pass locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • Docs build locally
  • GitHub Actions CI passes
  • Test coverage to 100% (Codecov passes)

@slowjazz slowjazz marked this pull request as ready for review June 27, 2025 21:48
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.

2 participants