When DataArray.data is called, the return is an Array-API compatible array (i.e., Numpy, but also dask). Since the ChunkCachedArray only implements a subset of the Array API, this would mean that direct calls to .data would trigger a very expensive cast to an Array API compatible array (i.e., a numpy array).
I think these casts should be avoided (in the codebase, but also importantly in interpolators) when running with CachedChunkArray's. I'm not sure what the fix would be at first glance
Originally posted by @VeckoTheGecko in #2908 (comment)
When
DataArray.datais called, the return is an Array-API compatible array (i.e., Numpy, but also dask). Since theChunkCachedArrayonly implements a subset of the Array API, this would mean that direct calls to.datawould trigger a very expensive cast to an Array API compatible array (i.e., a numpy array).I think these casts should be avoided (in the codebase, but also importantly in interpolators) when running with
CachedChunkArray's. I'm not sure what the fix would be at first glanceOriginally posted by @VeckoTheGecko in #2908 (comment)