Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 1:41 AM, David Goldsmith wrote: > > --- On Tue, 6/9/09, Gökhan SEVER wrote: > > > You mean you modified the rst documents in the numpy > > trunk? > > No, at least I don't think so, I made the modification at: > > http://docs.scipy.org/numpy/docs/numpy.core.memmap.memmap/ >

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 12:34 AM, Matthew Brett wrote: > Hi, > > > I am having problem while trying to memory map a simple file (attached as > > test.txt) > > The file looks like a text file, but memmap is for binary files. > Could that be the problem? > > Best, > > Matthew What's the reason aga

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread David Goldsmith
--- On Tue, 6/9/09, Gökhan SEVER wrote: > You mean you modified the rst documents in the numpy > trunk? No, at least I don't think so, I made the modification at: http://docs.scipy.org/numpy/docs/numpy.core.memmap.memmap/ and, IIUC, the "auto-sync" between the Wiki and the rst is one-way: rs

Re: [Numpy-discussion] Howto vectorise a dot product ?

2009-06-09 Thread bruno Piguet
2009/6/9 Charles R Harris > > Well, in this case you can use complex multiplication and either work with > just the x,y components or use two complex components, i.e., [x + 1j*y, z]. > In the first case you can then do the rotation as V*exp(1j*phi). In the real case, it's a real 3-axes rotation

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 12:56 AM, David Goldsmith wrote: > > --- On Tue, 6/9/09, Gökhan SEVER wrote: > > > Matthew Brett > > wrote: > > > > > I am having problem while trying to memory map a > > simple file (attached as > > > > > test.txt) > > > > The file looks like a text file, but memmap is f

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread David Goldsmith
Sorry for the double post, my link and/or browser was acting up. DG ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Robert Kern
On Wed, Jun 10, 2009 at 00:56, David Goldsmith wrote: > > --- On Tue, 6/9/09, Gökhan SEVER wrote: >> I don't see such a restriction in memmap function based >> on its help > > Fixed (at least in the Numpy Doc Wiki, don't know how long it will take for > that to propagate to a release) > >> at or

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread David Goldsmith
--- On Tue, 6/9/09, Gökhan SEVER wrote: > Matthew Brett > wrote: > > > I am having problem while trying to memory map a > simple file (attached as > > > test.txt) > > The file looks like a text file, but memmap is for > binary files. > > Could that be the problem? > > Matthew > > I don't s

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread David Goldsmith
--- On Tue, 6/9/09, Gökhan SEVER wrote: > Matthew Brett > wrote: > > > I am having problem while trying to memory map a > simple file (attached as > > > test.txt) > > The file looks like a text file, but memmap is for > binary files. > > Could that be the problem? > > Matthew > > I don't s

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Gökhan SEVER
On Wed, Jun 10, 2009 at 12:34 AM, Matthew Brett wrote: > Hi, > > > I am having problem while trying to memory map a simple file (attached as > > test.txt) > > The file looks like a text file, but memmap is for binary files. > Could that be the problem? > > Best, > > Matthew > I don't see such a r

Re: [Numpy-discussion] Question about memmap

2009-06-09 Thread Matthew Brett
Hi, > I am having problem while trying to memory map a simple file (attached as > test.txt) The file looks like a text file, but memmap is for binary files. Could that be the problem? Best, Matthew ___ Numpy-discussion mailing list Numpy-discussion@sc

[Numpy-discussion] Question about memmap

2009-06-09 Thread Gökhan SEVER
Hello, I am having problem while trying to memory map a simple file (attached as test.txt) In IPython data = memmap('test.txt', mode='r', dtype=double, shape=(3,5)) data memmap([[ 3.45616501e-86, 4.85780149e-33, 4.85787493e-33, 5.07185821e-86, 4.85780159e-33], [ 4.8578

Re: [Numpy-discussion] Definitions of pv, fv, nper, pmt, and rate

2009-06-09 Thread David Goldsmith
--- On Tue, 6/9/09, Skipper Seabold wrote: > I have implemented the ipmt and ppmt functions that were > "not > implemented" in numpy.lib.financial as well as written some > tests. Thanks! > ipmt is one of the functions where there was a discrepancy > between > what OO and Excel report for the

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread David Cournapeau
David Warde-Farley wrote: > On 9-Jun-09, at 3:54 AM, David Cournapeau wrote: > > >> For example, what ML people call PCA is called Karhunen Loéve in >> signal >> processing, and the concepts are quite similar. >> > > > Yup. This seems to be a nice set of review notes: > > http://www

Re: [Numpy-discussion] Jcamp dx format

2009-06-09 Thread David Warde-Farley
On 7-Jun-09, at 4:56 AM, giorgio.luci...@inwind.it wrote: > Sorry for cross posting > > Hello to all, > I've done a script for importing all spectra files in a directory > and merge all them in one matrix. The file imported are dx files. > the bad part is that the file is in matlab and it requ

Re: [Numpy-discussion] Definitions of pv, fv, nper, pmt, and rate

2009-06-09 Thread Skipper Seabold
On Tue, Jun 9, 2009 at 12:58 PM, David Goldsmith wrote: > > --- On Tue, 6/9/09, Skipper Seabold wrote: > >> These are the two most basic building blocks of time value >> problems, >> discounting one cash flow and an annuity.  There are >> *plenty* of >> examples and use cases for uneven cash flows

[Numpy-discussion] numpy C++ swig class example

2009-06-09 Thread Rubin, Jared
I am using the numpy.i interface file and have gotten the cookbook/swig example to work from scipy. Are there any examples of appyling the numpy.i to a C++ header file. I would like to generate a lightweight Array2D class that just uses doubles and would have the following header file Array2D.h

Re: [Numpy-discussion] Inquiry Regarding F2PY Windows Content

2009-06-09 Thread David Cournapeau
Carl, Andrew F (AS) wrote: > > Would it be a reasonable request, that the "F2PY Windows" web page > contain known combinations of version numbers for Python, Numpy and > Gfortran verified to play nice? Some references as to queried compiler > system environmental variables would be useful also. > I

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread David Cournapeau
Hi Benoit, Benoit Jacob wrote: > No, because _we_ are serious about compilation times, unlike other c++ > template libraries. But granted, compilation times are not as short as > a plain C library either. > I concede it is not as bad as the heavily templated libraries in boost. But C++ is just

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread Charles R Harris
On Tue, Jun 9, 2009 at 7:46 PM, Benoit Jacob wrote: > Hi, > > I'm one of the Eigen developers and was pointed to your discussion. I > just want to clarify a few things for future reference (not trying to > get you to use Eigen): > > > No, eigen does not provide a (complete) BLAS/LAPACK interface.

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread Benoit Jacob
Hi, I'm one of the Eigen developers and was pointed to your discussion. I just want to clarify a few things for future reference (not trying to get you to use Eigen): > No, eigen does not provide a (complete) BLAS/LAPACK interface. True, > I don't know if that's even a goal of eigen Not a goal

Re: [Numpy-discussion] Howto vectorise a dot product ?

2009-06-09 Thread Charles R Harris
On Tue, Jun 9, 2009 at 12:56 PM, bruno Piguet wrote: > Dear all, > >Can someone point me to a doc on dot product vectorisation ? > > Here is what I try to do : > > I've got a rotation function which looks like : > > def rotat_scal(phi, V): > s = math.sin(phi) > c = math.cos(phi) >

Re: [Numpy-discussion] Howto vectorise a dot product ?

2009-06-09 Thread David Warde-Farley
On 9-Jun-09, at 2:56 PM, bruno Piguet wrote: > Phi is now of size(n) and V (n, 3). > (I really whish to have this shape, for direct correspondance to > file). > > The corresponding function looks like : > > def rotat_vect(phi, V): >s = np.sin(phi) >c = np.cos(phi) >M = np.zeros((len(p

[Numpy-discussion] Inquiry Regarding F2PY Windows Content

2009-06-09 Thread Carl, Andrew F (AS)
Would it be a reasonable request, that the "F2PY Windows" web page contain known combinations of version numbers for Python, Numpy and Gfortran verified to play nice? Some references as to queried compiler system environmental variables would be useful also. Thanks, Andy ___

[Numpy-discussion] Howto vectorise a dot product ?

2009-06-09 Thread bruno Piguet
Dear all, Can someone point me to a doc on dot product vectorisation ? Here is what I try to do : I've got a rotation function which looks like : def rotat_scal(phi, V): s = math.sin(phi) c = math.cos(phi) M = np.zeros((3, 3)) M[2, 2] = M[1, 1] = c M[1, 2] = -s M[2, 1

Re: [Numpy-discussion] Adding zero-dimension arrays, bug?

2009-06-09 Thread Robert Kern
On Tue, Jun 9, 2009 at 09:38, David Paul Reichert wrote: > Hi, > > Numpy let's me define arrays with zero rows and/or > columns, and that's wanted behaviour from what I have > read in discussions. However, I can add an array > with zero rows to an array with one row (but not more), > resulting in a

Re: [Numpy-discussion] Multiplying Python float to numpy.array of objects works but fails with a numpy.float64, numpy Bug?

2009-06-09 Thread Pauli Virtanen
Sun, 07 Jun 2009 12:09:40 +0200, Sebastian Walter wrote: > from numpy import * > import numpy > print 'numpy.__version__=',numpy.__version__ > > class adouble: >def __init__(self,x): >self.x = x >def __mul__(self,rhs): >if isinstance(rhs,adouble): >

Re: [Numpy-discussion] second 2d fft gives the same result as fft+ifft

2009-06-09 Thread David Goldsmith
Sorry, I meant: Im(iFT(FT(f))) = Im(FT^2(f)), Re(iFT(FT(f))) != Re(FT^2(f)) DG --- On Tue, 6/9/09, David Goldsmith wrote: > From: David Goldsmith > Subject: Re: [Numpy-discussion] second 2d fft gives the same result as > fft+ifft > To: "Discussion of Numerical Python" > Date: Tuesday

Re: [Numpy-discussion] second 2d fft gives the same result as fft+ifft

2009-06-09 Thread David Goldsmith
--- On Tue, 6/9/09, Matthieu Brucher wrote: > Hi, > > Is it really ? > You only show the imaginary part of the FFT, so you can't > be sure of > what you are saying. Indeed, is there not a "label" for a function f which satisfies Im(iFFT(f)) = Im(FFT^2(f)), Re(iFFT(f)) != Re(FFT^2(f))?

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread David Warde-Farley
On 9-Jun-09, at 3:54 AM, David Cournapeau wrote: > For example, what ML people call PCA is called Karhunen Loéve in > signal > processing, and the concepts are quite similar. Yup. This seems to be a nice set of review notes: http://www.ece.rutgers.edu/~orfanidi/ece525/svd.pdf And goi

Re: [Numpy-discussion] [SciPy-dev] More on Summer NumPy Doc Marathon

2009-06-09 Thread David Goldsmith
> Also the milestone link from the Front Page does not go > anywhere: > http://docs.scipy.org/numpy/Front%20Page/#milestones Fixed. DG ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-di

Re: [Numpy-discussion] [SciPy-dev] More on Summer NumPy Doc Marathon

2009-06-09 Thread David Goldsmith
Thanks, Bruce. --- On Tue, 6/9/09, Bruce Southey wrote: > Hi, > Great. > Can you provide the actual colors at the start for : >     * Edit white, light gray, or yellow >     * Don't edit dark gray > While not color-blind, not all browsers render the same > colors on all > operating systems etc

Re: [Numpy-discussion] Definitions of pv, fv, nper, pmt, and rate

2009-06-09 Thread David Goldsmith
--- On Tue, 6/9/09, Skipper Seabold wrote: > These are the two most basic building blocks of time value > problems, > discounting one cash flow and an annuity.  There are > *plenty* of > examples and use cases for uneven cash flows or for > providing a given > pv or fv.  Without even getting int

Re: [Numpy-discussion] [SciPy-dev] More on Summer NumPy Doc Marathon

2009-06-09 Thread David Goldsmith
Thanks, Stefan. The lists you suggest already exist (more or less, depending on the "thing," i.e., list of categories, completely, prioritized list of individual items, sort of, at least w/in the categories) on the Milestones page (that's essentially what the Milestones page is) and the list o

Re: [Numpy-discussion] error with large memmap

2009-06-09 Thread Charles R Harris
On Tue, Jun 9, 2009 at 8:51 AM, John Schulman wrote: > What's the best way to install a 64-bit python alongside my existing > installation? > There was a long thread about that a while back. Try a search on the archives. It wasn't all that easy, though. Chuck ___

Re: [Numpy-discussion] second 2d fft gives the same result as fft+ifft

2009-06-09 Thread Matthieu Brucher
Hi, Is it really ? You only show the imaginary part of the FFT, so you can't be sure of what you are saying. Don't forget that the only difference between FFT and iFFT is (besides of teh scaling factor) a minus sign in the exponent. Matthieu 2009/6/9 bela : > > I tried to calculate the second fo

[Numpy-discussion] second 2d fft gives the same result as fft+ifft

2009-06-09 Thread bela
I tried to calculate the second fourier transformation of an image with the following code below: --- import pylab import numpy ### Create a simple image fx = numpy.zeros( 128**2 ).reshape(128,128).astype( numpy.float ) for i in xrang

Re: [Numpy-discussion] error with large memmap

2009-06-09 Thread David Cournapeau
John Schulman wrote: > What's the best way to install a 64-bit python alongside my existing > installation? > It is a bit complicated because you need to build your own python interpreter (the python.org one does not handle 64 bits AFAIK). You could just install your python somewhere in your $H

Re: [Numpy-discussion] error with large memmap

2009-06-09 Thread John Schulman
What's the best way to install a 64-bit python alongside my existing installation? On Tue, Jun 9, 2009 at 7:32 AM, John Schulman wrote: > OK looks like that was the issue > $ python -c "import platform; print platform.machine()" > i386 > > Thanks > > > On Tue, Jun 9, 2009 at 2:52 AM, David > Cour

[Numpy-discussion] Adding zero-dimension arrays, bug?

2009-06-09 Thread David Paul Reichert
Hi, Numpy let's me define arrays with zero rows and/or columns, and that's wanted behaviour from what I have read in discussions. However, I can add an array with zero rows to an array with one row (but not more), resulting in another zero row array, like so: In: a = zeros((4,0)) In: a Out: arr

Re: [Numpy-discussion] error with large memmap

2009-06-09 Thread John Schulman
OK looks like that was the issue $ python -c "import platform; print platform.machine()" i386 Thanks On Tue, Jun 9, 2009 at 2:52 AM, David Cournapeau wrote: > Charles R Harris wrote: >> >> >> On Tue, Jun 9, 2009 at 2:32 AM, John Schulman > > wrote: >> >>     I'm gettin

Re: [Numpy-discussion] Definitions of pv, fv, nper, pmt, and rate

2009-06-09 Thread Skipper Seabold
On Tue, Jun 9, 2009 at 1:14 AM, wrote: > On Tue, Jun 9, 2009 at 12:51 AM, wrote: >> >> --- On Mon, 6/8/09, Skipper Seabold wrote: >> >>> I forgot the last payment (which doesn't earn any >>> interest), so one more 100. >> >> So in fact they're not in agreement? >> >>> pretty soon.  I don't have

Re: [Numpy-discussion] error with large memmap

2009-06-09 Thread David Cournapeau
Charles R Harris wrote: > > > On Tue, Jun 9, 2009 at 2:32 AM, John Schulman > wrote: > > I'm getting the error > OverflowError: cannot fit 'long' into an index-sized integer > when I try to memmap a 6gb file > > top of the stack trace is > mm = mmap.m

Re: [Numpy-discussion] error with large memmap

2009-06-09 Thread Charles R Harris
On Tue, Jun 9, 2009 at 2:32 AM, John Schulman wrote: > I'm getting the error > OverflowError: cannot fit 'long' into an index-sized integer > when I try to memmap a 6gb file > > top of the stack trace is > mm = mmap.mmap(fid.fileno(), bytes, access=acc) > where bytes = 652800L > > I thought t

Re: [Numpy-discussion] How to remove fortran-like loops with numpy?

2009-06-09 Thread Sebastian Haase
2009/6/9 Stéfan van der Walt : > Hi Juan > <---cut ---> >> As you can see, it is very simple, but it takes several seconds running just >> to create a 200x200 plot. Fortran takes same time to create a 2000x2000 >> plot, around 100 times faster... So the question is, do you know how to >> programme

[Numpy-discussion] improving arraysetops

2009-06-09 Thread Robert Cimrman
Hi, I am starting a new thread, so that it reaches the interested people. Let us discuss improvements to arraysetops (array set operations) at [1] (allowing non-unique arrays as function arguments, better naming conventions and documentation). r. [1] http://projects.scipy.org/numpy/ticket/1133

Re: [Numpy-discussion] setmember1d_nu

2009-06-09 Thread Robert Cimrman
Neil Crighton wrote: > Robert Cimrman ntc.zcu.cz> writes: > I'd really like to see the setmember1d_nu function in ticket 1036 get into numpy. There's a patch waiting for review that including tests: http://projects.scipy.org/numpy/ticket/1036 Is there anything I can

[Numpy-discussion] error with large memmap

2009-06-09 Thread John Schulman
I'm getting the error OverflowError: cannot fit 'long' into an index-sized integer when I try to memmap a 6gb file top of the stack trace is mm = mmap.mmap(fid.fileno(), bytes, access=acc) where bytes = 652800L I thought that 64-bit systems with python>2.5 could memmap large files. I'm runnin

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread Stéfan van der Walt
2009/6/9 David Cournapeau : > Anyway, the book from Bishop is a pretty good reference by one of the > leading researcher: > > http://research.microsoft.com/en-us/um/people/cmbishop/prml/ > > It can be read without much background besides basic 1st year > calculus/linear algebra. Bishop's book coul

Re: [Numpy-discussion] setmember1d_nu

2009-06-09 Thread Neil Crighton
Robert Cimrman ntc.zcu.cz> writes: > >> I'd really like to see the setmember1d_nu function in ticket 1036 get into > >> numpy. There's a patch waiting for review that including tests: > >> > >> http://projects.scipy.org/numpy/ticket/1036 > >> > >> Is there anything I can do to help get it applied

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread David Cournapeau
David Cournapeau wrote: > > I think the biggest problem is the 'babel tower' aspect of machine > learning (the expression is from David H. Wolpert I believe), and > practitioners in different subfields often use totally different words > for more or less the same concepts (and many keep being redis

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread David Cournapeau
Robin wrote: > On Mon, Jun 8, 2009 at 7:14 PM, David Warde-Farley wrote: > >> On 8-Jun-09, at 8:33 AM, Jason Rennie wrote: >> >> Note that EM can be very slow to converge: >> >> That's absolutely true, but EM for PCA can be a life saver in cases where >> diagonalizing (or even computing) the ful

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread Matthieu Brucher
2009/6/9 Robin : > On Mon, Jun 8, 2009 at 7:14 PM, David Warde-Farley wrote: >> >> On 8-Jun-09, at 8:33 AM, Jason Rennie wrote: >> >> Note that EM can be very slow to converge: >> >> That's absolutely true, but EM for PCA can be a life saver in cases where >> diagonalizing (or even computing) the f

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2009-06-09 Thread Robin
On Mon, Jun 8, 2009 at 7:14 PM, David Warde-Farley wrote: > > On 8-Jun-09, at 8:33 AM, Jason Rennie wrote: > > Note that EM can be very slow to converge: > > That's absolutely true, but EM for PCA can be a life saver in cases where > diagonalizing (or even computing) the full covariance matrix is n