Python numpy.expand_dims()

사용 버전: Python 3.7.6
사용 프로그램: Atom 1.45.0 x64


파이썬 numpy.expand_dims()에 대해서 알아보겠습니다.





괄호 안에는 a, axis 따위가 들어갑니다.

numpy.expand_dims()는 배열의 차원을 늘려줍니다.
a에는 늘려질 배열을 넣습니다.
axis는 몇 번째 차원의 크기를 늘릴 건지 숫자를 넣습니다.
axis = 0 일 때.








axis = 1 일 때.








axis = 2 일 때.














끝.


카테고리: Python, Numpy

댓글

이 블로그의 인기 게시물

Python urllib.parse.quote()

KiCad 시작하기 7 (FreeRoute 사용하기 2)

음악 총보(Score), 파트보(Part)

Forensics .pyc 파일 .py로 복구하기

KiCad 시작하기 3 (새로운 소자 추가하기)

Kivy 시작하기 12 (Pyinstaller로 exe 파일 만들기)

Android Compose automation for getting localized images to use on Play Store app image

딩기 요트 명칭

Android Default background color setting

Android App architecture: State holders and UI state