Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Stéfan van der Walt
2009/3/12 Robert Kern robert.k...@gmail.com: idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I think the right answer should be (3,2). Is #       it a bug here? my numpy version is 1.2.1. It's certainly weird, but it's working as designed. Fancy indexing via arrays

Re: [Numpy-discussion] Intel MKL on Core2 system

2009-03-12 Thread Francesc Alted
A Wednesday 11 March 2009, Ryan May escrigué: Thanks. That's actually pretty close to what I had. I was actually thinking that you were using only blas_opt and lapack_opt, since supposedly the [mkl] style section is deprecated. Thus far, I cannot get these to work with MKL. Well, my

Re: [Numpy-discussion] code performanceon windows (32 and/or 64 bit) using SWIG: C++ compiler MS vs.cygwin

2009-03-12 Thread Sebastian Haase
On Thu, Mar 12, 2009 at 4:39 AM, David Cournapeau courn...@gmail.com wrote: On Thu, Mar 12, 2009 at 12:38 PM, David Cournapeau courn...@gmail.com wrote: and you can't cross compile easily. Of course, this applies to numpy/scipy - you can cross compile your own extensions relatively easily

[Numpy-discussion] numpy via easy_install on windows

2009-03-12 Thread Jon Wright
Hello, If I do: C:\ easy_install numpy ... on a windows box, it attempts to do a source download and build, which typically doesn't work. If however I use: C:\ easy_install numpy==1.0.4 ... then the magic works just fine. Any chance of a more recent bdist_egg being made available for

Re: [Numpy-discussion] numpy via easy_install on windows

2009-03-12 Thread David Cournapeau
Hi Jon, Jon Wright wrote: Hello, If I do: C:\ easy_install numpy ... on a windows box, it attempts to do a source download and build, which typically doesn't work. If however I use: C:\ easy_install numpy==1.0.4 ... then the magic works just fine. Any chance of a more recent

Re: [Numpy-discussion] image processing using numpy-scipy?

2009-03-12 Thread Mark Asbach
Hi there, I have read the docs of PIL but there is no function for this. Can I use numpy-scipy for the matter? The image size is 1K. did you have a look at OpenCV? http://sourceforge.net/projects/opencvlibrary Since a couple of weeks, we have implemented the numpy array interface so

Re: [Numpy-discussion] numpy via easy_install on windows

2009-03-12 Thread Jon Wright
David Cournapeau wrote: Hi Jon, Jon Wright wrote: Hello, If I do: C:\ easy_install numpy ... on a windows box, it attempts to do a source download and build, which typically doesn't work. If however I use: C:\ easy_install numpy==1.0.4 ... then the magic works just fine. Any

Re: [Numpy-discussion] image processing using numpy-scipy?

2009-03-12 Thread Zachary Pincus
did you have a look at OpenCV? http://sourceforge.net/projects/opencvlibrary Since a couple of weeks, we have implemented the numpy array interface so data exchange is easy [check out from SVN]. Oh fantastic! That is great news indeed. Zach ___

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 9:13 PM, David Cournapeau courn...@gmail.com wrote: On Thu, Mar 12, 2009 at 1:00 PM, Robert Kern robert.k...@gmail.com wrote: It was an example. Ok, guess I will have to learn the difference between i.e. and e.g. one day. Anyway, here is a first shot at it:

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 1:00 PM, Robert Kern robert.k...@gmail.com wrote: It was an example. Ok, guess I will have to learn the difference between i.e. and e.g. one day. Anyway, here is a first shot at it: http://codereview.appspot.com/26052 I added a few tests which fail with trunk and

[Numpy-discussion] 1.3 release: getting rid of sourceforge ?

2009-03-12 Thread David Cournapeau
Hi, I was wondering if there was any reason for still using sourceforge ? AFAIK, we only use it to put the files there, and dealing with sourceforge to upload files is less than optimal to say the least. Is there any drawback to directly put the files to scipy.org ? cheers, David

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread Stéfan van der Walt
2009/3/12 David Cournapeau courn...@gmail.com: Anyway, here is a first shot at it: http://codereview.appspot.com/26052 Design question: should [('x', float), ('y', float)] and [('t', float), ('s', float)] hash to the same value or not? Regards Stéfan

Re: [Numpy-discussion] Portable macro to get NAN, INF, positive and negative zero

2009-03-12 Thread Bruce Southey
David Cournapeau wrote: Hi, For the record, I have just added the following functionalities to numpy, which may simplify some C code: - NPY_NAN/NPY_INFINITY/NPY_PZERO/NPY_NZERO: macros to get nan, inf, positive and negative zeros. Rationale: some code use NAN, _get_nan, etc... NAN

Re: [Numpy-discussion] Implementing hashing protocol for dtypes

2009-03-12 Thread David Cournapeau
Stéfan van der Walt wrote: 2009/3/12 David Cournapeau courn...@gmail.com: Anyway, here is a first shot at it: http://codereview.appspot.com/26052 Design question: should [('x', float), ('y', float)] and [('t', float), ('s', float)] hash to the same value or not? According to:

Re: [Numpy-discussion] Intel MKL on Core2 system

2009-03-12 Thread Ryan May
On Thu, Mar 12, 2009 at 3:05 AM, Francesc Alted fal...@pytables.org wrote: A Wednesday 11 March 2009, Ryan May escrigué: Thanks. That's actually pretty close to what I had. I was actually thinking that you were using only blas_opt and lapack_opt, since supposedly the [mkl] style section

Re: [Numpy-discussion] Portable macro to get NAN, INF, positive and negative zero

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 10:19 PM, Bruce Southey bsout...@gmail.com wrote: David Cournapeau wrote: Hi,     For the record, I have just added the following functionalities to numpy, which may simplify some C code:     - NPY_NAN/NPY_INFINITY/NPY_PZERO/NPY_NZERO: macros to get nan, inf,

Re: [Numpy-discussion] Intel MKL on Core2 system

2009-03-12 Thread David Cournapeau
Ryan May wrote: [DEFAULT] include_dirs = /opt/intel/mkl/10.0.2.018/include/ http://10.0.2.018/include/ library_dirs = /opt/intel/mkl/10.0.2.018/lib/em64t/:/usr/lib http://10.0.2.018/lib/em64t/:/usr/lib [blas] libraries = mkl_gf_lp64, mkl_gnu_thread, mkl_core, iomp5 [lapack] libraries =

Re: [Numpy-discussion] Intel MKL on Core2 system

2009-03-12 Thread Ryan May
On Thu, Mar 12, 2009 at 8:30 AM, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Ryan May wrote: [DEFAULT] include_dirs = /opt/intel/mkl/10.0.2.018/include/ http://10.0.2.018/include/ library_dirs = /opt/intel/mkl/10.0.2.018/lib/em64t/:/usr/lib

Re: [Numpy-discussion] Error building SciPy SVN with NumPy SVN

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 5:25 AM, Ryan May rma...@gmail.com wrote: That's fine.  I just wanted to make sure I didn't do something weird while getting numpy built with MKL. It should be fixed in r6650 David ___ Numpy-discussion mailing list

Re: [Numpy-discussion] Error building SciPy SVN with NumPy SVN

2009-03-12 Thread Ryan May
On Thu, Mar 12, 2009 at 9:02 AM, David Cournapeau courn...@gmail.comwrote: On Thu, Mar 12, 2009 at 5:25 AM, Ryan May rma...@gmail.com wrote: That's fine. I just wanted to make sure I didn't do something weird while getting numpy built with MKL. It should be fixed in r6650 Fixed for

Re: [Numpy-discussion] Error building SciPy SVN with NumPy SVN

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 11:23 PM, Ryan May rma...@gmail.com wrote: Fixed for me.  I get a segfault running scipy.test(), but that's probably due to MKL. Yes, it is. Scipy run the test suite fine for me. David ___ Numpy-discussion mailing list

Re: [Numpy-discussion] Error building SciPy SVN with NumPy SVN

2009-03-12 Thread Ryan May
On Thu, Mar 12, 2009 at 9:55 AM, David Cournapeau courn...@gmail.comwrote: On Thu, Mar 12, 2009 at 11:23 PM, Ryan May rma...@gmail.com wrote: Fixed for me. I get a segfault running scipy.test(), but that's probably due to MKL. Yes, it is. Scipy run the test suite fine for me. While

Re: [Numpy-discussion] Intel MKL on Core2 system

2009-03-12 Thread Francesc Alted
A Thursday 12 March 2009, Ryan May escrigué: I can get it working now with either the [mkl] section like your config or the following config: [DEFAULT] include_dirs = /opt/intel/mkl/10.0.2.018/include/ library_dirs = /opt/intel/mkl/10.0.2.018/lib/em64t/:/usr/lib

Re: [Numpy-discussion] Intel MKL on Core2 system

2009-03-12 Thread Ryan May
On Thu, Mar 12, 2009 at 10:11 AM, Francesc Alted fal...@pytables.orgwrote: A Thursday 12 March 2009, Ryan May escrigué: I can get it working now with either the [mkl] section like your config or the following config: [DEFAULT] include_dirs = /opt/intel/mkl/10.0.2.018/include/

Re: [Numpy-discussion] Error building SciPy SVN with NumPy SVN

2009-03-12 Thread David Cournapeau
On Fri, Mar 13, 2009 at 12:10 AM, Ryan May rma...@gmail.com wrote: On Thu, Mar 12, 2009 at 9:55 AM, David Cournapeau courn...@gmail.com wrote: On Thu, Mar 12, 2009 at 11:23 PM, Ryan May rma...@gmail.com wrote: Fixed for me.  I get a segfault running scipy.test(), but that's probably

Re: [Numpy-discussion] Error building SciPy SVN with NumPy SVN

2009-03-12 Thread Ryan May
On Thu, Mar 12, 2009 at 12:00 PM, David Cournapeau courn...@gmail.comwrote: On Fri, Mar 13, 2009 at 12:10 AM, Ryan May rma...@gmail.com wrote: On Thu, Mar 12, 2009 at 9:55 AM, David Cournapeau courn...@gmail.com wrote: On Thu, Mar 12, 2009 at 11:23 PM, Ryan May rma...@gmail.com wrote:

[Numpy-discussion] Poll: Semantics for % in Cython

2009-03-12 Thread Dag Sverre Seljebotn
(First off, is it OK to continue polling the NumPy list now and then on Cython language decisions? Or should I expect that any interested Cython users follow the Cython list?) In Python, if I write -1 % 5, I get 4. However, in C if I write -1 % 5 I get -1. The question is, what should I get in

Re: [Numpy-discussion] Poll: Semantics for % in Cython

2009-03-12 Thread Gael Varoquaux
On Thu, Mar 12, 2009 at 07:59:48PM +0100, Dag Sverre Seljebotn wrote: (First off, is it OK to continue polling the NumPy list now and then on Cython language decisions? Or should I expect that any interested Cython users follow the Cython list?) Yes, IMHO. In Python, if I write -1 % 5, I

[Numpy-discussion] Numpy and Scientific Python

2009-03-12 Thread vincent . thierion
Hello, I use numpy and Scientific Numpy for my work. I installed them in a manner I can use them on remote OS in copying them and using sys.path.append. Many times it works, but sometimes (depending on Python version) I receive this error : ImportError: $MYLIBFOLDER/site-packages/

Re: [Numpy-discussion] Portable macro to get NAN, INF, positive and negative zero

2009-03-12 Thread Bruce Southey
David Cournapeau wrote: On Thu, Mar 12, 2009 at 10:19 PM, Bruce Southey bsout...@gmail.com wrote: David Cournapeau wrote: Hi, For the record, I have just added the following functionalities to numpy, which may simplify some C code: -

Re: [Numpy-discussion] Poll: Semantics for % in Cython

2009-03-12 Thread Stéfan van der Walt
Hi Dag 2009/3/12 Dag Sverre Seljebotn da...@student.matnat.uio.no: (First off, is it OK to continue polling the NumPy list now and then on Cython language decisions? Or should I expect that any interested Cython users follow the Cython list?) Given that many of the subscribers make use of the

Re: [Numpy-discussion] Poll: Semantics for % in Cython

2009-03-12 Thread Charles R Harris
On Thu, Mar 12, 2009 at 12:59 PM, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: (First off, is it OK to continue polling the NumPy list now and then on Cython language decisions? Or should I expect that any interested Cython users follow the Cython list?) In Python, if I write -1

Re: [Numpy-discussion] Poll: Semantics for % in Cython

2009-03-12 Thread Stéfan van der Walt
2009/3/13 Charles R Harris charlesr.har...@gmail.com: That said, I think it best to leave '%' with its C default and add a special modulus function for the python version. Changing its meaning in C-like code is going to confuse things. This is Cython code, so I think there is an argument to be

Re: [Numpy-discussion] Poll: Semantics for % in Cython

2009-03-12 Thread Sturla Molden
2009/3/13 Charles R Harris charlesr.har...@gmail.com: That said, I think it best to leave '%' with its C default and add a special modulus function for the python version. Changing its meaning in C-like code is going to confuse things. This is Cython code, so I think there is an

Re: [Numpy-discussion] Poll: Semantics for % in Cython

2009-03-12 Thread Robert Kern
On Thu, Mar 12, 2009 at 17:45, Sturla Molden stu...@molden.no wrote: 2009/3/13 Charles R Harris charlesr.har...@gmail.com: That said, I think it best to leave '%' with its C default and add a special modulus function for the python version. Changing its meaning in C-like code is going to

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread shuwj5...@163.com
On Wed, Mar 11, 2009 at 19:55, shuwj5...@163.com shuwj5...@163.com wrote: Hi, import numpy as np x = np.arange(30) x.shape = (2,3,5) idx = np.array([0,1]) e = x[0,idx,:] print e.shape # return (2,5). ok. idx = np.array([0,1]) e = x[0,:,idx] print e.shape

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Robert Kern
On Thu, Mar 12, 2009 at 01:34, Stéfan van der Walt ste...@sun.ac.za wrote: 2009/3/12 Robert Kern robert.k...@gmail.com: idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I think the right answer should be (3,2). Is #       it a bug here? my numpy version is 1.2.1.

Re: [Numpy-discussion] numpy via easy_install on windows

2009-03-12 Thread David Cournapeau
On Thu, Mar 12, 2009 at 8:08 PM, Jon Wright wri...@esrf.fr wrote: I'd like to have numpy as a dependency being pulled into a virtualenv automatically. Is that possible with the binary installer? I don't think so - but I would think that people using virtualenv are familiar with compiling

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Travis E. Oliphant
shuwj5...@163.com wrote: It's certainly weird, but it's working as designed. Fancy indexing via arrays is a separate subsystem from indexing via slices. Basically, fancy indexing decides the outermost shape of the result (e.g. the leftmost items in the shape tuple). If there are any sliced

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Travis E. Oliphant
Robert Kern wrote: On Thu, Mar 12, 2009 at 01:34, Stéfan van der Walt ste...@sun.ac.za wrote: 2009/3/12 Robert Kern robert.k...@gmail.com: idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I think the right answer should be (3,2). Is # it a bug here?

[Numpy-discussion] A question about import in numpy and in place build

2009-03-12 Thread David Cournapeau
Hi, While making sure in-place builds work, I got the following problem: python setup.py build_ext -i python -c import numpy as np; np.test() - many errors The error are all import errors: Traceback (most recent call last): File /usr/media/src/dsp/numpy/git/numpy/tests/test_ctypeslib.py,