## Description ##

Problem that caused #12672 is in using np.ascontiguousarray,
which is buggy for zero-dimensional arrays
(see https://github.com/numpy/numpy/issues/5300 for details and discussion).

Here I use the solution proposed by numpy team:
switch to `np.asarray` with `order='C'`.


### Essentials ###

- [x] Changes are complete (i.e. I finished coding on this PR)
- [x] All changes have test coverage:
- Unit tests are added for small changes to verify correctness (e.g. adding a 
new operator)
- Nightly tests are added for complicated/long-running ones (e.g. changing 
distributed kvstore)
- Build tests will be added for build configuration changes (e.g. adding a new 
build option with NCCL)
- [x] To the my best knowledge, examples are either not affected by this 
change, or have been fixed to be compatible with this change

### Changes ###

- use `np.asarray` instead of `np.ascontiguousarray`, tests added for indexing 
and for init.


[ Full content available at: 
https://github.com/apache/incubator-mxnet/pull/12678 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to