In [1]:
import numpy as np
In [2]:
z = np.arange(1,11)
In [3]:
z
Out[3]:
In [4]:
z>6
Out[4]:
In [5]:
bz=z>6
In [6]:
bz
Out[6]:
In [7]:
z[bz]
Out[7]:
In [9]:
z[z>7]
Out[9]:
In [10]:
a1=np.arange(1,11)
In [11]:
a1
Out[11]:
In [12]:
a1>6
Out[12]:
In [13]:
ba1=a1>6
In [14]:
ba1
Out[14]:
In [15]:
a1[ba1]
Out[15]:
In [16]:
a1[a1<6]
Out[16]:
In [18]:
m1=np.arange(1,51).reshape(5,10)
In [19]:
m1
Out[19]:
In [20]:
m1[:2,:2]
Out[20]:
In [28]:
m1[0:1]
Out[28]:
No comments:
Post a Comment