Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

minpy.numpy.sqrt() error #139

Open
jacklxc opened this issue Jan 31, 2017 · 3 comments
Open

minpy.numpy.sqrt() error #139

jacklxc opened this issue Jan 31, 2017 · 3 comments

Comments

@jacklxc
Copy link

jacklxc commented Jan 31, 2017

I was using OnlyNumpyPolicy in older version of minpy. After updating minpy, I could not use OnlyNumpyPolicy anymore. As a result, basic operations such as

import minpy.numpy as np
a = np.sqrt(2)

Causes errror:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/lixiangci/minpy/minpy/primitive.py", line 134, in __call__
    return self.call(args, kwargs)
  File "/Users/lixiangci/minpy/minpy/primitive.py", line 221, in call
    result_value = self._func(*arg_values, **kwarg_values)
  File "/Users/lixiangci/mxnet/python/mxnet/_ctypes/ndarray.py", line 104, in generic_ndarray_function
    raise ValueError("Too many positional arguments")
ValueError: Too many positional arguments

Personally I suggest developers to enable OnlyNumpyPolicy again to solve this problem.

Thank you.

@jermainewang
Copy link
Member

This is because MXNet's sqrt call does not accept single scalar as argument. We will PR to MXNet to fix this problem.

@wangg12
Copy link
Contributor

wangg12 commented Mar 9, 2017

@jermainewang Many functions in minpy don't accept scalar and list arguments, however numpy does. I think minpy should be consistent with that in numpy.

@lryta
Copy link
Member

lryta commented Mar 9, 2017

@wangg12 The fix is still on the way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants