create a 2-dimensional ndarray from the given 1-dimensional list code example
Example: python convert two dimensional list to one dimensional
# Python convert 2D into 1D array:
import itertools
x = [['foo'], ['bar', 'baz'], ['quux'], ("tup_1", "tup_2"), {1:"one", 2:"two"}]
print list(itertools.chain(*x))
print [element for sub in x for element in sub]
# Output:
['foo', 'bar', 'baz', 'quux', 'tup_1', 'tup_2', 1, 2]