user7347576
user7347576

Reputation: 236

Combine two numpy matrixes

I have two numpy matrixes:

name    dimensions
title   (284,855)
para    (284, 4930)

The title array contains the title of a page and the para contains the content where the first element of the title array is the title for the first element of the para array. I wish to append them, to create a new matrix, X, with the dimensions (284, 5785). How can I do this using Python?

Upvotes: 1

Views: 68

Answers (1)

vbox
vbox

Reputation: 384

Use concatenate:

import numpy as np
new_matrix = np.concatenate((title, para), axis=1)

Upvotes: 3

Related Questions