We need to adapt for changes in numpy 2.0 as decribed at https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword and future changes to pass copy=True (numpy/numpy#26208).
It seems we don't have usages of np.array(.., copy=False) in our code base, so we only have to tackle the item about the copy keyword in the __array__ method.