I have several 2D numpy arrays (matrix) and for each one I would like to convert it to vector containing the values of the array and a vector containing each row/column index.>
You can simply use loops.
x = np.array([[3, 1, 4], [1, 5, 9], [2, 6, 5]]) values = [] coordinates = [] data_frame = [] for v in xrange(len(x)): for h in xrange(len(x[v])): values.append(x[v][h]) coordinates.append((h, v)) data_frame.append(x[v][h], h, v) print '%s | %s | %s' % (x[v][h], v, h)