RFC: add `ravel()` (or `flatten()`)
Should we have a ravel() or flatten() function? Right now you can do it with reshape, but it's maybe not obvious. reshape also has the advantage in that it can be explicit about copying.
If not, I wonder if we should have some page or documentation somewhere to indicate the best workarounds for NumPy functions that aren't included in the standard, like "replace ravel(x) with reshape(x, (x.size,))".
If not, I wonder if we should have some page or documentation somewhere to indicate the best workarounds for NumPy functions that aren't included in the standard, like "replace
ravel(x)withreshape(x, (x.size,))".
I'd prefer that - keeping the standard to one way of doing things. Such a page would be useful for many users. We may also add guidance for PyTorch/JAX/etc. users there as needed.
The question is where it should live. Maybe under the Other heading in the top-level structure (see https://data-apis.org/array-api/latest/index.html)?
"replace ravel(x) with reshape(x, (x.size,))".
Correction. Should be "replace ravel(x) with reshape(x, (-1,))".