Skip to content

Silent failure when creating an array where there is an existing node #2582

@jhamman

Description

@jhamman

Zarr version

3.0.0b4.dev7+g122760fc.d20241213

Numcodecs version

0.14

Python Version

3.11

Operating System

Mac

Installation

hatch

Description

In the example below, I create a root group, then a child array (name foo). Then I create another child array (name foo/bar). The resulting tree only includes the first foo.

I would expect creating foo/bar to error because bar cannot have an array as a parent.

Steps to reproduce

import numpy as np
import zarr
root = zarr.group('data/example-12.zarr')
foo = root.create_array(name='foo', shape=(1000, 100), chunks=(10, 10), dtype='f4')
bar = root.create_array(name='foo/bar', shape=(100,), dtype='i4')
foo[:, :] = np.random.random((1000, 100))
bar[:] = np.arange(100)

root.tree()
/
└── foo (1000, 100) float32

Additional output

No response

Metadata

Metadata

Assignees

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