[Numpy-discussion] Numpy + SWIG

2012-06-04 Thread Gideon Simpson
There are two types of swig problems that I was hoping to get some help with. First, suppose I have some C function void f(double *x, int nx, double *y, int ny); where we input one array, and we output another array, both of which should be the same size. I have used in my .i file:

Re: [Numpy-discussion] Normalization of ifft

2009-03-26 Thread Gideon Simpson
I thought it was the same as the MATLAB format: http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/fft.htmlhttp://www.google.com/search ?client=safarirls=en-usq=MATLAB+fftie=UTF-8oe=UTF-8 On Mar 26, 2009, at 7:56 PM, Lutz Maibaum wrote: Hello,

[Numpy-discussion] Floating point question

2009-03-02 Thread Gideon Simpson
I recently discovered that for 8 byte floating point numbers, my fortran compilers (gfortran 4.2 and ifort 11.0) on an OS X core 2 duo machine believe the smallest number 2.220507...E-308. I presume that my C compilers have similar results. I then discovered that the smallest floating

Re: [Numpy-discussion] Floating point question

2009-03-02 Thread Gideon Simpson
On Mar 2, 2009, at 4:00 PM, Michael S. Gilbert wrote: how are you calculating fmin? numpy has a built-in function that will tell you this information: numpy.finfo( numpy.float ).min -1.7976931348623157e+308 hopefully this helps shed some light on your questions. regards, mike When I

[Numpy-discussion] loadtxt slow

2009-03-01 Thread Gideon Simpson
So I have some data sets of about 16 floating point numbers stored in text files. I find that loadtxt is rather slow. Is this to be expected? Would it be faster if it were loading binary data? -gideon ___ Numpy-discussion mailing list

[Numpy-discussion] casting integers to reals

2009-02-26 Thread Gideon Simpson
I want to do: numpy.float(numpy.arange(0, 10)) but get the error: Traceback (most recent call last): File stdin, line 1, in module TypeError: only length-1 arrays can be converted to Python scalars How should I do this? -gideon ___

Re: [Numpy-discussion] convolution axis

2009-01-29 Thread Gideon Simpson
it along the desired axis. Nadav -הודעה מקורית- מאת: numpy-discussion-boun...@scipy.org בשם Gideon Simpson נשלח: ה 29-ינואר-09 06:59 אל: Discussion of Numerical Python נושא: [Numpy-discussion] convolution axis Is there an easy way to perform convolutions along a particular axis

[Numpy-discussion] convolution axis

2009-01-28 Thread Gideon Simpson
Is there an easy way to perform convolutions along a particular axis of an array? -gideon ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] glibc error

2009-01-25 Thread Gideon Simpson
Rebuilding the library against ATLAS 3.8.2 with lapack 3.1.1 seems to have done the trick. I do get one failure: == FAIL: test_umath.TestComplexFunctions.test_against_cmath

[Numpy-discussion] numpy and the ACML

2009-01-24 Thread Gideon Simpson
Does anyone have a guide on how to get numpy to use the ACML as its blas/lapack backend? -gideon ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy and the ACML

2009-01-24 Thread Gideon Simpson
: You have setup.cfg: * set add the directory where acml libraries reside to the library dir path list * add acmllibraries under blas and lapack sections Nadav -הודעה מקורית- מאת: numpy-discussion-boun...@scipy.org בשם Gideon Simpson נשלח: ש 24-ינואר-09 18:21 אל: Discussion

Re: [Numpy-discussion] numpy and the ACML

2009-01-24 Thread Gideon Simpson
setup.py build, and looking at the output? -gideon On Jan 24, 2009, at 4:05 PM, Pauli Virtanen wrote: Sat, 24 Jan 2009 15:26:17 -0500, Gideon Simpson wrote: Nadav- That doesn't quite seem to work for me. I added: [blas_opt] library_dirs = /usr/local/nonsystem/simpson/acml4.2.0/gfortran64

Re: [Numpy-discussion] numpy and the ACML

2009-01-24 Thread Gideon Simpson
are in /noc/users/agn/ext/AMD64/acml/ifort64/lib HTH. George. 2009/1/24 Gideon Simpson simp...@math.toronto.edu: I've tried building CBLAS, which seems to run properly by itself, but numpy is still having difficulty. I've got the following in my site.cfg: [blas_opt] library_dirs = /usr/local

[Numpy-discussion] glibc error

2009-01-24 Thread Gideon Simpson
Having built an up to date lapack and ATLAS against gcc 4.3.2, I tried installing numpy 1.2.1 on Python 2.5.4. When testing I get: Python 2.5.4 (r254:67916, Jan 24 2009, 00:27:20) [GCC 4.3.2] on linux2 Type help, copyright, credits or license for more information. import numpy numpy.test()

Re: [Numpy-discussion] glibc error

2009-01-24 Thread Gideon Simpson
. -gideon On Jan 24, 2009, at 11:37 PM, David Cournapeau wrote: Gideon Simpson wrote: Having built an up to date lapack and ATLAS against gcc 4.3.2, I tried installing numpy 1.2.1 on Python 2.5.4. When testing I get: Python 2.5.4 (r254:67916, Jan 24 2009, 00:27:20) [GCC 4.3.2] on linux2 Type

[Numpy-discussion] failure

2009-01-21 Thread Gideon Simpson
Installing on a Sun machine with Red Hat linux, I got the following error: == FAIL: test_umath.TestComplexFunctions.test_against_cmath -- Traceback (most

[Numpy-discussion] efficient usage of tensordot

2009-01-17 Thread Gideon Simpson
This is related to a question I posted earlier. Suppose I have array A with dimensions n x m x l and array x with dimensions m x l. Interpret this as an array of l nxm matrices and and array of l m dimensional vectors. I wish to compute the matrix- vector product A[:,:,k] x[:,k] for each k

[Numpy-discussion] tensor contractions

2009-01-16 Thread Gideon Simpson
Suppose I have a 3d array, A, with dimensions 2 x 2 x N, and a 2d 2 x N array, u. I interpret A as N 2x2 matrices and u as N 2d vectors. Suppose I want to apply the mth matrix to the mth vector, i.e. A[, , m] u[, m] = v[, m] Aside from doing A[0,0,:] u[0,:] + A[0,1,:] u[1,:] = v[0,:] and

[Numpy-discussion] os x, intel compilers mkl, and fink python

2008-11-28 Thread Gideon Simpson
Has anyone gotten the combination of OS X with a fink python distribution to successfully build numpy/scipy with the intel compilers and the mkl? If so, how'd you do it? -gideon ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

[Numpy-discussion] MATLAB ASCII format

2008-11-21 Thread Gideon Simpson
Is there (or should there be) a routine for reading and writing numpy arrays and matrices in MATLAB ASCII m-file format? -gideon ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] fink python26 and numpy 1.2.1

2008-11-03 Thread Gideon Simpson
The fink guys fixed a bug so it now at least builds properly with python 2.6. -gideon On Nov 3, 2008, at 1:35 AM, David Cournapeau wrote: Michael Abshoff wrote: Unfortunately numpy 1.2.x does not support Python 2.6. IIRC support is planned for numpy 1.3. Also it is true it is not

[Numpy-discussion] fink python26 and numpy 1.2.1

2008-11-02 Thread Gideon Simpson
Not sure if this is an issue with numpy or an issue with fink python 2.6, but when trying to build numpy, I get the following error: gcc -L/sw/lib -bundle /sw/lib/python2.6/config -lpython2.6 build/ temp.macosx-10.5-i386-2.6/numpy/core/src/multiarraymodule.o -o build/

[Numpy-discussion] fast matrix vector operations

2008-10-04 Thread Gideon Simpson
Suppose I have a toeplitz matrix, A. There is a well known algorithm for computing the matrix vector product Ax, in NlogN operations. An exact reference escapes me, but it may be in Golub van Loan's book. My question is, how could I best take advantage of this algorithm within

[Numpy-discussion] exponentiation q.

2008-07-25 Thread Gideon Simpson
How does python (or numpy/scipy) do exponentiation? If I do x**p, where p is some positive integer, will it compute x*x*...*x (p times), or will it use logarithms? -gideon ___ Numpy-discussion mailing list Numpy-discussion@scipy.org