[SciPy-user] how to make vectors and arrays of the same length ?
Sat Apr 28 02:46:41 CDT 2007
I've found a working solution for the problem,
but I'm not happy with it,
because I can't manage to do it without 2 transposes,
and I've the feeling my solution is much too complicated.
So I'ld be much obliged if someone gives me a better solution,
or tell me that this is thé solution.
# start with a 2-dimensional array
# we want to expand the second index with the last value
# get the last row
# now extend the row with 3 samples
And here is the result
[[1 2 3 3 3 3]
[4 5 6 6 6 6]]
More information about the SciPy-user