Open
Description
The functions
currently come with the disclaimer
The shapes of two of the output arrays for this function depend on the data values in the input array; hence, array libraries which build computation graphs (e.g., JAX, Dask, etc.) may find this function difficult to implement without knowing array values. Accordingly, such libraries may choose to omit this function. See Data-dependent output shapes section for more details.
I propose to
- Add two optional parameters
size=None, fill_value=None
, lifted from JAX - Change the disclaimer:
- Accordingly, such libraries may choose to omit this function.
+ Accordingly, such libraries may choose to require the size= parameter.
This not only helps with JAX and ndonnx interoperability, but also with Dask as it would allow to avoid NaN-sized arrays.