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使用redisPythonRedis
- Python 之父談 PythonPython
- 【Python】python練習Python
- 【Python】python 日期操作Python
- python ----python的安裝Python
- python:python的多程式Python
- 【Python】Python連線mysqlPythonMySql
- Python 3 能振興 PythonPython
- 【Python】Python安裝模組Python
- 【python】python APScheduler 框架Python框架
- python學習之初識pythonPython
- Python 序列化(Python IO)Python
- Python合集之Python函式Python函式
- 【Python】python類的繼承Python繼承
- 小白自學Python(一) -- Python教程Python
- 為Python加速 - python+memcachedPython
- Python 3 正在毀滅 PythonPython
- Python補充06 Python之道Python
- [python]python錯誤集錦Python
- Python list of class attributes - PythonPython
- 【python】Python 3 的新特性Python
- python--- 之The program 'python' can be found in the following packages: * python-minimal * python3PythonPackage
- python _Python
- PythonPython
- Python IDLE和Python的區別!Python入門教程Python
- Python補充02 Python小技巧Python
- Python 字串格式化(Python IO)Python字串格式化
- Python 檔案讀寫(Python IO)Python
- Python之將Python字串生成PDFPython字串
- python教程(一)·python環境搭建Python
- 小白自學Python(五)Python運算子Python
- 小白自學Python(六)Python字串(上)Python字串
- [python] Python型別提示總結Python型別
- 與 Python 之父聊天:更快的 Python!Python
- 『python入門:』 python的介紹Python
- python(python中的super函式、)Python函式
- 【python爬蟲】python爬蟲demoPython爬蟲