Re: [Numpy-discussion] Overlap arrays with transparency

2009-05-20 Thread Cristi Constantin
Thank you for your help. :) I used this : try: NData[ (NData==transparent)[:len(OData)] ] = OData[ (NData==transparent)[:len(OData)] ] except: pass That means overwrite all transparent data from NData with valid data from OData. I am sure it's not the best method yet, but it's the only one

[Numpy-discussion] Rotate Left and Rotate Right

2009-05-20 Thread Cristi Constantin
Good day, me again. I have this string of data : String = 'i want\nto go\nto the\nbeach'. I want to rotate this data to left, or to right, after is split it after '\n'. Note that it's important to use 'U' array, because i might have unicode characters in this string. So normal, the text is: i

Re: [Numpy-discussion] Rotate Left and Rotate Right

2009-05-20 Thread josef . pktd
On Wed, May 20, 2009 at 7:53 AM, Cristi Constantin darkg...@yahoo.com wrote: Good day, me again. I have this string of data : String = 'i want\nto go\nto the\nbeach'. I want to rotate this data to left, or to right, after is split it after '\n'. Note that it's important to use 'U' array,

Re: [Numpy-discussion] Overlap arrays with transparency

2009-05-20 Thread josef . pktd
On Wed, May 20, 2009 at 7:24 AM, Cristi Constantin darkg...@yahoo.com wrote: Thank you for your help. :) I used this : try: NData[ (NData==transparent)[:len(OData)] ] = OData[ (NData==transparent)[:len(OData)] ] except: pass That means overwrite all transparent data from NData with valid

[Numpy-discussion] numpy failure under Windows Vista 64 bit

2009-05-20 Thread Klaus Nökel
David, Klaus Noekel wrote: I doubt that the DLL was not physically present and rather suspect a dependency on some other DLL that was missing. The INSTALL.TXT unfortunately was not helpful. Can anybody please explain what other dependencies exist? Anything else I need to install?

Re: [Numpy-discussion] numpy failure under Windows Vista 64 bit

2009-05-20 Thread Bruce Southey
Klaus Nökel wrote: David, Klaus Noekel wrote: I doubt that the DLL was not physically present and rather suspect a dependency on some other DLL that was missing. The INSTALL.TXT unfortunately was not helpful. Can anybody please explain what other dependencies exist? Anything

[Numpy-discussion] skiprows option in loadtxt

2009-05-20 Thread Nils Wagner
Hi all, Is the value of skiprows in loadtxt restricted to values in [0-10] ? It doesn't work for skiprows=11. Nils ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] numpy failure under Windows Vista 64 bit

2009-05-20 Thread Klaus Nökel
I don't believe that the problem is specific to IDLE. Python also crashes when I put nothing but import numpy in a file and execute it with python.exe. Regarding the note on building numpy myself: the discussion in this forum scared me a little, because of the challenge to build

Re: [Numpy-discussion] skiprows option in loadtxt

2009-05-20 Thread Pierre GM
On May 20, 2009, at 11:04 AM, Nils Wagner wrote: Hi all, Is the value of skiprows in loadtxt restricted to values in [0-10] ? It doesn't work for skiprows=11. Please post an example ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] skiprows option in loadtxt

2009-05-20 Thread Stéfan van der Walt
Hi Nils 2009/5/20 Nils Wagner nwag...@iam.uni-stuttgart.de: Is the value of skiprows in loadtxt restricted to values in [0-10] ? It doesn't work for skiprows=11. I don't see this behaviour. Could you provide a code snippet? Thanks Stéfan ___

Re: [Numpy-discussion] skiprows option in loadtxt

2009-05-20 Thread Ryan May
On Wed, May 20, 2009 at 10:04 AM, Nils Wagner nwag...@iam.uni-stuttgart.dewrote: Hi all, Is the value of skiprows in loadtxt restricted to values in [0-10] ? It doesn't work for skiprows=11. Works for me: s = '\n'.join(map(str,range(20))) from StringIO import StringIO

[Numpy-discussion] ANN: Cython 0.11.2 released

2009-05-20 Thread Dag Sverre Seljebotn
I'm happy to announce the release of Cython 0.11.2. http://sage.math.washington.edu/home/dagss/Cython-0.11.2.tar.gz http://sage.math.washington.edu/home/dagss/Cython-0.11.2.zip (Will be present on the Cython front page in a few days.) New features: * There's now native complex floating point

[Numpy-discussion] binary builds against older numpys

2009-05-20 Thread John Hunter
We are trying to build and test mpl installers for python2.4, 2.5 and 2.6. What we are finding is that if we build mpl against a more recent numpy than the installed numpy on a test machine, the import of mpl extension modules which depend on numpy trigger a segfault. Eg, on python2.5 and

[Numpy-discussion] wiki page correction

2009-05-20 Thread Grant Kelly
I believe there is an error on this wiki page: http://www.scipy.org/NumPy_for_Matlab_Users MATLAB y=x(2,:) PYTHON y = x[2,:].copy() shouldn't the Python version be: y = x[1,:].copy() If not, please advise. Thanks, Grant ___ Numpy-discussion

Re: [Numpy-discussion] binary builds against older numpys

2009-05-20 Thread josef . pktd
On Wed, May 20, 2009 at 3:07 PM, John Hunter jdh2...@gmail.com wrote: We are trying to build and test mpl installers for python2.4, 2.5 and 2.6.  What we are finding is that if we build mpl against a more recent numpy than the installed numpy on a test machine, the import of mpl extension

Re: [Numpy-discussion] skiprows option in loadtxt

2009-05-20 Thread Nils Wagner
On Wed, 20 May 2009 10:16:08 -0500 Ryan May rma...@gmail.com wrote: On Wed, May 20, 2009 at 10:04 AM, Nils Wagner nwag...@iam.uni-stuttgart.dewrote: Hi all, Is the value of skiprows in loadtxt restricted to values in [0-10] ? It doesn't work for skiprows=11. Works for me: s =

[Numpy-discussion] binary shift for ndarray

2009-05-20 Thread dmitrey
hi all, suppose I have A that is numpy ndarray of floats, with shape n x n. I want to obtain dot(A, b), b is vector of length n and norm(b)=1, but instead of exact multiplication I want to approximate b as a vector [+/- 2^m0, ± 2^m1, ± 2^m2 ,,, ± 2^m_n], m_i are integers, and then invoke

Re: [Numpy-discussion] binary shift for ndarray

2009-05-20 Thread Robert Kern
On Wed, May 20, 2009 at 14:24, dmitrey dmitrey.kros...@scipy.org wrote: hi all, suppose I have A that is numpy ndarray of floats, with shape n x n. I want to obtain dot(A, b), b is vector of length n and norm(b)=1, but instead of exact multiplication I want to approximate b as a vector [+/-

Re: [Numpy-discussion] binary shift for ndarray

2009-05-20 Thread dmitrey
On May 20, 10:34 pm, Robert Kern robert.k...@gmail.com wrote: On Wed, May 20, 2009 at 14:24, dmitrey dmitrey.kros...@scipy.org wrote: hi all, suppose I have A that is numpy ndarray of floats, with shape n x n. I want to obtain dot(A, b), b is vector of length n and norm(b)=1, but

Re: [Numpy-discussion] binary builds against older numpys

2009-05-20 Thread Stéfan van der Walt
Hi John 2009/5/20 josef.p...@gmail.com: On Wed, May 20, 2009 at 3:07 PM, John Hunter jdh2...@gmail.com wrote: We are trying to build and test mpl installers for python2.4, 2.5 and 2.6.  What we are finding is that if we build mpl against a more recent numpy than the installed numpy on a test

Re: [Numpy-discussion] binary builds against older numpys

2009-05-20 Thread John Hunter
2009/5/20 Stéfan van der Walt ste...@sun.ac.za: David Cournapeau also put a check in place so that the NumPy build will break if we forget to update the API version again. So, while we can't change the releases of NumPy out there already, we can at least ensure that this won't happen again.

Re: [Numpy-discussion] binary shift for ndarray

2009-05-20 Thread Robert Kern
On Wed, May 20, 2009 at 14:46, dmitrey dmitrey.kros...@scipy.org wrote: On May 20, 10:34 pm, Robert Kern robert.k...@gmail.com wrote: On Wed, May 20, 2009 at 14:24, dmitrey dmitrey.kros...@scipy.org wrote: hi all, suppose I have A that is numpy ndarray of floats, with shape n x n. I want

Re: [Numpy-discussion] wiki page correction

2009-05-20 Thread Pauli Virtanen
Wed, 20 May 2009 12:08:46 -0700, Grant Kelly wrote: I believe there is an error on this wiki page: http://www.scipy.org/NumPy_for_Matlab_Users MATLAB y=x(2,:) PYTHON y = x[2,:].copy() shouldn't the Python version be: y = x[1,:].copy() If not, please advise. Yes, it

[Numpy-discussion] view takes no keyword arguments exception

2009-05-20 Thread Jochen Schroeder
Hi all, I'm trying to help someone out with some problems with pyfftw (pyfftw.berlios.de). He is seeing an exception, TypeError: view() takes no keyword arguments This doesn't only happen when he uses pyfftw but also when he does the following: import numpy as np a=np.arange(10)

Re: [Numpy-discussion] view takes no keyword arguments exception

2009-05-20 Thread Stéfan van der Walt
Hi Jochen 2009/5/20 Jochen Schroeder cycoma...@gmail.com: I'm trying to help someone out with some problems with pyfftw (pyfftw.berlios.de). He is seeing an exception, TypeError: view() takes no keyword arguments This doesn't only happen when he uses pyfftw but also when he does the

[Numpy-discussion] Implementing ufuncs in Cython

2009-05-20 Thread Stéfan van der Walt
Hi all, Mark Lodato outlines how to write ufuncs in Cython at http://wiki.cython.org/MarkLodato/CreatingUfuncs This is also a great way of adding generalised ufuncs: http://projects.scipy.org/numpy/wiki/GeneralLoopingFunctions Super useful! Regards Stéfan

Re: [Numpy-discussion] Implementing ufuncs in Cython

2009-05-20 Thread Charles R Harris
2009/5/20 Stéfan van der Walt ste...@sun.ac.za Hi all, Mark Lodato outlines how to write ufuncs in Cython at http://wiki.cython.org/MarkLodato/CreatingUfuncs This is also a great way of adding generalised ufuncs: http://projects.scipy.org/numpy/wiki/GeneralLoopingFunctions Super

Re: [Numpy-discussion] ANN: Cython 0.11.2 released

2009-05-20 Thread Neal Becker
Where can I find release notes? (It would be helpful if I can point to a URL as part of the fedora release) ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] view takes no keyword arguments exception

2009-05-20 Thread Jochen Schroeder
On 21/05/09 00:20, Stéfan van der Walt wrote: Hi Jochen 2009/5/20 Jochen Schroeder cycoma...@gmail.com: I'm trying to help someone out with some problems with pyfftw (pyfftw.berlios.de). He is seeing an exception, TypeError: view() takes no keyword arguments This doesn't only

Re: [Numpy-discussion] view takes no keyword arguments exception

2009-05-20 Thread Pierre GM
On May 20, 2009, at 9:57 PM, Jochen Schroeder wrote: Sorry maybe I phrased my question wrongly. I don't want to change the code (This was just a short example). I just want to know why it is failing on his system and what he can do so that a.view(dtype='...') is working. I suspected it was

Re: [Numpy-discussion] view takes no keyword arguments exception

2009-05-20 Thread Charles R Harris
On Wed, May 20, 2009 at 3:51 PM, Jochen Schroeder cycoma...@gmail.comwrote: Hi all, I'm trying to help someone out with some problems with pyfftw (pyfftw.berlios.de). He is seeing an exception, TypeError: view() takes no keyword arguments This doesn't only happen when he uses pyfftw but

Re: [Numpy-discussion] binary builds against older numpys

2009-05-20 Thread David Cournapeau
Stéfan van der Walt wrote: Hi John 2009/5/20 josef.p...@gmail.com: On Wed, May 20, 2009 at 3:07 PM, John Hunter jdh2...@gmail.com wrote: We are trying to build and test mpl installers for python2.4, 2.5 and 2.6. What we are finding is that if we build mpl against a more recent