[Numpy-discussion] how to use ldexp?

2009-05-21 Thread dmitrey
hi all, I have tried the example from numpy/add_newdocs.py np.ldexp(5., 2) but instead of the 20 declared there it yields TypeError: function not supported for these types, and can't coerce safely to supported types I have tried arrays but it yields same error np.ldexp(np.array([5., 2.]),

[Numpy-discussion] numpy ufuncs and COREPY - any info?

2009-05-21 Thread dmitrey
hi all, has anyone already tried to compare using an ordinary numpy ufunc vs that one from corepy, first of all I mean the project http://socghop.appspot.com/student_project/show/google/gsoc2009/python/t124024628235 It would be interesting to know what is speedup for (eg) vec ** 0.5 or (if it's

Re: [Numpy-discussion] how to use ldexp?

2009-05-21 Thread David Cournapeau
dmitrey wrote: hi all, I have tried the example from numpy/add_newdocs.py np.ldexp(5., 2) but instead of the 20 declared there it yields TypeError: function not supported for these types, and can't coerce safely to supported types Which OS/Compiler are you using ? David

Re: [Numpy-discussion] how to use ldexp?

2009-05-21 Thread David Cournapeau
dmitrey wrote: I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran. D. Can you post the build output (after having removed the build directory : rm -rf build python setup.py build build.log) ?

Re: [Numpy-discussion] how to use ldexp?

2009-05-21 Thread dmitrey
On May 21, 11:29 am, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: dmitrey wrote: I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran. D. Can you post the build output (after having

Re: [Numpy-discussion] how to use ldexp?

2009-05-21 Thread Pauli Virtanen
Thu, 21 May 2009 01:45:54 -0700, dmitrey wrote: I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran. Worksforme on Ubuntu 9.04, on python2.6 and python2.5. Should be the same platform. -- Pauli

Re: [Numpy-discussion] how to use ldexp?

2009-05-21 Thread Pauli Virtanen
Thu, 21 May 2009 09:26:18 +, Pauli Virtanen wrote: Thu, 21 May 2009 01:45:54 -0700, dmitrey wrote: I have updated numpy to latest '1.4.0.dev7008', but the bug still remains. I use KUBUNTU 9.04, compilers - gcc (using build-essential), gfortran. Worksforme on Ubuntu 9.04, on python2.6

[Numpy-discussion] matrix default to column vector?

2009-05-21 Thread Jason Rennie
By default, it looks like a 1-dim ndarray gets converted to a row vector by the matrix constructor. This seems to lead to some odd behavior such as a[1] yielding the 2nd element as an ndarray and throwing an IndexError as a matrix. Is it possible to set a flag to make the default be a column

[Numpy-discussion] where are the benefits of ldexp and/or array times 2?

2009-05-21 Thread dmitrey
Hi all, I expected to have some speedup via using ldexp or multiplying an array by a power of 2 (doesn't it have to perform a simple shift of mantissa?), but I don't see the one. Have I done something wrong? See the code below. from scipy import rand from numpy import dot, ones, zeros, array,

Re: [Numpy-discussion] where are the benefits of ldexp and/or array times 2?

2009-05-21 Thread Robert Kern
On Thu, May 21, 2009 at 10:26, dmitrey dmitrey.kros...@scipy.org wrote: Hi all, I expected to have some speedup via using ldexp or multiplying an array by a power of 2 (doesn't it have to perform a simple shift of mantissa?), Addition of the exponent, not shift of the mantissa. but I don't

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

2009-05-21 Thread Dag Sverre Seljebotn
Where can I find release notes? (It would be helpful if I can point to a URL as part of the fedora release) OK, I put my email announcement up here: http://wiki.cython.org/ReleaseNotes-0.11.2 Tell me if you need something else (different format or level of detail -- the list of tickets on

[Numpy-discussion] memoryerror with numpy.fromfile

2009-05-21 Thread Michael Hearne
I am getting a MemoryError from a numpy.fromfile() call in an application I am trying to deploy. Normally I would assume that this would mean that I don't have enough memory available on the system. However, if I run vmstat (Linux) at the same time as my process, I see that I have 3+

Re: [Numpy-discussion] memoryerror with numpy.fromfile

2009-05-21 Thread Pauli Virtanen
Thu, 21 May 2009 10:31:28 -0600, Michael Hearne wrote: I am getting a MemoryError from a numpy.fromfile() call in an application I am trying to deploy. Normally I would assume that this would mean that I don't have enough memory available on the system. However, if I run vmstat (Linux) at

Re: [Numpy-discussion] memoryerror with numpy.fromfile

2009-05-21 Thread Charles R Harris
On Thu, May 21, 2009 at 10:31 AM, Michael Hearne mhea...@usgs.gov wrote: I am getting a MemoryError from a numpy.fromfile() call in an application I am trying to deploy. Normally I would assume that this would mean that I don't have enough memory available on the system. However, if I run

Re: [Numpy-discussion] wiki page correction

2009-05-21 Thread Grant Kelly
It's an immutable page. Can someone who already has access make the edit? On Wed, May 20, 2009 at 2:36 PM, Pauli Virtanen p...@iki.fi wrote: 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

Re: [Numpy-discussion] memoryerror with numpy.fromfile

2009-05-21 Thread Michael Hearne
All: Never mind! The file I was attempting to read was part of an (apparently) silently incomplete download, and as such, the file size didn't match the metadata in the header file describing the data file, and I was reading beyond the end of the file. I would submit that MemoryError is

Re: [Numpy-discussion] memoryerror with numpy.fromfile

2009-05-21 Thread Pauli Virtanen
Thu, 21 May 2009 12:14:18 -0600, Michael Hearne wrote: All: Never mind! The file I was attempting to read was part of an (apparently) silently incomplete download, and as such, the file size didn't match the metadata in the header file describing the data file, and I was reading beyond the

Re: [Numpy-discussion] wiki page correction

2009-05-21 Thread Pauli Virtanen
Thu, 21 May 2009 10:54:21 -0700, Grant Kelly wrote: It's an immutable page. Can someone who already has access make the edit? Umm, are you sure? I don't see any ACL's on the page. (Though you need to register an account on the wiki before editing.) -- Pauli Virtanen

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-21 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn wrote: albert.thuswald...@gmail.com wrote: Dear list, I'm writing this because i have developed a small python module that might be of interest to you the readers of this list: http://code.google.com/p/pyhdf5io/ It basically implements load/save functions that mimic

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-21 Thread David Warde-Farley
Hi Albert, So this is a wrapper on top of PyTables to implement load() and save()? Neat. Obviously if you're installing PyTables, you can do a lot better and organize your data hierarchically without the messiness of Matlab structures, walk the node tree, all kinds of fun stuff, but if

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-21 Thread Albert Thuswaldner
On Thu, May 21, 2009 at 22:38, David Warde-Farley d...@cs.toronto.edu wrote: Hi Albert, So this is a wrapper on top of PyTables to implement load() and save()? Neat. Yes, you got the idea. in its most simplest form you can type: hdf5save() And all your local variables are saved to a file