# Numpy

### Numpy?

#### 📚 Numpy는 C언어로 구현된 파이썬 라이브러리로써, 고성능의 수치 계산을 위해 제작되었습니다. Numpy는 벡터 및 행렬 연산에 있어서 매우 편리한 기능을 제공합니다.

```python
import numpy as np

# 1차원 배열
vec = np.array([1, 2, 3, 4, 5])
print(vec)

################
[1 2 3 4 5]
################

# 2차원 배열
mat = np.array([[10, 20, 30], [ 60, 70, 80]]) 
print(mat)

################
[[10 20 30]
 [60 70 80]]
################

# 1씩 증가하는 1차원 배열(시작이 0부터)

print(np.arange(10)) 

################ 
[0 1 2 3 4 5 6 7 8 9]
################

# 1씩 증가하는 1차원 배열(시작이 5부터)

print(np.arange(5, 10)) 

################
[5 6 7 8 9]
################

# 영행렬 생성

print(np.zeros((2,2)))  

################
 [[0. 0.]
  [0. 0.]]
################

# 유닛행렬

print(np.ones((2,3)))  

################
 [[1. 1. 1.]
  [1. 1. 1.]]
################

# 모든 원소가 5인 2*3행렬

print(np.full((2,3), 5)) 

################
 [[5 5 5]
  [5 5 5]]
################

# 단위행렬

print(np.eye(3)) 

################
 [[1. 0. 0.]
  [0. 1. 0.]
  [0. 0. 1.]]
################
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nmdkims-organization.gitbook.io/python-hand-book/day3./2.-numpy-pandas/numpy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
