also, the exception is only thrown when I plot something first. I wonder if
matplotlib is messing something up.

On Wed, Nov 18, 2009 at 2:13 PM, Mathew Yeates <[email protected]> wrote:

> 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 <[email protected]>wrote:
>
>> On Wed, Nov 18, 2009 at 15:48, Mathew Yeates <[email protected]>
>> 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
>> [email protected]
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>
>
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to