On Tue, Jan 8, 2013 at 8:47 AM, David Ketcheson <notifications@github.com>wrote:

> In src/pyclaw/solver.py:
>
> > @@ -725,6 +726,13 @@ def write_gauge_values(self,solution):
> >                  q=solution.state.q[:,ix,iy]
> >              p=self.compute_gauge_values(q,aux)
> >              t=solution.t
> > +            if solution.state.keep_gauges:
> > +                gauge_data = solution.state.gauge_data
> > +                try:
> > +                    gauge_data[i]=np.vstack((gauge_data[i],np.append(t,p)))
> > +                except:
>
> Under what circumstances would this exception be raised?
>

gauge_data is a list of ndarray objects. I've initialized it with an empty
list. for certain element gauge_data[i],
when I want to add the first row, I need to append the first row to the
list (the except clause). But when adding
the subsequent rows for the gauges i, I'll need to append that row to the
existing ndarray object. So mainly the except would be flagged by something
like index out of range exception when attempting to access gauge_data[i]
for the first time

-- 

------------------------------
This message and its contents, including attachments are intended solely 
for the original recipient. If you are not the intended recipient or have 
received this message in error, please notify me immediately and delete 
this message from your computer system. Any unauthorized use or 
distribution is prohibited. Please consider the environment before printing 
this email.