Remove a copy in pcolormesh. by anntzer · Pull Request #6677 · matplotlib/matplotlib · GitHub
Skip to content

Remove a copy in pcolormesh. - #6677

Merged
tacaswell merged 1 commit into
matplotlib:masterfrom
anntzer:copyless-pcolormesh
Oct 11, 2016
Merged

tacaswell merged 1 commit into
matplotlib:masterfrom
anntzer:copyless-pcolormesh

Conversation

@anntzer

@anntzer anntzer commented Jul 3, 2016

Copy link
Copy Markdown
Contributor

This slightly increases the size of the maximum pcolormesh before
hitting a MemoryError. Test with

N = 6000; x, y = mgrid[:N, :N]; z = sin(x + y); pcolormesh(x, y, z)

The patch raises the maximum N to ~8000 on my system (depending on the
load).

OTOH, this probably(?) makes pcolormesh sensitive to later changes in
the input array.

Thoughts?

This slightly increases the size of the maximum pcolormesh before
hitting a MemoryError.  Test with

    N = 6000; x, y = mgrid[:N, :N]; z = sin(x + y); pcolormesh(x, y, z)

The patch raises the maximum N to ~8000 on my system (depending on the
load).

OTOH, this probably(?) makes pcolormesh sensitive to later changes in
the input array.
@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jul 3, 2016
@efiring

efiring commented Jul 3, 2016

Copy link
Copy Markdown
Member

@anntzer

anntzer commented Jul 3, 2016

Copy link
Copy Markdown
Contributor Author

On coordinates or on the data as well?
Actually perhaps it would makes sense to use float32 internally everywhere given that the extra precision of float64 is unlikely to ever matter?

@efiring

efiring commented Jul 3, 2016

Copy link
Copy Markdown
Member

Yes, it seems to me that double precision is overkill for coordinates and for data, in almost all plotting situations. The question then is whether it is worth the trouble--and if so, when--to convert to single precision.

@NelleV NelleV changed the title Remove a copy in pcolormesh. [MRG+1] Remove a copy in pcolormesh. Oct 11, 2016
@tacaswell

Copy link
Copy Markdown
Member

@tacaswell
tacaswell merged commit dc752b3 into matplotlib:master Oct 11, 2016
@QuLogic QuLogic changed the title [MRG+1] Remove a copy in pcolormesh. Remove a copy in pcolormesh. Oct 16, 2016
@anntzer
anntzer deleted the copyless-pcolormesh branch February 23, 2017 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants