Numpy concatenate 2D arrays with 1D array

Try concatenating X_Yscores[:, None] (or X_Yscores[:, np.newaxis] as imaluengo suggests). This creates a 2D array out of a 1D array.

Example:

A = np.array([1, 2, 3])
print A.shape
print A[:, None].shape

Output:

(3,)
(3,1)

I am not sure if you want something like:

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

c = a.ravel()
con = np.concatenate( (c,b ) )

array([1, 2, 3, 4, 5, 6])

OR

np.column_stack( (a,b) )

array([[1, 2, 5],
       [3, 4, 6]])

np.row_stack( (a,b) )

array([[1, 2],
       [3, 4],
       [5, 6]])