2025.01.13...
In [2]:import numpy as nparr = np.array([[1,2,3],[4,5,6]])arr Out[2]:array([[1, 2, 3], [4, 5, 6]]) In [6]:arr+arr #벡터화 element-wise#요소별로 계산 Out[6]:array([[ 2, 4, 6], [ 8, 10, 12]]) In [5]:arr/arr Out[5]:array([[1., 1., 1.], [1., 1., 1.]]) In [8]:lst = [[1,2,3],[4,5,6]]lst+lst #리스트는 안됨 Out[8]:[[1, 2, 3], [4, 5, 6], [1, 2, 3], [4, 5, 6]] In [11]:lit = [[1,2,3],[4,5,6]]lit2 = li..
Data School
2025. 1. 13. 15:52