wkcn commented on issue #20232:
URL: 
https://github.com/apache/incubator-mxnet/issues/20232#issuecomment-830974496


   Thank you for reporting this bug!
   
   The numpy function `apply_along_axis` is not implemented in MXNet, so MXNet 
fallbacks it to official numpy operator.
   
   It works when `data` in `args`.
   ```python
   from mxnet import np, npx
   npx.set_np()
   data = np.array([[1,2,3.], [4.,5.,6]])
   print(np.apply_along_axis(lambda x: x.mean(), 1, data))
   ```
   
   The reason of the bug is that the function `_as_onp_array` in 
[`multiarray.py#L380`](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/numpy/multiarray.py#L380)
 could not discriminate the NDArray in `kwargs`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to