Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Jorge Scandaliaris
Benjamin Root ben.root@... writes: snip Essentially, you make a Path object using the vertices, and then use its contains_point() method. Ben Root OK, but given that contains_point works with a *single* point at a time, I have to call it for all my points which is a bit more cumbersome,

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Dharhas Pothina
+ one on this issue. One of the big advantages of the nxutils points in poly is that you could pass it a large numpy array of points and get back a mask. We found this to be significantly faster than using looping through the single point in poly algorithms from packages like shapely. Echoing

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread John Hunter
On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root ben.r...@ou.edu wrote: +1 as well. I just took another look at the Path object and I see no such function. The lack of this function is a problem for me as well in my existing apps. In order to deprecate nxutils, this functionality needs to

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Ryan May
On Thu, Mar 8, 2012 at 10:47 AM, John Hunter jdh2...@gmail.com wrote: I prefer option 2 because this is fairly easy and avoids code redundancy.  It would take just a few lines of extra code to do this with the python sequence protocol as inputs and python lists as return values.  It would take

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Benjamin Root
On Thu, Mar 8, 2012 at 10:47 AM, John Hunter jdh2...@gmail.com wrote: On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root ben.r...@ou.edu wrote: +1 as well. I just took another look at the Path object and I see no such function. The lack of this function is a problem for me as well in my

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Michael Droettboom
_path.cpp already has a number of methods that use Numpy arrays (John is mistaken that it doesn't depend on Numpy), so adding another is no problem. It was my understanding that nxutils was an internal usage module and not part of the public API, and therefore could be removed as long as

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Eric Firing
On 03/08/2012 07:16 AM, Benjamin Root wrote: On Thu, Mar 8, 2012 at 10:47 AM, John Hunter jdh2...@gmail.com mailto:jdh2...@gmail.com wrote: On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root ben.r...@ou.edu mailto:ben.r...@ou.edu wrote: +1 as well. I just took another look

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Michael Droettboom
On 03/08/2012 12:35 PM, Michael Droettboom wrote: It shouldn't be a problem to build a compatibility shim -- I'd much rather do that than have multiple functions Oops -- hit send too soon. I meant to say I'd much rather do that than have multiple functions that do virtually the same thing

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Michael Droettboom
There is a proposed solution to all of this here: https://github.com/matplotlib/matplotlib/pull/746 Please test -- I don't have any nxutils-using code myself, and matplotlib itself has none. We should probably convert some of the nxutils code in the wild into some unit tests. Mike On

[Matplotlib-users] Has nxutils been removed from mpl?

2012-03-07 Thread Jorge Scandaliaris
Hi, I've had an import error with some of my code, specifically with nxutils (I need it for using points_inside_poly). In [1]: import matplotlib.nxutils as nx --- ImportError Traceback (most

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-07 Thread Benjamin Root
On Wed, Mar 7, 2012 at 10:46 AM, Jorge Scandaliaris jorgesmbox...@yahoo.eswrote: Hi, I've had an import error with some of my code, specifically with nxutils (I need it for using points_inside_poly). In [1]: import matplotlib.nxutils as nx

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-07 Thread Michael Droettboom
On 03/07/2012 11:59 AM, Benjamin Root wrote: On Wed, Mar 7, 2012 at 10:46 AM, Jorge Scandaliaris jorgesmbox...@yahoo.es mailto:jorgesmbox...@yahoo.es wrote: Hi, I've had an import error with some of my code, specifically with nxutils (I need it for using points_inside_poly).

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-07 Thread John Hunter
On Wed, Mar 7, 2012 at 12:31 PM, Michael Droettboom md...@stsci.edu wrote: I agree that the deprecation process should have been followed better. However, I'm not sure what you mean by them being faster than their Pyhton counterparts. Both functions in nxutils are replaced by functions in

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-07 Thread Michael Droettboom
On 03/07/2012 01:39 PM, John Hunter wrote: On Wed, Mar 7, 2012 at 12:31 PM, Michael Droettboom md...@stsci.edu mailto:md...@stsci.edu wrote: I agree that the deprecation process should have been followed better. However, I'm not sure what you mean by them being faster than

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-07 Thread Benjamin Root
On Wed, Mar 7, 2012 at 12:44 PM, Michael Droettboom md...@stsci.edu wrote: On 03/07/2012 01:39 PM, John Hunter wrote: On Wed, Mar 7, 2012 at 12:31 PM, Michael Droettboom md...@stsci.eduwrote: I agree that the deprecation process should have been followed better. However, I'm not sure