Re: [Numpy-discussion] numpy.mean problems

2011-12-09 Thread Stéfan van der Walt
On Fri, Dec 9, 2011 at 11:47 AM, ferreirafm wrote: > > Hi everyone, > I'm quite new to numpy and python either. Could someone, please, tell me > what I'm doing wrong? > Here goes my peace of code: > > def stats(filename): >    """Utilility to perform some basic statistics on columns.""" >    tab =

[Numpy-discussion] Warning related to __multiarray_api.h

2011-12-09 Thread Mads Ipsen
Hi, I don't know if this is of importance, but when I compile code using the numpy C API, I get the warning: site-packages/numpy/core/include/numpy/__multiarray_api.h:1532: warning: 'int _import_array()' defined but not used Might be worth cleaning it up. Best regards, Mads __

Re: [Numpy-discussion] EXTERNAL: Re: Problem with using PyArray_AsCArray

2011-12-09 Thread Ng, Enrico
I actually figured it out. I went one level down in the array and it took it. -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Chris.Barker Sent: Friday, December 09, 2011 3:33 PM To: Discussion of Numerical Python Subjec

Re: [Numpy-discussion] Problem with using PyArray_AsCArray

2011-12-09 Thread Chris.Barker
On 12/9/11 11:25 AM, Ng, Enrico wrote: > I am trying to pass a multi-dimensional ndarray to C as a multi-dimensional C > array for the purposes of passing it to mathematica. I am using > PyArray_AsCArray but getting an error. I understand that SWIG, Boost, et. al are perhaps too heavyweight for

[Numpy-discussion] numpy.mean problems

2011-12-09 Thread ferreirafm
Hi everyone, I'm quite new to numpy and python either. Could someone, please, tell me what I'm doing wrong? Here goes my peace of code: def stats(filename): """Utilility to perform some basic statistics on columns.""" tab = get_textab(filename) stat_list = [ ] for row in sort_tab(

[Numpy-discussion] Problem with using PyArray_AsCArray

2011-12-09 Thread Ng, Enrico
I am trying to pass a multi-dimensional ndarray to C as a multi-dimensional C array for the purposes of passing it to mathematica. I am using PyArray_AsCArray but getting an error. ## Python Code: import Image from scipy.misc import fromimage

[Numpy-discussion] trouble building numpy 1.6.1 on Scientific Linux 5

2011-12-09 Thread Russell E. Owen
I'm trying to build numpy 1.6.1 on Scientific Linux 5 but the unit tests claim the wrong version of fortran was used. I thought I knew how to avoid that, but it's not working. I don't have atlas (this needs to run on a lot of similar-but-not-identical machines). I believe blas and lapack were

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Peter CYC
Hi Armando, No comment on the Java thing ;-) However, http://www.opengda.org/documentation/manuals/Diamond_SciSoft_Python_Guide/8.18/contents.html is more up-to-date and we are on github too: https://github.com/DiamondLightSource Peter On 9 December 2011 13:05, Vicente Sole wrote: > Quoting

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Pierre Haessig
Le 09/12/2011 15:00, Robert Kern a écrit : Using multiprocessing is fine. That starts up multiple interpreters in *different* processes. Yang is using a non-Python program that embeds the CPython interpreter and starts up multiple copies of it in the same process. Ok, now I think I understand. I

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Fri, Dec 9, 2011 at 13:18, Pierre Haessig wrote: > Le 09/12/2011 09:31, Robert Kern a écrit : >> We have some global state >> that we need to keep, and this gets interfered with in a multiple >> interpreter environment. > I recently got interested in multiprocessing computation with numpy and >

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Pierre Haessig
Le 09/12/2011 09:31, Robert Kern a écrit : > We have some global state > that we need to keep, and this gets interfered with in a multiple > interpreter environment. I recently got interested in multiprocessing computation with numpy and now I get scare by your statement ! Please don't tell me it

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Vicente Sole
Quoting Robert Kern : > On Fri, Dec 9, 2011 at 11:00, Yang Zhang wrote: > >> Thanks for the clarification.  Alas.  So is there no simple workaround >> to making numpy work in environments such as Jepp? > > I don't think so, no. > It is far from being an optimal solution (in fact I dislike it) bu

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Fri, Dec 9, 2011 at 11:00, Yang Zhang wrote: > Thanks for the clarification.  Alas.  So is there no simple workaround > to making numpy work in environments such as Jepp? I don't think so, no. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Yang Zhang
On Fri, Dec 9, 2011 at 12:31 AM, Robert Kern wrote: > On Thu, Dec 8, 2011 at 23:15, Yang Zhang wrote: >> On Tue, Oct 4, 2011 at 12:05 PM, Yang Zhang wrote: >>> On Tue, Oct 4, 2011 at 1:28 AM, Robin wrote: On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang wrote: > It turns out that there's a

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Thu, Dec 8, 2011 at 23:15, Yang Zhang wrote: > On Tue, Oct 4, 2011 at 12:05 PM, Yang Zhang wrote: >> On Tue, Oct 4, 2011 at 1:28 AM, Robin wrote: >>> On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang wrote: It turns out that there's a long-standing problem in numpy that prevents it from b