데이터 공부기록

INTRO-What is NumPy? 본문

sesac ai 과정/NUMPY

INTRO-What is NumPy?

standingR 2023. 10. 6. 18:17

 

출처 - https://numpy.org/

 

INTRO-What is NumPy?

- 시간이 나거나 영어 공부를 대신해서 개발 문서를 번역하면서 업데이트 할것!

 

 

At the core of the NumPy package, is the  *ndarray  object. This encapsulates n-dimensional arrays of homogeneous data types, with many operations being performed in compiled code for performance. There are several important differences between NumPy arrays and the standard Python sequences:

*ndarry - n차원배열의 약자 단순히 임의 개수의 차원 가진배열

 

  • NumPy arrays have a fixed size at creation, unlike Python lists (which can grow dynamically). Changing the size of an ndarray will create a new array and delete the original.
  • The elements in a NumPy array are all required to be of the same data type, and thus will be the same size in memory. The exception: one can have arrays of (Python, including NumPy) objects, thereby allowing for arrays of different sized elements.
  • NumPy arrays facilitate advanced mathematical and other types of operations on large numbers of data. Typically, such operations are executed more efficiently and with less code than is possible using Python’s built-in sequences.
  • A growing plethora of scientific and mathematical Python-based packages are using NumPy arrays; though these typically support Python-sequence input, they convert such input to NumPy arrays prior to processing, and they often output NumPy arrays. In other words, in order to efficiently use much (perhaps even most) of today’s scientific/mathematical Python-based software, just knowing how to use Python’s built-in sequence types is insufficient - one also needs to know how to use NumPy arrays.