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)
Answer from Falko on Stack Overflow
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-concatenate-two-2-dimensional-numpy-arrays
How to Concatenate two 2-dimensional NumPy Arrays? - GeeksforGeeks
July 15, 2025 - # Program to concatenate two 2D arrays column-wise # import numpy import numpy as np # Creating two 2D arrays arr1 = np.arange(1,10).reshape(3,3) arr2 = np.arange(10,19).reshape(3,3) arr1 arr2 # Concatenating operation # axis = 1 implies that it is being done column-wise np.concatenate((arr1,arr2),axis=1)
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.concatenate.html
numpy.concatenate โ€” NumPy v2.5 Manual
Join a sequence of arrays along an existing axis. New in version 2.0: numpy.concat added as a shorthand for numpy.concatenate.
๐ŸŒ
w3resource
w3resource.com โ€บ python-exercises โ€บ numpy โ€บ python-numpy-exercise-58.php
NumPy: Concatenate two 2-dimensional arrays - w3resource
August 29, 2025 - c = np.concatenate((a, b), 1): The np.concatenate() function is used to join the two arrays โ€˜aโ€™ and โ€˜bโ€™ along the second axis (axis=1). The resulting array โ€˜cโ€™ has the shape (2, 6), with the columns of โ€˜bโ€™ appended to the columns ...
๐ŸŒ
Codecademy
codecademy.com โ€บ article โ€บ numpy-concatenate
How to Use np.concatenate() in NumPy (With Examples and Comparisons) | Codecademy
If set to 1, the arrays are joined along the second dimension (i.e., horizontally for 2D arrays). If set to None, the arrays are flattened before concatenation. out (Optional): A NumPy array for storing the result.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ numpy โ€บ numpy_array_join.asp
NumPy Joining Array
In SQL we join tables based on a key, whereas in NumPy we join arrays by axes. We pass a sequence of arrays that we want to join to the concatenate() function, along with the axis.
๐ŸŒ
Python Guides
pythonguides.com โ€บ python-numpy-concatenate
NumPy Concatenate Vs Append - Python Guides
May 6, 2025 - NumPyโ€™s append() function allows you to combine 2D arrays by flattening or appending along a specific axis.
๐ŸŒ
Tutorial Gateway
tutorialgateway.org โ€บ python-numpy-concatenate
Python numpy concatenate
September 24, 2019 - The Python Numpy concatenate function is used to join two or more arrays together and returns a concatenated ndarray as an output.
Find elsewhere
๐ŸŒ
Codecademy
codecademy.com โ€บ docs โ€บ python:numpy โ€บ built-in functions โ€บ .concatenate()
Python:NumPy | Built-in Functions | .concatenate() | Codecademy
May 1, 2025 - To append one NumPy array to another, use the .concatenate() function with the arrays in a sequence: ... np.concatenate() joins arrays along an existing axis, while np.stack() adds a new axis (e.g., stacking rows into a 2D array).
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-to-concatenate-two-2-dimensional-numpy-arrays
NumPy - Concatenating Arrays
July 21, 2023 - You can join arrays in Numpy using the concatenate() function available in the NumPy module.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ numpy โ€บ numpy_concatenate.htm
Numpy Concatenate() Function
Here in the below example we show how to concatenate two 2-D arrays along the rows (axis=0), resulting in a single 2-D array with more rows. import numpy as np # Define two 2-D arrays array1 = np.array([[1, 2], [3, 4]]) array2 = np.array([[5, 6], [7, 8]]) # Concatenate along axis 0 (rows) result = np.concatenate((array1, array2), axis=0) print("Result of concatenation along axis 0:", result)
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python โ€บ numpy
NumPy: Concatenate arrays with np.concatenate, np.stack, etc. | note.nkmk.me
February 4, 2024 - It is essentially equivalent to np.concatenate() with axis=2, but arrays of 2D or fewer are expanded to 3D before concatenation. numpy/numpy/lib/shape_base.py at v1.26.1 ยท
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 71637382 โ€บ how-to-concatenate-numpy-arrays-to-create-a-2d-numpy-array
python - How to concatenate numpy arrays to create a 2d numpy array - Stack Overflow
I've tried reshaping the final list and many other things and had no luck. It either populates each number in the row and adds it to the first dimension, IE (5840,) I was expecting to be able to append each new drawing to a master list, convert to numpy array and reshape it to the 292 rows of 20 columns.
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ reference โ€บ generated โ€บ numpy.concatenate.html
numpy.concatenate โ€” NumPy v2.6.dev0 Manual
Join a sequence of arrays along an existing axis. Added in version 2.0: numpy.concat added as a shorthand for numpy.concatenate.
๐ŸŒ
Codefinity
codefinity.com โ€บ courses โ€บ v2 โ€บ 4f4826d5-e2f8-4ffd-9fd0-6f513353d70a โ€บ a4da9564-36a0-4109-b920-88fc7b89ddbb โ€บ 01c5aec4-0b6c-44fa-90b2-fc36fee4898a
Learn Array Concatenation | Commonly used NumPy Functions
Essentially, concatenation involves joining arrays together to form a new array. NumPy has a concatenate() function that enables you to concatenate arrays along a specified axis:
๐ŸŒ
IncludeHelp
includehelp.com โ€บ python โ€บ how-to-concatenate-2d-arrays-with-1d-array-in-numpy.aspx
Python - How to concatenate 2D arrays with 1D array in NumPy?
Secondly, we can use the column_stack() method to stack the 1D array to the 2D array along the column and third we can use the row_stack() method to stack the 1D array to the 2D array along the rows. ... # Import numpy import numpy as np # Creating arrays arr1 = np.array([20, 30]) arr2 = np.array( ...
๐ŸŒ
Kanoki
kanoki.org โ€บ 2020 โ€บ 01 โ€บ 10 โ€บ concatenating-arrays-in-numpy
Concatenating arrays in Numpy | kanoki
January 10, 2020 - Now we will concatenate this along rows to get a 2D array ยท Using numpy vstack ยท np.vstack((a,b)) array([[1, 2, 3], [2, 3, 4]]) Using numpy concatenate ยท For this you have to reshape the original arrays ยท np.concatenate([a.reshape(1,3),b.reshape(1,3)]) array([[1, 2, 3], [2, 3, 4]]) if you want to concatenate these two arrays along axis = 1 ยท