Fix Python – Transposing a 1D NumPy array

I use Python and NumPy and have some problems with “transpose”:
import numpy as np
a = np.array([5,4])

Invoking a.T is not transposing the array. If a is for example [[],[]] then it transposes correctly, but I need the transpose of […,…,…].

Fix Python – Transpose/Unzip Function (inverse of zip)?

I have a list of 2-item tuples and I’d like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item.
For example:
original = [(‘a’, 1), (‘b’, 2), (‘c’, 3), (‘d’, 4)]
# and I want to become…
result = ([‘a’, ‘b’, ‘c’, ‘d’], [1, 2, 3, 4])

Is there a builtin function that does that?….