Combine two numpy matrixes

Question

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?


Show source
| numpy   | matrix   | append   2017-01-02 16:01 1 Answers

Answers to Combine two numpy matrixes ( 1 )

  1. 2017-01-02 16:01

    Use concatenate:

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

Leave a reply to - Combine two numpy matrixes

◀ Go back