Re: [Numpy-discussion] very large matrices.

2007-05-14 Thread Giorgio Luciano
If you are using it for making a PCA, why dont' you try to use nipals algorithm ? (probably a silly question , just wanted to give help :) Giorgio ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

[Numpy-discussion] argsort and take along arbitrary axes

2007-05-14 Thread Zachary Pincus
Hello all, I've got a few questions that came up as I tried to calculate various statistics about an image time-series. For example, I have an array of shape (t,x,y) representing t frames of a time-lapse of resolution (x,y). Now, say I want to both argsort and sort this time-series, pixel-

Re: [Numpy-discussion] NumPy 1.0.3 release next week

2007-05-14 Thread Johannes Loehnert
Hi, in error logs as yours, always look for the first line which says error. If it is, like in your case, something like On Sunday, 13. May 2007 19:21:15 dmitrey wrote: /usr/lib/gcc/x86_64-linux-gnu/4.1.2/include/limits.h:122:61: error: limits.h: No such file or directory you are missing

Re: [Numpy-discussion] best way of counting time and cputime?

2007-05-14 Thread [EMAIL PROTECTED]
Is the genutils module not included to standard CPython edition? It's not. It's a sub-module of IPython. It's based on the resource module,though and that comes with Python on Linux. Just define the function Fernando posted: def clock(): clock() - floating point number

Re: [Numpy-discussion] argsort and take along arbitrary axes

2007-05-14 Thread Zachary Pincus
I've got a few questions that came up as I tried to calculate various statistics about an image time-series. For example, I have an array of shape (t,x,y) representing t frames of a time-lapse of resolution (x,y). Now, say I want to both argsort and sort this time-series, pixel- wise. (For

Re: [Numpy-discussion] very large matrices.

2007-05-14 Thread Zachary Pincus
Hello Dave, I don't know if this will be useful to your research, but it may be worth pointing out in general. As you know PCA (and perhaps some other spectral algorithms?) use eigenvalues of matrices that can be factored out as A'A (where ' means transpose). For example, in the PCA case,

Re: [Numpy-discussion] argsort and take along arbitrary axes

2007-05-14 Thread Charles R Harris
On 5/14/07, Zachary Pincus [EMAIL PROTECTED] wrote: I've got a few questions that came up as I tried to calculate various statistics about an image time-series. For example, I have an array of shape (t,x,y) representing t frames of a time-lapse of resolution (x,y). Now, say I want to both

Re: [Numpy-discussion] howto make from flat array (1-dim) 2-dimensional?

2007-05-14 Thread Christopher Barker
or: a=array([1,2,3]).reshape((-1,1)) Darn, I guess there is more than one obvious way to do it! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115

Re: [Numpy-discussion] numpy array sharing between processes? (and ctypes)

2007-05-14 Thread Ray S
While investigating ctypes and numpy for sharing, I saw that the example on http://www.scipy.org/Cookbook/Ctypes#head-7def99d882618b52956c6334e08e085e297cb0c6 does not quite work. However, with numpy.version.version=='1.0b1', ActivePython 2.4.3 Build 12: import numpy as N from ctypes import *

Re: [Numpy-discussion] numpy array sharing between processes? (and ctypes)

2007-05-14 Thread Travis Oliphant
Ray S wrote: print N.diag(x) Works for me... I can then do: import numpy.core.multiarray as MA xBuf = MA.getbuffer(x) z = MA.frombuffer(xBuf).reshape((3,3)) I see this kind of importing used more often than it should be. It is dangerous to import directly from numpy.core and

Re: [Numpy-discussion] .max() and zero length arrays

2007-05-14 Thread Alexander Schmolck
Robert Kern [EMAIL PROTECTED] writes: If possible, I would prefer a way to pass a value to use and raise the error if no such value is passed rather than hardcode an identity value for min() and max(). What's wrong with inf? I'm not sure integer reductions should have max/min-ints as

Re: [Numpy-discussion] numpy array sharing between processes? (and ctypes)

2007-05-14 Thread Stefan van der Walt
On Mon, May 14, 2007 at 11:44:11AM -0700, Ray S wrote: While investigating ctypes and numpy for sharing, I saw that the example on http://www.scipy.org/Cookbook/Ctypes#head-7def99d882618b52956c6334e08e085e297cb0c6 does not quite work. However, with numpy.version.version=='1.0b1',

Re: [Numpy-discussion] Numpy-discussion Digest, Vol 8, Issue 28

2007-05-14 Thread Nick Fotopoulos
On 5/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Message: 3 Date: Mon, 14 May 2007 14:21:50 -0400 From: David M. Cooke [EMAIL PROTECTED] Subject: Re: [Numpy-discussion] .max() and zero length arrays To: Discussion of Numerical Python numpy-discussion@scipy.org Message-ID: [EMAIL

Re: [Numpy-discussion] .max() and zero length arrays

2007-05-14 Thread Robert Kern
Alexander Schmolck wrote: Robert Kern [EMAIL PROTECTED] writes: If possible, I would prefer a way to pass a value to use and raise the error if no such value is passed rather than hardcode an identity value for min() and max(). What's wrong with inf? I'm not sure integer reductions

Re: [Numpy-discussion] .max() and zero length arrays

2007-05-14 Thread Alexander Schmolck
Robert Kern [EMAIL PROTECTED] writes: Alexander Schmolck wrote: Robert Kern [EMAIL PROTECTED] writes: If possible, I would prefer a way to pass a value to use and raise the error if no such value is passed rather than hardcode an identity value for min() and max(). What's wrong with

Re: [Numpy-discussion] .max() and zero length arrays

2007-05-14 Thread Robert Kern
Alexander Schmolck wrote: Robert Kern [EMAIL PROTECTED] writes: Alexander Schmolck wrote: Robert Kern [EMAIL PROTECTED] writes: If possible, I would prefer a way to pass a value to use and raise the error if no such value is passed rather than hardcode an identity value for min() and

Re: [Numpy-discussion] very large matrices.

2007-05-14 Thread val
Dave, I'm may be totally wrong, but i have intuitive feeling that your problem may be reformulated with focus on separation of a basic physical (vs. mathematical) 'core' and the terms which depend on a reasonable small parameter. In other words, my point is to build a simplified model