zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

copy string arrays

Open vladpopovici opened this issue 3 years ago • 4 comments

Hello,

When using zarr.copy(...) to copy string arrays, a warning is raised:

FutureWarning: missing object_codec for object array; this will raise a ValueError in version 3.0

What is the proper call for zarr.copy to avoid this warning and to write future-proof code?

Thanks a lot! V.

  • Value of zarr.__version__: 2.10.1
  • Value of numcodecs.__version__: 0.9.1
  • Version of Python interpreter: 3.9.7
  • Operating system (Linux/Windows/Mac): Linux
  • How Zarr was installed (e.g., "using pip into virtual environment", or "using conda"): conda

vladpopovici avatar Nov 26 '21 09:11 vladpopovici

Hi @vladpopovici. It's a good point. @abergou also pointed it out in https://github.com/zarr-developers/zarr-python/issues/552. Still open to solutions.

joshmoore avatar Nov 26 '21 10:11 joshmoore

@joshmoore, I have the same issue with object arrays (copying hdf5 to zarr), however it even does not allow to do it with current zarr version. Could you tell me if there is a workaround?

aliaksei-chareshneu avatar Feb 02 '22 08:02 aliaksei-chareshneu

Not that I know of, sorry.

joshmoore avatar Feb 03 '22 07:02 joshmoore

@aliaksei-chareshneu and I discussed their use case in issue ( https://github.com/zarr-developers/zarr-python/issues/954 ). Believe that resolved the issue

jakirkham avatar Feb 09 '22 20:02 jakirkham

Closing in favor of the mentioned issues as well as #691.

joshmoore avatar Dec 21 '22 07:12 joshmoore