Skip to content

DOC: Array.resize examples are outdated #3503

@ziw-liu

Description

@ziw-liu

Describe the issue linked to the documentation

Examples do not match the signature:

Examples
--------
>>> import zarr
>>> z = zarr.zeros(shape=(10000, 10000),
>>> chunk_shape=(1000, 1000),
>>> dtype="i4",)
>>> z.shape
(10000, 10000)
>>> z = z.resize(20000, 1000)
>>> z.shape
(20000, 1000)
>>> z2 = z.resize(50, 50)
>>> z.shape
(20000, 1000)
>>> z2.shape
(50, 50)

Suggested fix for documentation

Pass shape arguments as tuples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements to the documentationhelp wantedIssue could use help from someone with familiarity on the topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions