zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

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

Open jhamman opened this issue 1 year ago • 1 comments

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

jhamman avatar Dec 20 '24 23:12 jhamman

Hello, I'd like to work on the project by fixing this issue. Can you assign this to me? Thanks

Riccardo231 avatar Dec 28 '24 20:12 Riccardo231

I'll have a go at fixing this one, as there has been no activity on it since last year. Do let me know if anyone is actively working on this though!

K-Meech avatar Aug 21 '25 09:08 K-Meech