[Numpy-discussion] matplotlib and numpy cause MemoryError

Mathew Yeates mat.yeates@gmail....
Wed Nov 18 16:13:45 CST 2009


The value of dims is constant and not particularly large. I also checked to
make sure I wasn't running out of memory. Are there other reasons for this
error?

Mathew

On Wed, Nov 18, 2009 at 1:51 PM, Robert Kern <robert.kern@gmail.com> wrote:

> On Wed, Nov 18, 2009 at 15:48, Mathew Yeates <mat.yeates@gmail.com> wrote:
> > Hi
> >
> > I have a line of matplotlib code
> >
> > -self.ax.plot(plot_data,mif)
> >
> >
> >
> > that causes the line
> >
> > -self.data=numpy.zeros(shape=dims)
> >
> >
> >
> > to throw a MemoryError exception.
> >
> > (if I comment out the first line I get no error.)
> >
> > This is on a windows xp machine with latest numpy and the latest
> matplotlib.
> >
> >
> >
> > I have a feeling this may be a nightmare to figure out what matplotlib
> > and/or numpy are doing wrong. Any ideas where I can start?
>
> Print out dims just before the second line to make sure that it is
> reasonable. A MemoryError is raised when numpy cannot allocate enough
> memory on your system. If dims is too large for some reason, you could
> run into that limit. It might be because what you are trying to plot
> is simply too large or there might possibly (but unlikely) be a bug
> that is miscalculating dims.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091118/6b641123/attachment.html 


More information about the NumPy-Discussion mailing list