On Fri, May 23, 2008 at 5:50 PM, Eric Firing <[EMAIL PROTECTED]> wrote:
> With all the commits coming in, I thought I would try running
> backend_driver.py Template to make sure things were still working.  When
> it got to mri_with_eeg, it stopped, initially cpu use was pegged, then
> my feisty box went into swap hell.  It took about 5 minutes to extract
> it; Ctrl-Cing the python process was not enough.
>
> Anyone have any idea what might have gone wrong?  I also tried running
> mri_with_eeg standalone, with gtkAgg backend, and it again ran away.  I
> stopped it before it rendered the machine completely unresponsive.

It appears the hist call is killing it (comment out that one line and
it runs fine).

Manuel recently made some changes to hist to support 2D arrays: a
nsamples x nvariables array will generate nvariables different
histograms lined up side by side.  In mir_with_eeg, the image data is
going into hist  with shape (1, 28399) so it is trying to do 28399
histograms with one element each.  I added some logic to handle this
case:

        x = np.asarray(x).copy()
        if len(x.shape)==2 and min(x.shape)==1:
            x.shape = max(x.shape),

        if len(x.shape)==2 and x.shape[0]<x.shape[1]:
            warnings.warn('2D hist should be nsamples x nvariables;
this looks transposed')

mri_with_eeg is working fine again in svn.

Manuel -- sorry I haven't gotten time to comment on the hist changes
but I think this is a very nice addition so thanks for adding it.
Just a reminder: when you make changes, it is good habit to run the
backend_driver.py example which may catch something you forgot to
test.  BTW - the new examples in histogram_demo_extended.py look
great.

JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to