In the NumPy Manual, there are objects having a wildcard as argument as shown in the title of this question.
First, I have no idea what it means in this context.
Second, when trying to redefine the function as such:
def array(object, dtype=None, *, copy=True, order='K', subok=False, ndmin=0, like=None):
if MODE == 'CPU':
return np.array(object, dtype, *, copy, order, subok, ndmin, like)
print (array([1,2,3]))
I get the error:
File "test.py", line 18
return np.array(object, dtype, *, copy, order, subok, ndmin, like)
^
SyntaxError: invalid syntax
Although I know what *args
or **kwargs
mean, I have no idea what *
means. Searching google for this does not yield to satisfying results. Any explanation would be appreciated.