| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
- 배열형태변경
- 벡터연산
- npy
- 표본추출
- 논리배열
- SQL문제
- 배열연산
- 파일저장하기
- 넘파이
- 배열나누기
- Revising the Select Query I
- ndarray
- 배열자르기
- 넘파이장점
- 해커랭크
- Python
- 배열분리하기
- numpy
- 배열추가
- Revising the Select Query II
- concat
- reshape
- 파이썬
- 배열붙이기
- SQL
- fancyindexing
- CONCATENATE
- 랜덤샘플링
- 배열쪼개기
- buit-in exception
- Today
- Total
목록CONCATENATE (2)
기록하는 습관
Exercise 위와 같이 배열을 합치려고 한다. 두 배열이 아래와 같이 주어졌다고 하자. import numpy as np x = np.array([[1,2], [3,4]]) y = np.array([5,6]) print(x) print( "shape :", x.shape, "ndim :", x.ndim ) print(y) print( "shape :", y.shape, "ndim :", y.ndim ) [[1 2] [3 4]] shape : (2, 2) ndim : 2 [5 6] shape : (2,) ndim : 1 만약 배열 y가 아래와 같다면 바로 concat을 적용할 수 있다. y_ = np.array([[5],[6]]) print( y_ ) print( "shape :", y_.shape, ..
배열 붙이기 (Concatenate) import numpy as np np.concatenate() Docstring: concatenate((a1, a2, ...), axis=0, out=None, dtype=None, casting="same_kind") Join a sequence of arrays along an existing axis. 가장 간단해 보이는 concat 함수이지만 차원과 shape을 신경써서 써야 한다. a = np.array([1,2,3]) b = np.concatenate((a,a), axis=0) print( a ) print( "shape :", a.shape, "ndim :", a.ndim ) print( b ) print( "shape :", b.shape, "ndi..