[1] When ndims Are Equal(Matrices)
- 차원이 1이여야 함

- (3,3) + (3,1)

- (3,3) + (1,3)

- (3,1) + (1,3)


# When ndims Are Equal(Matrices)
#(3,3) + (1,3)
import numpy as np
A = np.arange(9).reshape(3,3)
B = 10*np.arange(3).reshape((-1,3))
C = A + B
print("A: {}/{}\n{}".format(A.ndim, A.shape, A))
print("B: {}/{}\n{}\n".format(A.ndim, B.shape, B))
#(3,3) + (3,1)
A = np.arange(9).reshape(3,3)
B = 10*np.arange(3).reshape((3,-1))
C = A + B
print("A: {}/{}\n{}".format(A.ndim, A.shape, A))
print("B: {}/{}\n{}\n".format(A.ndim, B.shape, B))
print("A + B: {}/{}\n{}".format(A.ndim, C.shape, C))
#(3,1) + (1,3) -> 둘다 1인것이 있기 때문에 브로드캐스팅이 가능함
A = np.arange(3).reshape((3,-1))
B = 10*np.arange(3).reshape((-1, 3))
C = A + B
print("A: {}/{}\n{}".format(A.ndim, A.shape, A))
print("B: {}/{}\n{}\n".format(A.ndim, B.shape, B))
print("A + B: {}/{}\n{}".format(A.ndim, C.shape, C))