Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Bill Baxter
On Tue, Oct 14, 2008 at 2:56 PM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > Hi Matthew > > Here is an implementation in Python, ctypes and in weave: > > http://mentat.za.net/source/pnpoly.tar.bz2 > Thanks! Looks better than what I wrote. --bb __

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Stéfan van der Walt
Hi Matthew Here is an implementation in Python, ctypes and in weave: http://mentat.za.net/source/pnpoly.tar.bz2 Regards Stéfan ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] SWIG, typemaps, 2D argout arrays

2008-10-13 Thread T J
Hi, I'm new to using SWIG and my reading of numpy_swig.pdf tells me that the following typemap does not exist: (int* ARGOUT_ARRAY2, int DIM1, int DIM2) What is the recommended way to output a 2D array? It seems like I should use: (int* ARGOUT_ARRAY1, int DIM1) and then provide a python fu

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Bill Baxter
On Tue, Oct 14, 2008 at 8:46 AM, Pierre GM <[EMAIL PROTECTED]> wrote: >> 2008/10/13 Mathew Yeates <[EMAIL PROTECTED]> >> >> > Is there a routine in scipy for telling whether a point is inside a >> > convex 4 sided polygon? > > Mathew, > You could use OGR (www.gdal.org) > > Example > -

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Pierre GM
> 2008/10/13 Mathew Yeates <[EMAIL PROTECTED]> > > > Is there a routine in scipy for telling whether a point is inside a > > convex 4 sided polygon? Mathew, You could use OGR (www.gdal.org) Example - import osgeo.ogr as ogr vert = [(0,0),(0,1),(1,1),(1,0)] listvert = [" %s %s" % (x,

Re: [Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Angus McMorland
2008/10/13 Mathew Yeates <[EMAIL PROTECTED]> > Is there a routine in scipy for telling whether a point is inside a > convex 4 sided polygon? Not specifically in scipy, as far as I know, but there are several supplementary packages that provide this functionality, including matplotlib: http://p

[Numpy-discussion] how to tell if a point is inside a polygon

2008-10-13 Thread Mathew Yeates
Is there a routine in scipy for telling whether a point is inside a convex 4 sided polygon? Mathew ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Matthew Brett
I know, I know, last one... > http://www.catb.org/~esr/faqs/smart-questions.html I had forgotten this wise quote from the smart questions FAQ: "Be gentle. Problem-related stress can make people seem rude or stupid even when they're not." Best, Matthew __

[Numpy-discussion] End of Discussion (was Re: Need **working** code example of 2-D arrays)

2008-10-13 Thread Robert Kern
Linda has informed me that she has left the mailing list. Please consider this and all related threads closed. -- 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 t

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Peter Wang
On Oct 13, 2008, at 4:16 PM, Linda Seltzer wrote: > Alan, Stop tuyrning this around. Stop referring to my request as an > accusation and stop referring to your put-downs as a "correction." Linda, from what I can tell, the tone in this discussion thread changed from the "professional", "technic

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Linda Seltzer
This ia another example of non-scientific attacking that does not belong on the list. As I mentioned earlier: Please keep all non-mathematical or non-computer science remarks off the list. > Ordinarily I avoid becoming involved in such acrimony, but I take this > single > opportunity to state clea

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Daran Rife
Ordinarily I avoid becoming involved in such acrimony, but I take this single opportunity to state clearly that I find Linda Seltzer's behavior utterly rude and childish. Having been a "member" of this mailing list for over 6 years, I take exception to the pointless ranting and vitriolic comments

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Linda Seltzer
Alan, Stop tuyrning this around. Stop referring to my request as an accusation and stop referring to your put-downs as a "correction." > On Mon, Oct 13, 2008 at 2:29 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > >> The problem is, you did not just ask >> for technical information. You also >> acc

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Linda Seltzer
Your reply is inappropriate. it is not a "correction." A request was made to stop posting mail that did not concern math and you have continued with your put downs. Stop it. Just stop it. Stop it right now. > Linda Seltzer wrote: >> Where is the moderator? Please get these condescending, demean

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread John Hunter
On Mon, Oct 13, 2008 at 2:29 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > The problem is, you did not just ask > for technical information. You also > accused people of being condescending > and demeaning. But nobody was > condescending or demeaning. As several > people **politely** explained

Re: [Numpy-discussion] Using 2-D arrays in Numeric Python (numpy)

2008-10-13 Thread Robert Kern
On Mon, Oct 13, 2008 at 13:36, Linda Seltzer <[EMAIL PROTECTED]> wrote: > Christopher Barker wrote: >> No matter how you slice it, you're going to need to learn a bit about >> computer programming in general, and python in particular, in order to >> be productive with numpy. > WHERE IS THE MODERATO

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Alan G Isaac
Linda Seltzer wrote: > Where is the moderator? Please get these condescending, demeaning personal > comments off of this list. I asked technical question. Now please send > technical information only. The problem is, you did not just ask for technical information. You also accused people of bei

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Andrew Dalke
On Oct 13, 2008, at 7:21 AM, Linda Seltzer wrote: > Is there a moderator on the list to put a stop to these kinds of > statements? No. Andrew [EMAIL PROTECTED] ___ Numpy-discussion mai

Re: [Numpy-discussion] Priority rules between numpy scalars and 0d arrays

2008-10-13 Thread Pierre GM
Travis, > The problem is that there has never been a formal "resolution" (that I > recall) of when should something be returned as a 0-d array and when it > should be returned as a scalar. There is rather an informal > implementation of what actually happens. Ah. It might be worth putting the

Re: [Numpy-discussion] Using 2-D arrays in Numeric Python (numpy)

2008-10-13 Thread Linda Seltzer
Christopher Barker wrote: > No matter how you slice it, you're going to need to learn a bit about > computer programming in general, and python in particular, in order to > be productive with numpy. WHERE IS THE MODERATOR? I deserve not to be insulted in front of the professional community with per

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Linda Seltzer
Where is the moderator? Please get these condescending, demeaning personal comments off of this list. I asked technical question. Now please send technical information only. > Stéfan van der Walt wrote: >> I think you'll be hard pressed to find a more friendly, open and >> relaxed mailing list t

Re: [Numpy-discussion] Priority rules between numpy scalars and 0d arrays

2008-10-13 Thread Travis E. Oliphant
Pierre GM wrote: > All, > Sorry to bring back this subject, but I still haven't got any proper answers: > > * What are the priority rules between numpy scalars and 0d arrays ? > There aren't really any specified. However, there is behavior that emerges from what is specified. The problem is t

[Numpy-discussion] Priority rules between numpy scalars and 0d arrays

2008-10-13 Thread Pierre GM
All, Sorry to bring back this subject, but I still haven't got any proper answers: * What are the priority rules between numpy scalars and 0d arrays ? When multiplying a numpy scalar by a 0d array, shouldn't the __mul__ or __rmul__ methods of the array be called ? Should the result be a numpy sc

Re: [Numpy-discussion] Using 2-D arrays in Numeric Python (numpy)

2008-10-13 Thread Chris.Barker
Linda Seltzer wrote: > I would appreciate it if someone could answer my question without > referring to subjects such as APIs and interfaces, since I am only > concerned with a mathematical application at this time. caution: this is a bit rude -- that was an excellent and informative answer to yo

Re: [Numpy-discussion] Using 2-D arrays in Numeric Python (numpy)

2008-10-13 Thread Chris.Barker
Bill Baxter wrote: >import numpy as npy Bill, for what it's worth, I *think* this group has reached a consensus to use: import numpy as np We all have different tastes for how they might want to spell it, but the more consistent we are, the easier it will be for newbies. -Chris -- Chri

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Ryan May
Stéfan van der Walt wrote: > Linda, > > 2008/10/13 Linda Seltzer <[EMAIL PROTECTED]>: >>> Those statements are not demeaning; lighten up. >> STOP IT. JUST STOP IT. STOP IT RIGHT NOW. >> Is there a moderator on the list to put a stop to these kinds of statements? >> I deserve to be treated with r

Re: [Numpy-discussion] Need **working** code example of 2-D arrays

2008-10-13 Thread Stéfan van der Walt
Linda, 2008/10/13 Linda Seltzer <[EMAIL PROTECTED]>: >> Those statements are not demeaning; lighten up. > STOP IT. JUST STOP IT. STOP IT RIGHT NOW. > Is there a moderator on the list to put a stop to these kinds of statements? > I deserve to be treated with respect. > I deserve to have my questi