Open
Description
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,))
".
Activity
rgommers commentedon Jul 16, 2023
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)?asmeurer commentedon Jul 16, 2023
Correction. Should be "replace
ravel(x)
withreshape(x, (-1,))
".[-]ravel()/flatten()[/-][+]RFC: add `ravel()` (or `flatten()`)[/+]