Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

join two numpy 2d array

import numpy as np

a = np.array([[0, 1, 3], [5, 7, 9]])
b = np.array([[0, 2, 4], [6, 8, 10]])
c = np.concatenate((a, b), axis=0)
print(c)

Output : 
[[ 0  1  3]
 [ 5  7  9]
 [ 0  2  4]
 [ 6  8 10]]
Comment

join two numpy arrays

numpy.concatenate([arr1, arr2]) # Joining arr1 and arr2
Comment

Concatenate 2 array numpy


a = np.array([1, 2, 3, 4])
b = np.array([5, 6, 7, 8])
np.concatenate((a, b))
Comment

PREVIOUS NEXT
Code Example
Python :: how to convert column to index in pandas 
Python :: how to extract month from date in python 
Python :: python get minute from datetime 
Python :: how to join a string by new line out of a list python 
Python :: mouse in pygame 
Python :: text adventure in python 
Python :: python is letter or number functin 
Python :: get columns based on dtype pandas 
Python :: convert dataframe column to float 
Python :: selenium proxy python chrome 
Python :: get all file names in a folder python 
Python :: show image jupyter notebook 
Python :: built in functions python 
Python :: How to develop a TCP echo server, in Python? 
Python :: pandas sample rows 
Python :: python detect internet connection 
Python :: normalize column pandas 
Python :: selenium close browser 
Python :: how to download a page in python 
Python :: pygame font 
Python :: pca python 
Python :: how to change opencv capture resolution 
Python :: No default language could be detected for django app 
Python :: python is not set from command line or npm configuration node-gyp 
Python :: fake user agent python 
Python :: getting dummies for a column in pandas dataframe 
Python :: min max scaler on one column 
Python :: scipy stats arithmetic mean 
Python :: SerialClient.py", line 41, in <module import queue ImportError: No module named queue 
Python :: python input with space 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =