Re: [matplotlib-devel] hexbin and nans

2008-07-21 Thread Eric Firing
Andrew Straw wrote: >> may be the quickest and most general way to do it. I believe >> ~np.isfinite is both more general and significantly faster than np.isnan. > > Clever, but it won't work as-is. np.isfinite('b') returns a > NotImplementedType, and a default argument to scatter is c='b', which

Re: [matplotlib-devel] hexbin and nans

2008-07-18 Thread Fernando Perez
On Fri, Jul 18, 2008 at 4:17 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: > Yes, good idea. (In fact I wonder why numpy doesn't have minmax.) I've often wondered this myself... Cheers, f - This SF.Net email is sponsored by

Re: [matplotlib-devel] hexbin and nans

2008-07-18 Thread Andrew Straw
Eric Firing wrote: > John Hunter wrote: >> On Fri, Jul 18, 2008 at 4:42 PM, Andrew Straw <[EMAIL PROTECTED]> >> wrote: >> >>> If you're happy with that extra cost, I'll modify >>> axes.delete_masked_points() so that hexbin and scatter are automatically >>> filtered in this way. Given the speed comp

Re: [matplotlib-devel] hexbin and nans

2008-07-18 Thread Eric Firing
John Hunter wrote: > On Fri, Jul 18, 2008 at 4:42 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: > >> If you're happy with that extra cost, I'll modify >> axes.delete_masked_points() so that hexbin and scatter are automatically >> filtered in this way. Given the speed complaints we sometimes get, I w

Re: [matplotlib-devel] hexbin and nans

2008-07-18 Thread John Hunter
On Fri, Jul 18, 2008 at 4:42 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: > If you're happy with that extra cost, I'll modify > axes.delete_masked_points() so that hexbin and scatter are automatically > filtered in this way. Given the speed complaints we sometimes get, I was > hesitant to add anoth

Re: [matplotlib-devel] hexbin and nans

2008-07-18 Thread Andrew Straw
John Hunter wrote: > On Fri, Jul 18, 2008 at 2:49 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: > >> I just spent a little time getting hexbin to discard nans without >> failing in mysterious ways. >> >> I'm sending 2 patches: one will detect nans and raise a suitable >> exception. The other will

Re: [matplotlib-devel] hexbin and nans

2008-07-18 Thread John Hunter
On Fri, Jul 18, 2008 at 2:49 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: > I just spent a little time getting hexbin to discard nans without > failing in mysterious ways. > > I'm sending 2 patches: one will detect nans and raise a suitable > exception. The other will automatically drop the nans and

[matplotlib-devel] hexbin and nans

2008-07-18 Thread Andrew Straw
I just spent a little time getting hexbin to discard nans without failing in mysterious ways. I'm sending 2 patches: one will detect nans and raise a suitable exception. The other will automatically drop the nans and continue with hexbin. The 2nd seems a little nicer in functionality, but the code