Positional arguments must have NDArray type

While trying to run operators that require parameter as variable arguments

Such as mx.nd.squeeze

When I run,

data = [mx.nd.random.uniform(low=-10.0, high=10.0, shape=(2,2,1))]

Error is as follows:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 39, in squeeze
AssertionError: Positional arguments must have NDArray type, but got [
  [ 9.591734 ]]

<NDArray 2x2x1 @cpu(0)>]

It means the positional argument that mx.nd.squeeze expects is a variable argument.
Moreover, it expects the list to be passed as reference i.e. *data instead of pass by value data

Correct way is

data = [mx.nd.random.uniform(low=-10.0, high=10.0, shape=(2,2,1))]

Actually, this usage of * has nothing to do with value or reference in Python.
The problem you had was because data is a list of NDArrays and mx.nd .random.uniform expects an NDArray.

By using *data as an argument, you are unpacking the argument list. Think it as a syntactic sugar, where func(*[x0,x1,...,xn]) is converted into func(x0,x1,...,xn).

More info about it here https://docs.python.org/2/tutorial/controlflow.html#unpacking-argument-lists
(still valid in py3).