How to make a numpy ndarray from several numpy arrays I am not to figure out how to form a ndarray from existing numpy arrays.
Suppose I have three arrays - index, distA, and distB.
Now the I want to form a ndarray of these three arrays

What I have tried - 

&gt;&gt;&gt; indices = np.array([[5,7,4], [6,4,8]])
&gt;&gt;&gt; distances = np.array([[0.2, 0.3, 0.4], [0.3, 0.4, 0.5]])
&gt;&gt;&gt; np.column_stack((indices, distances))
array([[5. , 7. , 4. , 0.2, 0.3, 0.4],
   [6. , 4. , 8. , 0.3, 0.4, 0.5]])


But I want to form a table-like structure so that I can retrieve values in distA and distB.

5, 0.2, 0
7, 0.3, 0
4, 0.4, 0.4
6, 0, 0.3
8, 0, 0.5


Is it possible to do this with numpy?
If your purpose is to deal with some data analysis from your arrays and have a nice view of it, try this using pandas:

import pandas as pd


df = pd.DataFrame({'distA' : np.array([0.2, 0.3, 0.4]),
                   'distB' : np.array([0.3, 0.4, 0.5])})


df




In the case you want to make computation with vectors, matrixes, tensors, etc .. NumPy is probably a good option. I didn't understand exactly what you've asked, though. Can you explain me what you're asking?