Dear numpy community,
I'm planning to depreciate np.asfortranarray and np.ascontiguousarray
functions due to their misbehavior on scalar (0-D tensors) with PR #12244.
Current behavior (converting scalars to 1-d array with single element)
- is unexpected and contradicts to documentation
- probably, can't be changed without breaking external code
- I believe, this was a cause for poor support of 0-d arrays in mxnet.
- both functions are easily replaced with asarray(..., order='...'), which has expected behavior
There is no timeline for removal - we just need to discourage from using this functions in new code.
Function naming may be related to how numpy treats 0-d tensors specially,
and those probably should not be called arrays.
However, as a user I never thought about 0-d arrays being special and being "not arrays".
Please see original discussion at github for more details
Your comments welcome,
Alex Rogozhnikov
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion