I'm learning numpy and getting very confused by the terminology.
>>> x = np.random.randint(20, size=(2, 10)) # 'size' here means number of rows and number of columns
>>> x.size # consistent with the above I expect an output of `(2,10)`
20
>>> x.shape
(2, 10)
>>> x = np.random.randint(20, shape=(2, 10)) # since the above did not work as expected let's see whether we can salvage anything...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 910, in mtrand.RandomState.randint
TypeError: randint() got an unexpected keyword argument 'shape'
Why does numpy behave this way and what does numpy mean by an array's "shape" and an array's "size"? Is this an exception or are these terms used interchangeably and inconsitently in general?