[SciPy-user] concatenate array with number

Nicolas Chopin nicolas.chopin at bristol.ac.uk
Thu Aug 7 11:37:01 EDT 2008


    Hi list,
I want to do this:
x = concatenate( (x,x[-1]) )
i.e. append to 1d array x its last element.
However, the only way I managed to do this is:
x  = concatenate( (x,array(x[-1],ndmin=1)) )
which is a bit cryptic. (if you remove ndmin, it does not work.)

1. Is there a better way?
2. Could concatenate accept floating point numbers as arguments for 
convenience?

Thanks in advance,
Nicolas
<http://www.stats.bris.ac.uk/%7Emanxac/>
<http://www.stats.bris.ac.uk/%7Emanxac/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080807/1934cae9/attachment.html>


More information about the SciPy-User mailing list