Useful functions not in the Array API Standard #193
Labels
array api
enhancement
New feature or request
xarray-integration
Uses or required for cubed-xarray integration
There are a few numpy functions which xarray calls on wrapped arrays but which are not (yet) in the Array API Standard. (See data-apis/array-api#187 (comment)) Cubed could choose to implement these to facilitate full integration.
Of particular interest to me personally is
np.pad
. It's used within xarray's.pad
method, which is used within xGCM'sapply_as_grid_ufunc
, which led to thepad
function being an important part of the test case that exposed memory management problems with dask's distributed scheduler. I can't really close the loop by trying out cubed on that full original problem unlesspad
is available in cubed.pad
is also interesting because a parallel implementation isn't trivial - dask'spad
implementation usesmap_blocks
in some cases, but more complicated tricks in other cases. For my purposes above I wouldn't need to implement more than one or two of themode
kwarg options though.I would be interested in submitting a PR for adding
pad
if that's something you would welcome @tomwhite? (I mentioned this on the xarray tracker but it's really a cubed question pydata/xarray#7848 (comment))cc @jbusecke
The text was updated successfully, but these errors were encountered: