[SciPy-user] Graceful concatenation to a "zero" dimension narray?

Webb Sprague webb.sprague at gmail.com
Sun May 14 23:42:49 EDT 2006


Is there a nice way to make N.array([0.0,1.0,2.0,3.0]) into
N.array([-1.0,0.0, 1.0,2.0,3.0, 4.0])?  With regular lists in Python,
I would write [-1.0] +[0.0,1.0,2.0,3.0] + [4.0].  I can only imagine
multiple line things with reshape and friends, but maybe there is a
better answer.

Thanks!




More information about the SciPy-User mailing list