Q:

concatenating tuples of array within a tuple

I have a tuple which contains many tuples. Each tuple within my main tuple has two elements --
the first element is an array with a shape of (700,) and the second
element is a integer. 
Here is a small representation of my tuple:
x =( (np.array[3,3,3],1), (np.array[4,4,4],2), (np.array[5,5,5],3))

I'm looking to combine all the arrays into one big matrix, and all the integers into one column vector, which all fit into one tuple.
So my output should be something like this:
y= (np.array([[3,3,3],[4,4,4], [5,5,5]]),   np.array([1,2,3]))

One tuple with the first element as an array with shape (3,3), and the second element as an array 
     with a shape of (3,)
I'm assuming we can use one of numpy's stack methods but I can't wrap my head
around how to access all elements of the tuples to do so. 
Thank you. 

A:

>>> x = ((np.array([3,3,3]),1), (np.array([4,4,4]),2), (np.array([5,5,5]),3))
>>> y = (np.array([e for e, _ in x]), np.array([i for _, i in x]))
(array([[3, 3, 3],
        [4, 4, 4],
        [5, 5, 5]]), array([1, 2, 3]))

Or, without comprehensions:
>>> map(np.array, zip(*x))
[array([[3, 3, 3],
        [4, 4, 4],
        [5, 5, 5]]), array([1, 2, 3])]

