ndarray 썸네일형 리스트형 파이썬(python) Numpy와 ndarray? ● Numpy numpy를 사용하는 이유 : 파이썬 리스트(list)보다 빠름 메모리 사이즈 : 파이썬 리스트보다 적은 메모리 사용 Build-in 함수 : 선형대수, 통계 관련 여러 함수 내장 ● ndarray numpy에 사용되는 다차원 리스트를 표현할 때 사용되는 데이터 타입 연속된 메모리 사용 vs python list 연속되지 않은 메모리 명시적인 loop 사용 ● 예제 1 import numpy as np import matplotlib.pyplot as plt x = np.array([1,2,3]) y = np.array([4,5,6]) print(x) print(y) plt.plot(x, y) 결과 : ● 예제 2 import matplotlib.pyplot as plt x = [1, 2,.. 더보기 이전 1 다음