当前位置:网站首页>numpy.hstack
numpy.hstack
2022-08-01 23:21:00 【Wanderer001】
numpy.hstack(tup)[source]
Stack arrays in sequence horizontally (column wise).
This is equivalent to concatenation along the second axis, except for 1-D arrays where it concatenates along the first axis. Rebuilds arrays divided by hsplit.
This function makes most sense for arrays with up to 3 dimensions. For instance, for pixel-data with a height (first axis), width (second axis), and r/g/b channels (third axis). The functions concatenate, stack and block provide more general stacking and concatenation operations.
Parameters:tup:sequence of ndarrays
The arrays must have the same shape along all but the second axis, except 1-D arrays which can be any length.
Returns:stacked:ndarray
The array formed by stacking the given arrays.
See also
Join a sequence of arrays along a new axis.
Stack arrays in sequence vertically (row wise).
Stack arrays in sequence depth wise (along third axis).
Join a sequence of arrays along an existing axis.
Split array along second axis.
Assemble arrays from blocks.
Examples
>>> a = np.array((1,2,3))
>>> b = np.array((2,3,4))
>>> np.hstack((a,b))
array([1, 2, 3, 2, 3, 4])
>>> a = np.array([[1],[2],[3]])
>>> b = np.array([[2],[3],[4]])
>>> np.hstack((a,b))
array([[1, 2],
[2, 3],
[3, 4]])边栏推荐
- JAX-based activation function, softmax function and cross entropy function
- Thesis understanding [RL - Exp Replay] - Experience Replay with Likelihood-free Importance Weights
- 数据分析04
- ping no reply
- Interpretation of the paper (GSAT) "Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism"
- 6133. Maximum number of packets
- SQL Server(设计数据库--存储过程--触发器)
- Codeforces CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) A-D 题解
- C language - branch statement and loop statement
- leetcode刷题
猜你喜欢

论文理解【RL - Exp Replay】—— Experience Replay with Likelihood-free Importance Weights

牛客多校4 A.Task Computing 思维

【参营经历贴】2022网安夏令营

Deep Learning Fundamentals - Numpy-based Recurrent Neural Network (RNN) implementation and backpropagation training

仿牛客网项目第三章:开发社区核心功能(详细步骤和思路)

chrome copies the base64 data of an image

文件查询匹配神器 【glob.js】 实用教程

测试岗月薪5-9k,如何实现涨薪到25k?

数据机构---第五章树与二叉树---二叉树的概念---应用题

C language - branch statement and loop statement
随机推荐
用virtualenv和Virtualenvwrapper虚拟环境管理工具创建虚拟环境
简单3D渲染器的制作
Avoid , ,
, and tagsSQL Server(设计数据库--存储过程--触发器)
visual studio code multiple editing
牛客多校4 A.Task Computing 思维
Chapter 11 Working with Dates and Times
Access the selected node in the console
【SeaTunnel】从一个数据集成组件演化成企业级的服务
Chapter 12 End-User Task As Shell Scripts
对于在新标签页中打开的链接,始终使用“noopener”或“noreferrer”
excel edit a cell without double clicking
如何更好的理解的和做好工作?
ROS2初级知识(8):Launching启动多节点
Secondary Vocational Network Security Competition B7 Competition Deployment Process
6132. All the elements in the array is equal to zero - quick sort method
How do programmers solve online problems gracefully?
云原生DevOps环境搭建
还在纠结报表工具的选型么?来看看这个
From 0 to 1: Design and R&D Notes of Graphic Voting Mini Program