Skip to content

chunks=False --> ZeroDivisionError #241

Closed
@MattKleinsmith

Description

@MattKleinsmith

Minimal, reproducible code sample, a copy-pastable example if possible

z = zarr.open_array('example.zarr', mode='w', shape=100, chunks=False, dtype='i8', fill_value=0)
z

Problem description

Result:

ZeroDivisionError

Expected:

Array((100,), int64, chunks=(100,), order=C)
  nbytes: 800; nbytes_stored: 291; ratio: 2.7; initialized: 0/1
  compressor: Blosc(cname='lz4', clevel=5, shuffle=1)
  store: DirectoryStore

Reason for expectation:

chunks : int or tuple of ints, optional
    Chunk shape. If True, will be guessed from `shape` and `dtype`. If
    False, will be set to `shape`, i.e., single chunk for the whole array.

https://github.com/zarr-developers/zarr/blob/master/zarr/creation.py#L27-L29

Version and installation information

zarr=2.1.4
numcodecs=0.5.3
python=3.6.3
Ubuntu 16.04 on Docker
Pip installation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions