Skip to content
Advertisement

Splicing NumPy arrays

I am having a problem splicing together two arrays. Let’s assume I have two arrays:

JavaScript

When I do vstack((a,b)) I get

JavaScript

and if I do hstack((a,b)) I get:

JavaScript

But what I really want is:

JavaScript

How do I accomplish this without using for loops (it needs to be fast)?

Advertisement

Answer

column_stack.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement