Skip to content

default filters for v2 object dtype are wrong #2627

@d-v-b

Description

@d-v-b

this example does not work in main:

def test_x() -> None:
    array = create(
        store={},
        path='foo',
        dtype='O',
        zarr_format=2,
        shape=(3,)
        )
    array[:] = np.array(['a', 'b', 'c'], dtype='O')

The problem is caused because zarr chooses the wrong default filters for O dtype arrays -- zarr chooses VlenBytes, when it should be choosing VlenUTF8. Since the structure of the default codecs is likely to change soon, the fix should probably be made in the context of #2463

cc @dcherian

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions