[Numpy-discussion] force column vector

Christian ckkart@hoc....
Wed Feb 7 04:35:14 CST 2007


Hi,

when creating an ndarray from a list, how can I force the result to be
2d *and* a column vector? So in case I pass a nested list, there will be no
modification of the shape and when I pass a simple list, it will be 
converted to a 2d column vector. I can only think of a solution using 'if'
clauses but I suppose there is a more elegant way.

Thanks, Christian





More information about the Numpy-discussion mailing list