python np.hstack
import numpy as np
arr1 = np.array([1, 2, 3])
arr2 = np.array([4, 5, 6])
# print('np.vstack((arr1, arr2)):', np.vstack((arr1, arr2)))
print('np.hstack((arr1, arr2)):', np.hstack((arr1, arr2)))
# np.hstack((arr1, arr2)): [1 2 3 4 5 6]
a1 = np.array([[1, 2], [3, 4], [5, 6]])
a2 = np.array([[7, 8], [9, 10], [11, 12]])
# print('a1:', a1)
# print('a2:', a2)
print("np.hstack((a1, a2)):", np.hstack((a1, a2)))
'''
np.hstack((a1, a2)): [[ 1 2 7 8]
[ 3 4 9 10]
[ 5 6 11 12]]
'''
相關文章
- 【python】python安裝Python
- python ----python的安裝Python
- python:python的多程式Python
- python--- 之The program 'python' can be found in the following packages: * python-minimal * python3PythonPackage
- Python IDLE和Python的區別!Python入門教程Python
- python學習之初識pythonPython
- 【Python】python類的繼承Python繼承
- Python 序列化(Python IO)Python
- Python合集之Python函式Python函式
- pythonPython
- python _Python
- python教程(一)·python環境搭建Python
- 學習Python的日子 Python(6)Python
- [python] Python型別提示總結Python型別
- Python補充02 Python小技巧Python
- 小白自學Python(一) -- Python教程Python
- Python之將Python字串生成PDFPython字串
- Python 字串格式化(Python IO)Python字串格式化
- Python 檔案讀寫(Python IO)Python
- 『python入門:』 python的介紹Python
- 與 Python 之父聊天:更快的 Python!Python
- python(python中的super函式、)Python函式
- python中#!/usr/bin/python與#!/usr/bin/env python的區別Python
- Python入門:Python 2與Python3有什麼區別?Python
- 學習Python選擇Python2還是Python3呢?Python
- Python學習筆記|Python之程式Python筆記
- Python 筆記-2-1-Python 概述Python筆記
- Python 微服務開發--Python Microservices DevelopmentPython微服務ROSdev
- python SQL基礎與python互動PythonSQL
- 「Python」Convert map object to numpy array in python 3PythonObject
- 【Python】阿里雲python sdk快速入門Python阿里
- Python - opencv-python 獲取影片尺寸PythonOpenCV
- Python基礎篇-Python基礎01Python
- Python基礎之Python資料世界Python
- 有趣的Python:Python控制鍵盤滑鼠Python
- Python是什麼?Python有哪些框架?Python框架
- Python的容器有哪些?Python課程Python
- 小白自學Python(五)Python運算子Python