Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread Nils Wagner
David Cournapeau wrote: > Robert Kern wrote: > >> David Cournapeau wrote: >> >> >> >>> I am willing to volunteer for the scipy part: I have quite extensive >>> experience with building on linux now, and I can now build on windows >>> without too much difficulties (I mean hardware-wise)

Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread David Cournapeau
Robert Kern wrote: > David Cournapeau wrote: > > >> I am willing to volunteer for the scipy part: I have quite extensive >> experience with building on linux now, and I can now build on windows >> without too much difficulties (I mean hardware-wise). >> >> Concerning the release date: it basic

Re: [Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Robert Kern
Geoffrey Zhu wrote: > This is probably off the topic. Do you know such a function for > regular python objects? For example, I know a PyObject is a number, > but I don't know the exact type. Is there any quick way to convert it > to a C double type? I just answered your question on the python-lis

Re: [Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Geoffrey Zhu
On 7/26/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Geoffrey Zhu wrote: > > How do I handle this situation? Is there any way to access any data > > type that can be converted into a double? > I usually use PyArray_FROM_OTF(). That handles the usual cases. It's > pretty much > >>

Re: [Numpy-discussion] Change to get_printoptions?

2007-07-26 Thread Travis Oliphant
Zachary Pincus wrote: > Hello all, > > I just recently updated to the SVN version of numpy to test my code > against it, and found that a small change made to > numpy.get_printoptions (it now returns a dictionary instead of a > list) breaks my code. > > Here's the changeset: > http://projec

Re: [Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Robert Kern
Geoffrey Zhu wrote: > How do I handle this situation? Is there any way to access any data > type that can be converted into a double? I usually use PyArray_FROM_OTF(). That handles the usual cases. It's pretty much like starting off a pure Python function with asarray(x, dty

Re: [Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Geoffrey Zhu
> >>> How do I handle this situation? Is there any way to access any data > >>> type that can be converted into a double? > >> I usually use PyArray_FROM_OTF(). That handles the usual cases. It's > >> pretty much > >> like starting off a pure Python function with asarray(x, dtype=whatever). > >> >

Re: [Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Robert Kern
Geoffrey Zhu wrote: > On 7/26/07, Robert Kern <[EMAIL PROTECTED]> wrote: >> Geoffrey Zhu wrote: >>> Hi Everyone, >>> >>> I finally build a C extension. The one problem I found is that it is >>> too picky about the input. For example, it accepts >>> array([1.0,2.0,3.0]) with no problem, but when I p

Re: [Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Geoffrey Zhu
On 7/26/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Geoffrey Zhu wrote: > > Hi Everyone, > > > > I finally build a C extension. The one problem I found is that it is > > too picky about the input. For example, it accepts > > array([1.0,2.0,3.0]) with no problem, but when I pass in > > array([1,2,3

Re: [Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Robert Kern
Geoffrey Zhu wrote: > Hi Everyone, > > I finally build a C extension. The one problem I found is that it is > too picky about the input. For example, it accepts > array([1.0,2.0,3.0]) with no problem, but when I pass in > array([1,2,3]), since the dtype of the array is now int, my extension > does

[Numpy-discussion] C-extension -- how do I accept a vector of both type double and type int?

2007-07-26 Thread Geoffrey Zhu
Hi Everyone, I finally build a C extension. The one problem I found is that it is too picky about the input. For example, it accepts array([1.0,2.0,3.0]) with no problem, but when I pass in array([1,2,3]), since the dtype of the array is now int, my extension does not like it. How do I handle thi

Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread Les Schaffer
Matthieu Brucher wrote: > Windows binaries must be compiled with the same compiler as Python, so > it is (sadly IMHO) Visual 2003. Well in fact, I could install one if > needed (I have a licence) > > i am going to see if my department can grab a license. if so, i would be willing to collaborate to

[Numpy-discussion] Possible bug -- importing numpy before f2py compiled module gives seg fault

2007-07-26 Thread Kurt Smith
Hello - I've come up with the following test case to illustrate my problem: file empty.f: subroutine empty(arr, nx,ny ) implicit none integer, intent(in) :: nx,ny real, dimension(nx,ny), intent(out) :: arr print *, "in empty." arr = 1.0e

Re: [Numpy-discussion] Downsampling a 2D array with min/max and nullvalues

2007-07-26 Thread Eric Firing
Ludwig, Masked arrays will do exactly what you want. You have your choice of the numpy.ma version or the external maskedarray class. Eric Ludwig M Brinckmann wrote: > Hi there, > > I have a 2D array of size, lets say 4 * 512, which I need to > downsample by a step of 4 in the y direction

Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread Robert Kern
David Cournapeau wrote: > I am willing to volunteer for the scipy part: I have quite extensive > experience with building on linux now, and I can now build on windows > without too much difficulties (I mean hardware-wise). > > Concerning the release date: it basically means giving enough time t

Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread David Cournapeau
Steven H. Rogers wrote: > Robert Kern wrote: > >> Steven H. Rogers wrote: >> >> >>> Robert Kern wrote: >>> >>> Steven H. Rogers wrote: > I don't know of any simple build instructions for Windows, but if you're > patient, there will

Re: [Numpy-discussion] getting numPy happening for sciPy

2007-07-26 Thread Steven H. Rogers
Robert Kern wrote: > Steven H. Rogers wrote: > >> Robert Kern wrote: >> >>> Steven H. Rogers wrote: >>> >>> I don't know of any simple build instructions for Windows, but if you're patient, there will probably be updated packaged releases of SciPy + NumPy that play w

[Numpy-discussion] Downsampling a 2D array with min/max and nullvalues

2007-07-26 Thread Ludwig M Brinckmann
Hi there, I have a 2D array of size, lets say 4 * 512, which I need to downsample by a step of 4 in the y direction, and step 3 in the x direction, so I would get an array of 1 * 170 (or 171, the edges do not matter much). But what I need to retain are the maxima and minima in every 4*3 w