In [6]:
#import matplotlib libary
import matplotlib.pyplot as plt
import numpy as np

#define some data
x = [1,2,3,4]
y = [20, 21, 20.5, 20.8]

#plot data
plt.plot(x, y)

#show plot
plt.show()

A = np.random.randn(4,3)
B = np.sum(A, axis=1,keepdims=True)
print(A)
print(B)
print(B.shape)


[[  8.15827791e-01   1.58258974e+00   3.66041098e-01]
 [  1.35993007e+00  -4.47625131e-04   4.54020330e-01]
 [  1.35709378e+00  -4.22116989e-01   4.63617165e-01]
 [ -1.23077635e+00  -6.56521303e-01  -1.17055490e-01]]
[[ 2.76445863]
 [ 1.81350277]
 [ 1.39859396]
 [-2.00435314]]
(4, 1)

In [ ]: