Repository navigation
Conversation
tools/compat runs seeded existing-API scenarios under this checkout and under a baseline commit or release, and reports every observable difference. Assisted-by: ClaudeCode:claude-opus-5-5
_ArrayIO is a value over an array's metadata, location, configuration, codec pipeline and chunk grid that holds the routines reading and writing it: selections, the repair of a stored document, resize and attribute updates. Array builds one from its AsyncArray for each operation and adopts a resize in place, so every holder of that AsyncArray sees it. An Array over a subclass of AsyncArray keeps going through the subclass. AsyncArray's leaf methods run on the same routines. Assisted-by: ClaudeCode:claude-opus-5-5
AsyncArrayIO holds the routines that read and write an array; it repairs nothing implicitly and refuses chunk writes under metadata whose stored document needs a repair that moves chunks until store_repair has stored it. ArrayIO runs each AsyncArrayIO operation on the event loop its SyncContext returns. AsyncArray builds an AsyncArrayIO from its fields for each operation, and Array goes through AsyncArray as before, so hooks on AsyncArray's methods still see Array's reads and writes. Assisted-by: ClaudeCode:claude-opus-5-5
AsyncArray again records a stored repair and a resize through its own _stored_document_replaced, and writes through an AsyncArrayIO method that does not check the repair a second time, so a subclass overriding _store_repaired_document decides as it did before. AsyncArrayIO and ArrayIO are unhashable on purpose, and SyncContext documents that its loop must be running. Assisted-by: ClaudeCode:claude-opus-5-5
…text SyncContext.run is a Runner, a callable that runs a coroutine to completion and returns its result. The default is zarr.core.sync.sync, which runs it on zarr's own loop; asyncio.Runner().run runs it on the calling thread. A runner replaces the loop callable, whose contract could not be checked (a loop that nothing runs blocks forever). Assisted-by: ClaudeCode:claude-opus-5-5
AsyncArrayIO.store_repair and resize each compose a private storing step with clearing the mark. AsyncArray runs the storing step and clears the mark through its own _stored_document_replaced, so a subclass that overrides the hook decides whether the mark is cleared, as on main. Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
…rest AsyncArrayIO's constructor takes metadata, store_path and config by keyword and derives the codec pipeline and chunk grid, which are neither constructor parameters nor compared. Other changes from a design audit: - update_attributes returns a new value instead of changing the attributes of the value (and the array) it was called on; - get_selection and set_selection are private, since an indexer needs the chunk grid to build; getitem and setitem are the public reads and writes; - resize takes delete_outside_chunks by keyword; - ArrayIO takes its context by keyword and gains config and dtype; - both classes have a short repr, as AsyncArray does; - Runner and SyncContext move to zarr.core.sync, beside sync. Assisted-by: ClaudeCode:claude-opus-5-5
An array is a value made with open (reads the metadata), from_metadata (binds metadata, storing and checking nothing) or of (snapshots an Array or AsyncArray). Metadata changes are values: with_shape and with_attrs return a new value and store nothing; store_metadata stores it, erase_metadata, erase_chunk and erase_chunks delete. Reads and writes use zarrs' vocabulary: retrieve_array_subset, store_array_subset, retrieve_chunk and store_chunk, with __getitem__ (and __setitem__ on ArrayIO) as sugar. A value opened from a document whose repair moves chunks needs a repair: storing chunks raises MetadataRepairRequiredError until store_metadata has stored the repaired metadata. Fields are private, equality is identity, and the classes are made only by their constructors. ArrayIO runs coroutines through SyncContext.runner, shaped like asyncio.Runner, and as_sync/as_async move between the two. Assisted-by: ClaudeCode:claude-opus-5-5
… data From the review of the reshaped API: - attributes are deep-copied wherever a value takes them in or hands them out, so no dict reaches another value or the array a value was made from; - store_array_subset and store_chunk refuse data that does not fit the region (ValueError) or whose values would not survive the cast (TypeError); - every chunk method takes non-negative chunk indices, one for each dimension; reads and writes need them inside the chunk grid, erasing does not; - open and from_metadata take no config: values use fixed defaults, not the global configuration; - read_only is gone, the classes are final, selection, data, indices, shape and attrs are positional-only, and as_sync needs its context; - docstrings say what metadata returns, what growing after a shrink reads, and how to write after storing a repair. Assisted-by: ClaudeCode:claude-opus-5-5
…a plain dict The casting check refused lossless writes (an int64 array into uint8, ints into bool) and let lossy ones through (narrowing within a kind), and it read a structured record as an extra dimension. Writes through ArrayIO now refuse only data that does not broadcast to the region, which would drop values, reading a sequence as the array's data type first; values cast as NumPy casts them, as they do through Array. Chunk indices refuse booleans. from_metadata accepts the plain dict that the metadata property returns. Assisted-by: ClaudeCode:claude-opus-5-5
Writes through ArrayIO drop leading axes of length 1 beyond the region's, as NumPy assignment does. Chunk indices are read once, so an iterator works. A test covers from_metadata with a read-only mapping. Assisted-by: ClaudeCode:claude-opus-5-5
_fitted_data now returns the data broadcast to the selected region, so data that broadcasts writes as NumPy assignment writes it whatever chunks the region spans (it failed across chunks before, as it still does through Array). Inputs without reshape, such as a memoryview, are read as arrays first, and a refusal names the shape the caller passed. Chunk indices accept any iterable of ints. Assisted-by: ClaudeCode:claude-opus-5-5
… the write Broadcasting the data to the region before the write cast the whole region at once (a 0-d float64 into a large float32 array allocated it all), lost sharding's scalar fast path, and let a memoryview skip the check, since NumPy counts memoryview as a scalar. _fitted_data now only checks: data with a shape keeps it, a sequence is read as the array's data type, leading length-1 axes are dropped, and data that does not broadcast is refused. The write then casts and splits the data as it does for Array. Assisted-by: ClaudeCode:claude-opus-5-5
Also rewrite the changelog fragment for #470 to describe the current API. Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
Reads take read_missing_chunks (a missing chunk reads as the fill value, or raises ChunkNotFoundError for data known to be complete read over a connection that can fail) and writes take store_empty_chunks. Neither comes from the value or from the array it was taken from, and data reads in C order, except that a Zarr format 2 array keeps the order its metadata declares. Assisted-by: ClaudeCode:claude-opus-5-5
AsyncArrayIO no longer holds an ArrayConfig. Its internal reads and writes take one as a required keyword: a public operation's, built from its own options, or an AsyncArray's own, which AsyncArray now passes explicitly. A future operation cannot fall back to a configuration the value happened to carry. Tests cover store_chunk's store_empty_chunks and a default read of a missing chunk. Assisted-by: ClaudeCode:claude-opus-5-5
Both are in the metadata, and what dtype should return (a NumPy dtype or zarr's data type) is undecided; adding it later breaks nothing. The reprs still name the data type, and ArrayIO's repr is AsyncArrayIO's. Assisted-by: ClaudeCode:claude-opus-5-5
Move the interface to zarr.abc.array_io as typing protocols, so other implementations (one built on zarrs, such as zarrista) can satisfy it without zarr-python's internals. zarr-python's classes become ZarrArrayIO and AsyncZarrArrayIO. Reads return ArrayResult, anything numpy.asarray accepts; a selection of only integers reads into a 0-d buffer of the array's data type, so byte order, StringDType and trailing NULs survive. Writes take ArrayData: data that exports only through DLPack is viewed as NumPy when it is in host memory and refused otherwise; anything with __array__ is written as Array writes it. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The store is an implementation detail of an ArrayIO value: the constructors take one, but neither ZarrArrayIO nor AsyncZarrArrayIO exposes it. The protocols never had a store member; `path` stays. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A selection is now slices with a step of 1 and Ellipsis, and data has the subset's shape. Integers are left out of the interface because implementations differ on them: zarr-python drops an integer's axis as NumPy does, while zarrista keeps it as a range of length 1. ZarrArrayIO refuses an integer or other non-slice selector with TypeError and a step other than 1 with ValueError, so code that runs against it means the same thing against any implementation. NumPy indexing stays in zarr.Array. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slice bounds mean what they mean to NumPy (negative bounds count from the end, bounds past the end are clipped, a reversed slice is empty), which zarr-python and zarrista already agree on; the type of a refusal's error is not part of the interface. Tests cover the bounds, booleans, nested tuples and steps of 0 and -1. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implementations format an array's path differently (zarr-python gives '' and 'g/a', zarrista '/' and '/g/a'), and with the store private a path is about where a store holds the array, so it is an implementation attribute. ZarrArrayIO and AsyncZarrArrayIO keep `path`. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ArrayData is now SupportsDLPack alone, with exactly the region's shape and the array's data type. With Buffer in ArrayData, the same call stored different values: b"12" written to a uint8 array was one value to zarr-python and two raw bytes to zarrista. zarr-python also broadcast scalars and cast data types where zarrista refuses them. ZarrArrayIO refuses lists, scalars, byte buffers and other non-DLPack data and other data types with TypeError, and other shapes with ValueError. NumPy arrays of data types DLPack cannot carry (strings, records) are still written when their data type is the array's. zarr.Array keeps broadcasting and casting. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The data-type check compared byte order, so on Zarr format 3 (where byte order belongs to the bytes codec) the accepted order depended on how the value was made: ZarrArrayIO.of(array) refused native data for an array created as ">i4", and ZarrArrayIO.open refused ">i4" data for the same stored array. Byte order changes no value and DLPack carries only native order, so data types now compare in native byte order. A data type NumPy cannot read (a device tensor's) is refused with a clear TypeError. The protocol now also says an implementation may refuse data not in C order, and that chunks outside the chunk grid are not part of the interface. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A chunk at the array's edge is now read and written in the chunk's full shape, padding included, as zarrs does: retrieve_chunk returns the full chunk with the part past the array's shape read as the fill value, and store_chunk takes the full chunk and stores only the part inside the array. Before, zarr-python gave and took only the part inside, so the same call returned different shapes from ZarrArrayIO and zarrista (for sharded and transposed arrays too). What the padding of a stored chunk reads as is not part of the interface. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The same ArrayIO calls on the same stored array, through ZarrArrayIO and zarrista, must read the same values, subsets and chunks, store the same chunk keys, and refuse the same data: 7 data types across regular, big-endian, transposed and sharded layouts, with whole, partial, clipped and empty writes, a full edge chunk, an all-fill chunk and an erase. zarrista 0.1.0 joins the test dependency group on platforms it has wheels for; the test is skipped where it is absent. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Data that differs from the array's data type only in byte order reached the codecs unconverted (the write casts only when the dtype name differs), and numcodecs filters such as Delta read its bytes as the array's data type, so every value was stored byte-swapped. It is now converted in _exact_data. The native-order comparison also covers subarray fields, and an edge chunk of a Zarr format 2 array reads in the order its metadata declares, as other chunks do. The interface now says whether data past the array's edge counts toward an all-fill chunk is not part of it. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zarrista moves to its own zarrista-tests dependency group, installed by the optional rows of the test matrix only: in the test group it made min_deps unresolvable (zarrista needs typing_extensions>=4.16) and it cannot run on NumPy 2.0, so the module also skips below NumPy 2.1. The comparison now has each implementation read the other's store, so a codec bug that is wrong the same way on write and read is caught; compares bytes, so -0.0 and NaN payloads are not equated; and covers all-fill chunk and subset writes with and without store_empty_chunks. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plain `uv sync` installs the dev group, which lost zarrista when it moved to its own group, so tests/test_array_io_zarrista.py was skipped locally without notice. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Add
zarr.abc.array_io, an interface of protocols for reading and writing an array as a value:AsyncArrayIO,ArrayIO(its synchronous counterpart),ArrayResult(what reads return) andArrayData(what writes accept). zarr-python implements it withAsyncZarrArrayIOandZarrArrayIO, whichAsyncArrayreads and writes through;ArrayandAsyncArraybehave as before.Related work: this replaces the approach of #447 (a private binding under
AsyncArray), and #419 and #420 stay parked. It overlaps with upstream zarr-developers#4034. The branch is based on this fork'smainatb0020f2e2. Data that broadcasts across more than one chunk along a broadcast axis fails inside the shared write path, forArrayandArrayIOalike; #472 fixes that separately.For the zarrista maintainer (agent)
The protocols are written so that a zarrista
Array/AsyncArraycould satisfy them, and so that zarr-python could later wrap zarrista. An agent type-checked zarrista 0.1.0's stubs against them with mypy, one protocol member at a time. Properties (metadata,attrs,shape),with_attrs,erase_metadataand the selections already conform. The protocol was loosened where the difference was incidental: JSON values areobject, andArrayResultasks only for__array__, because zarrista's variable-length tensors have no DLPack.These differences remain. Each could be resolved on either side.
zarr.abc.array_ioretrieve_*/__getitem__, returnArrayResult(anything with__array__)FixedLengthTensor | VariableLengthTensor | OptionalFixedLengthTensor | OptionalVariableLengthTensor;OptionalVariableLengthTensorhas no__array__read_missing_chunks: bool = Trueandstore_empty_chunks: bool = False**codec_options: Unpack[CodecOptions], with no option for missing chunksstore_metadata()NoneSequence[int]list[int](a stub could saySequence[int])with_shapeSequence[int]list[int]erase_chunksstore_chunkdataArrayData(a DLPack array)ArrayBytesneeds_repairFalsefor an implementation that repairs nothingmetadatastorage_transformers: ()storage_transformers;store_metadataadds a_zarrsattributeSupportsDLPack__dlpack__(*, stream, max_version, dl_device, copy), the array API keywords__dlpack__(**kwargs: object) -> objectOn the last row: under zarrista's stub, a producer that exports through DLPack with the array API's keywords fails to type-check as write data, so
store_array_subsetdoes not conform yet. PyTorch and JAX tensors are such producers, and NumPy arrays pass zarrista's stub only because they are alsoBuffers. A protocol with the explicit keywords (as here, and as NumPy'sfrom_dlpackstub has it) accepts all of them.Four things that used to differ are now left out of the interface or made to match, so that the same call means the same thing to both implementations.
tests/test_array_io_zarrista.pychecks this by running the same calls through both (below).Ellipsis), which both read and write with the subset's shape, and leaves integers out, because zarr-python drops an integer's axis as NumPy does and zarrista keeps it as a range of length 1 (checked at runtime with 0.1.0). zarrista accepts more selectors than the interface asks for, so it conforms; zarr-python's implementations refuse integers (TypeError) and other steps (ValueError), so code that runs against them runs the same against zarrista. NumPy indexing stays inzarr.Array, a layer above the interface. Slice bounds are read as NumPy reads them (negative bounds count from the end, bounds past the end are clipped), which both already do; the type of the error for a refused selection is not part of the interface (zarr-python raisesValueErrorfor a step, zarristaNotImplementedError).ArrayDatais now onlySupportsDLPack, with exactly the region's shape and the array's data type. Before, it includedBuffer, and the same call stored different values:b"12"written to auint8(2,) array was one value to zarr-python ([12, 12]) and two raw bytes to zarrista ([49, 50]). zarr-python also broadcast scalars and cast data types where zarrista refuses them.ZarrArrayIOnow refuses lists, scalars, byte buffers, other shapes and other data types;zarr.Arraykeeps broadcasting and casting. An implementation may refuse a data type it cannot import: zarrista writes strings only asArrayBytes, whileZarrArrayIOwrites them from a NumPy array of the array's string data type.path. zarrista gives'/'and'/g/a'where zarr-python gives''and'g/a'. With the store private,pathis an implementation attribute, not part of the interface.retrieve_chunkandstore_chunknow use the chunk's full shape, padding included, as zarrs does; zarr-python used to give and take only the part inside the array (retrieve_chunk([2])of a (5,) array with chunks (2,) was[5], now[5, fill], as in zarrista), for sharded and transposed arrays too. What the padding of a stored chunk reads as, and whether it counts when deciding that a chunk holds only the fill value, is not part of the interface (zarrs stores what it is given there; zarr-python stores the fill value).API (agent)
zarr.abc.array_ioholds the interface only. How a value is made is not part of the interface, so each implementation has its own constructors.with_shape(shape),with_attrs(attrs)(replaces): new values, nothing storedstore_metadata()(returns the stored value),erase_metadata(),erase_chunk(indices),erase_chunks(indices)retrieve_array_subset,store_array_subset,retrieve_chunk,store_chunk,io[...](andio[...] = dataonArrayIO). Reads takeread_missing_chunks(defaultTrue;Falseraises for a missing chunk), writes takestore_empty_chunks(defaultFalse).metadata(a document),attrs,shape,needs_repairEllipsis; data has the subset's shape. Integers are not selections (implementations differ on whether one keeps its axis); select one element withslice(i, i + 1).ArrayResult, anythingnumpy.asarrayaccepts; writes takeArrayData, an array that exports through DLPack with exactly the region's shape and the array's data type (nothing is broadcast or cast)zarr-python's implementations,
AsyncZarrArrayIOandZarrArrayIOinzarr.core.array, add:open(store, path="", *, zarr_format=None),from_metadata(metadata, store, path="")(stores and checks nothing) andof(array)(a snapshot of anArrayorAsyncArray); calling the class raises;ArrayIO.as_async()andAsyncArrayIO.as_sync(context=...)to switch between the two.The store is an implementation detail: the constructors take one, but no value exposes it.
pathis on the implementations only.Their reads return NumPy arrays, 0-d for a 0-d array. Writes read host data with
__array__throughnumpy.asarray(so NumPy string and record arrays, which DLPack cannot carry, are written), view other host DLPack producers throughnumpy.from_dlpack, and pass device arrays with__array__(CuPy) on to the prototype.needs_repair. Storing chunks raisesMetadataRepairRequiredErroruntilstore_metadata()has stored the repair; the value it returns writes chunks.TypeError), or of another shape (ValueError); nothing is broadcast or cast, and byte order is converted. Chunk methods take non-negative indices, one for each dimension, and read and write the chunk's full shape. Reads and writes need indices inside the chunk grid; erasing does not.ZarrArrayIOruns coroutines throughSyncContext(runner=...). A runner is anything withrun(coro), such asasyncio.Runner(); the default runs on zarr's IO loop. The runner is the seam for a sync-native implementation later.AsyncArraybuilds anAsyncZarrArrayIOfrom its fields for each operation and keeps its own repair hooks;Arrayis byte-identical tomain.zarryet.Testing and review (agent)
tests/test_array_io.pyhas 116 tests. mypy is clean, and a static assignment in the tests checks thatZarrArrayIOandAsyncZarrArrayIOsatisfy the protocols.tools/compat(2,000 seeds, 150,430 steps, plus pickles in both directions) against the fork'smain: the only differences are 10 scenario steps and 2 pickle steps where anAsyncArraysubclass that is already broken onmainfails with anAttributeErrornaming a different missing attribute.tests/test_array_io_zarrista.py(31 tests) runs the same reads and writes throughZarrArrayIOand zarrista on 7 data types across regular, big-endian, transposed and sharded layouts: whole, partial, clipped and empty subset writes, a full edge chunk, all-fill chunks and subsets with and withoutstore_empty_chunks, and an erase. After each step both must read bit-identical values, subsets and chunks, each must read the other's store the same way, and both must have stored the same chunk keys; both must refuse data of another data type or shape. Mutants (trimmed edge chunks, an ignored big-endian codec,-0.0fills, ignoredstore_empty_chunks) all fail it. zarrista is in azarrista-testsdependency group installed by theoptionalrows of the hatch test matrix (notmin_deps: zarrista needs NumPy 2.1 andtyping_extensions4.16).49854fad9), the mismatch with zarrista's model (aed95d8ba), and attributes shared through nested values, unchecked erase indices, global configuration and silently dropped extra write data (869da17c8). A casting check added in869da17c8refused valid writes and let lossy ones through; it was replaced by a shape check (6bb24a3d3,0ad8b6ef8). Broadcasting write data to the region (968d103bb) materialized whole regions; the check now only validates (31cacfa3e). Two later rounds found nothing serious (test gaps covered in1a69bf5c5,e90a6b915).bf5cc0aea):__dlpack__throughnp.from_dlpack, which refused pyarrow arrays with nulls or strings thatArrayaccepts.Minor findings fixed in the same commit: an unclear error for DLPack-only data off the host, a DLPack promise for every numeric result that NumPy's non-native byte orders break, and stale fragment text.
bytesis one value (bf5cc0aea). The GPU default prototype is an open decision below; nested variable-length-bytes reads are an existing bug, listed below.d0cef561a,4549282b4): nothing serious in that diff. It found thatbyteswrite data was one value to zarr-python and two raw bytes to zarrista (fixed by exact DLPack writes,b3145acdb), thatpathdiffers (dropped from the protocols,961ba8f45), and that slice bounds and refusal error types were unstated (ae0e3e1f2).oforopen), fixed in30a7a76e7; edge chunks had different shapes in the two implementations, fixed by copying zarrs (928e55ba3). Minor: data not in C order and out-of-grid chunks are now documented as outside the interface (30a7a76e7). Because each round found a new difference, the differential test was added (652211974).5fc05be5b); zarrista in thetestgroup mademin_depsunresolvable, and the test could not see a codec bug that is wrong the same way on write and read (both fixed in4e99606ef, which also compares bits and coversstore_empty_chunks). Minor findings fixed in the same commits: subarray byte order, v2 edge-chunk memory order, the padding wording.devgroup lost zarrista, so local runs skipped the test (fixed in15d853b46).15d853b46only: nothing serious (free-threaded 3.13t/3.15t would build zarrista from source; no CI job uses them). Two rounds in a row found nothing serious, so review stopped here.Open decisions (agent)
ZarrArrayIOandAsyncZarrArrayIOfor now.ZarrArrayIOreads and writes will default to the CPU buffer prototype, notzarr.config's. The commit is held locally (not on this branch) because the sharding codec refuses any prototype but the configured one, so in GPU mode every sharded read and write would raise; a separate fix makes the codecs use the prototype they are given. Until then reads followzarr.config, and in GPU mode return CuPy arrays, whichnumpy.asarrayrefuses.ArrayResult's wording must then allow device arrays read through a GPU prototype.Array: writing a 0-d variable-length-bytes array raisesTypeError(chunk_utils.pystores the squeezed 0-d buffer as the element), andArray's integer read of such an array returns a 0-d object array holding a 0-d array.Array: on Zarr format 3 a numcodecs filter declared with a non-native byte order (Delta(dtype=">i4")) reads the array's data in native order once the array is reopened, so values made byoffrom the creating array and byopendisagree.Array.__setitem__also still stores data in the other byte order byte-swapped through such filters (fixed here forZarrArrayIOonly). fix(codecs): keep numcodecs filter and cast_value outputs in the declared dtype across byte orders #476 defines the filter byte-order contract.dtype(it is inmetadata; whether it should return a NumPy dtype or zarr's data type is undecided),fill_valueor chunk introspection (chunk_key,chunk_grid_shape) yet.ChunkNotFoundError's message still points to the globalarray.read_missing_chunkssetting, whichZarrArrayIOdoes not read.metadatareturns once zarr-metadata's models are used.Array._async_arrayandArray.async_array, pointing toAsyncZarrArrayIO.of.🤖 Generated with Claude Code