Skip to content

is dot syntax gone now? #2991

Closed
Closed
@christine-e-smit

Description

@christine-e-smit

Zarr version

v3.0.6

Numcodecs version

0.15.1

Python Version

3.13.3

Operating System

M<ac

Installation

using conda

Description

I don't actually know what you call this, but I'm calling it dot syntax for accessing arrays. With zarr version 2.18.4, I can do the following:

import zarr
import numpy as np
z = zarr.open("two.zarr",mode="w")
d = z.create_dataset("d",shape=(2),dtype=np.int32)
# this works!
z.d

But with zarr version 3.0.6, the following throws an exception:

import zarr
import numpy as np
z = zarr.open("three.zarr",mode="w")
d = z.create_array("d",shape=(2),dtype=np.int32)
# this now throws the exception "AttributeError: 'Group' object has no attribute 'd'"
z.d

Is this expected? Unexpected? I didn't see anything in the 3.0 Migration Guide, but it wouldn't surprise me if I missed something.

Steps to reproduce

import zarr
import numpy as np
z = zarr.open("three.zarr",mode="w")
d = z.create_array("d",shape=(2),dtype=np.int32)
# this now throws the exception "AttributeError: 'Group' object has no attribute 'd'"
z.d

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    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