Re: [Numpy-discussion] resizing arrays

2008-02-15 Thread Charles R Harris
On Fri, Feb 15, 2008 at 6:49 AM, Neal Becker <[EMAIL PROTECTED]> wrote: > I have a situation where I'm going to save some data sets to plot, but I > don't know a-priori how many sets there will be. I'm using this code: > > try: > shape = list(phase_plots.shape) > shape[0] += 1 > phase_plots.re

[Numpy-discussion] resizing arrays

2008-02-15 Thread Neal Becker
I have a situation where I'm going to save some data sets to plot, but I don't know a-priori how many sets there will be. I'm using this code: try: shape = list(phase_plots.shape) shape[0] += 1 phase_plots.resize (shape, refcheck=0) except NameError: phase_plots = empty ((1, 2*iterations+