In [1]:
import numpy as np
In [2]:
np.zeros(10)
Out[2]:
In [4]:
np.arange(10)*0
Out[4]:
In [5]:
np.ones(10)
Out[5]:
In [6]:
np.ones(10)*5
Out[6]:
In [7]:
np.zeros(10)+5
Out[7]:
In [8]:
np.arange(10,51)
Out[8]:
In [9]:
np.arange(10,51).shape
Out[9]:
In [10]:
np.arange(10,51,2).r
Out[10]:
In [12]:
a=np.arange(0,9)
In [13]:
a.reshape(3,3)
Out[13]:
In [14]:
np.arange(0,9).reshape(3,3)
Out[14]:
In [15]:
np.eye(3)
Out[15]:
In [16]:
np.eye(4)
Out[16]:
In [22]:
np.random.rand()
Out[22]:
In [24]:
np.random.randn(25).shape
Out[24]:
In [26]:
np.random.randn(25)
Out[26]:
No comments:
Post a Comment