Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- def m8(M,k):
- M=np.array(M)
- return M[ : ,k]
- def m10(M):
- M=np.array(M)
- for i in range (0, len(M[0]), 2):
- print (M[ : ,i])
- def m17(M):
- return np.sum(M), np.prod(M)
- def m18(M):
- for i in range (len(M[0])):
- print ( np.sum(M[ : ,i]),np.prod(M[ : ,i]))
- def m19(M):
- for i in range (len(M)):
- print (np.sum(M[i,:]),np.prod(M[i,:]))
- def m24(M):
- for i in range (len(M[0])):
- print ( np.min(M[ : ,i]))
- def m27(M):
- A=[]
- for i in range (len(M[0])):
- A.append( np.min(M[ : ,i]))
- print (np.max(A))
- def m28(M):
- A=[]
- for i in range (len(M)):
- A.append(np.max(M[i,:]))
- print (np.min(A))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement