Closed nehcuh closed 3 years ago
Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly. If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.
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
.
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
could not discriminate the NDArray in kwargs
.
Description
np.apply_along_axis
func cannot work.Error Message
To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
Steps to reproduce
(Paste the commands you ran that produced the error.)
What have you tried to solve it?
Environment
We recommend using our script for collecting the diagnostic information with the following command
curl --retry 10 -s https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py | python3
Environment Information
``` ----------Python Info---------- Version : 3.8.5 Compiler : Clang 10.0.0 Build : ('default', 'Sep 4 2020 02:22:02') Arch : ('64bit', '') ------------Pip Info----------- Version : 20.2.4 Directory : /Users/huchen/.pyenv/versions/anaconda3-2020.11/lib/python3.8/site-packages/pip ----------MXNet Info----------- Version : 1.7.0 Directory : /Users/huchen/.pyenv/versions/anaconda3-2020.11/lib/python3.8/site-packages/mxnet Commit Hash : 64f737cdd59fe88d2c5b479f25d011c5156b6a8a Library : ['/Users/huchen/.pyenv/versions/anaconda3-2020.11/lib/python3.8/site-packages/mxnet/libmxnet.dylib'] Build features: ✖ CUDA ✖ CUDNN ✖ NCCL ✖ CUDA_RTC ✖ TENSORRT ✔ CPU_SSE ✔ CPU_SSE2 ✔ CPU_SSE3 ✔ CPU_SSE4_1 ✖ CPU_SSE4_2 ✖ CPU_SSE4A ✖ CPU_AVX ✖ CPU_AVX2 ✖ OPENMP ✖ SSE ✖ F16C ✖ JEMALLOC ✖ BLAS_OPEN ✖ BLAS_ATLAS ✖ BLAS_MKL ✔ BLAS_APPLE ✔ LAPACK ✔ MKLDNN ✔ OPENCV ✖ CAFFE ✖ PROFILER ✖ DIST_KVSTORE ✖ CXX14 ✖ INT64_TENSOR_SIZE ✔ SIGNAL_HANDLER ✖ DEBUG ✖ TVM_OP ----------System Info---------- Platform : macOS-10.16-x86_64-i386-64bit system : Darwin node : huchendeMacBook-Pro.local release : 20.4.0 version : Darwin Kernel Version 20.4.0: Fri Mar 5 01:14:14 PST 2021; root:xnu-7195.101.1~3/RELEASE_X86_64 ----------Hardware Info---------- machine : x86_64 processor : i386 b'machdep.cpu.brand_string: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz' b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP TSCI' b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C' b'machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET SGX BMI1 AVX2 SMEP BMI2 ERMS INVPCID FPU_CSDS MPX RDSEED ADX SMAP CLFSOPT IPT SGXLC MDCLEAR IBRS STIBP L1DF ACAPMSR SSBD' ----------Network Test---------- Setting timeout: 10 Error open MXNet: https://github.com/apache/incubator-mxnet,