Open
Description
Zarr version
v2.18.3, 3.0.2 and 3.0.3
Numcodecs version
?
Python Version
?
Operating System
linux & windows
Installation
either
Description
behaviour of setitem with repeated indices depends on platform. The example below succeeds on Mac and fails on ubuntu, windows with numpy 2.2. It succeeds in all CI environments with numpy 1.25.
I can reproduce on zarr v2.18.4, v3.0.2 on linux.
I say we disallow this
Steps to reproduce
import zarr
import numpy as np
array = zarr.array(data=np.zeros((4,)), chunks=(1,))
indexer = np.array([-1, -1, 0, 0])
array.oindex[(indexer,)] = [0, 1, 2, 3]
np.testing.assert_array_equal(array[:], np.array([3, 0, 0, 1]))
fails on windows & linux, numpy=2.2 in CI.