Programming
[DeepLearning] 파이썬, 머신러닝, 딥러닝 기초 다지기
whilescape
2019. 12. 20. 00:26
1. Numpy
>>> import numpy as np
>>> a = np.array([[1,2], [3,4]])
>>> b = np.array([10, 20])
>>> a*b
array([[10,40],[30,80]])
# 마치 [[1,2], [3,4]]와 [[10, 20], [10,20]]의 component-wise product
>>> x = np.array([[51,55], [14,19], [0,4]])
>>> x = x.flatten()
>>> print(x)
[51, 55, 14, 19, 0, 4]