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

Uniform sampler failed #159

Open
wddabc opened this issue Mar 12, 2017 · 2 comments
Open

Uniform sampler failed #159

wddabc opened this issue Mar 12, 2017 · 2 comments

Comments

@wddabc
Copy link

wddabc commented Mar 12, 2017

Mentioned in #158, but should be a separate issue:
The sample code

import minpy
print minpy.numpy.random.uniform(low=-1., high=1., size=(2,3))

triggered

mxnet/python/mxnet/base.pyc in check_call(ret)
73 """
74 if ret != 0:
---> 75 raise MXNetError(py_str(_LIB.MXGetLastError()))
76
77 if sys.version_info[0] < 3:

MXNetError: Cannot find argument 'size', Possible Arguments:

low : float, optional, default=0
The lower bound of distribution
high : float, optional, default=1
The upper bound of distribution
shape : Shape(tuple), optional, default=()
The shape of the output
ctx : string, optional, default=''
Context of output, in format cpu|gpu|cpu_pinned.Only used for imperative calls.
dtype : int, optional, default='0'
DType of the output
, in operator uniform(name="", size="(2, 3)", low="-1.0", high="1.0")

@jermainewang
Copy link
Member

This is an mxnet error. It uses shape rather than size argument. Try:

minpy.numpy.random.uniform(low=-1, high=1, shape=(2,3))

@wddabc
Copy link
Author

wddabc commented Mar 13, 2017

Thanks. It works. But I think this issue should be remained open until it comforms to numpy.

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

2 participants