Skip to content

Commit 5872a03

Browse files
authored
Update NumPy.py
1 parent 9480bd1 commit 5872a03

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

NumPy.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,12 @@
6262
print("\n", np.std(a)) #Standart Deviation (средне квадратическое отклонение)
6363

6464
b = np.array([(7,5,10),(25,34,2),(0,1,3)])
65-
b = np.array([(7,5,10),(25,34,2),(0,1,3)]) #plus +1
65+
66+
print("\n", a+b) #sum of matrices
67+
print("\n", a-b) #substraction of matrices
68+
print("\n", a*b) #multiply of matrices
69+
print("\n", a/b) #divide of matrices
70+
71+
print("\n"*2,np.vstack((a,b))) #concatenation along the first axis ->
72+
print("\n"*2,np.hstack((a,b))) #stack arrays in sequence horizontaly (column wise)
73+
print("\n", a.ravel()) #into a single column

0 commit comments

Comments
 (0)