dmlc / minpy

NumPy interface with mixed backend execution
https://minpy.readthedocs.io/en/latest/
Other
1.11k stars 112 forks source link

Try to convert numpy code ,failed,Help!!! #184

Open zfk513 opened 6 years ago

zfk513 commented 6 years ago

in numpy it works fine, but just slow ,guess owing to single thread so i convert to minpy,but occur obstacle: mu = np.mean(dataset, axis=0) File "C:\Users\lake zhang\AppData\Local\Programs\Python\Python36\lib\site-packages\minpy\primitive.py", line 141, in call return self.call(args, kwargs) File "C:\Users\lake zhang\AppData\Local\Programs\Python\Python36\lib\site-packages\minpy\primitive.py", line 238, in call result_value = self._func(*arg_values, **kwarg_values) File "", line 44, in mean AssertionError: Argument data must have NDArray type, but got 0 -0.694638 1 5.012288 2 4.903325 3 -0.612916 .... .... 1098190 8.270000 1098191 8.960000 1098192 9.230000 1098193 8.850000 1098194 8.540000 1098195 8.660000 1098196 8.850000 1098197 9.110000 1098198 9.000000 1098199 9.000000 1098200 9.040000 1098201 9.080000 1098202 9.000000 1098203 8.880000 Name: x-axis, Length: 1098204, dtype: float64

hustsunjiayu commented 5 years ago

think you must show how the 'dataset' comes. I just tested the minpy.numpy.mean function in my PC and it has no problem