Skip to content
This repository was archived by the owner on Apr 10, 2023. It is now read-only.

Support resize array whose shape has a dim = 0 #96

@martaiborra

Description

@martaiborra

For the moment, a resize of an array with original dimension = 0 (e.g. with original shape {3, 0, 5}) won't be supported to avoid dividing by 0 when updating the shapes. Zarr has the same behavior (see example below).
In a future, we should somehow support it.

import zarr

z = zarr.zeros(shape=(10000, 0), chunks=(1000, 0))
z.resize(20000, 0)  # ZeroDivisionError
z.resize(20000, 10) # ZeroDivisionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions