You can subscribe to this list here.
2000 |
Jan
(8) |
Feb
(49) |
Mar
(48) |
Apr
(28) |
May
(37) |
Jun
(28) |
Jul
(16) |
Aug
(16) |
Sep
(44) |
Oct
(61) |
Nov
(31) |
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(56) |
Feb
(54) |
Mar
(41) |
Apr
(71) |
May
(48) |
Jun
(32) |
Jul
(53) |
Aug
(91) |
Sep
(56) |
Oct
(33) |
Nov
(81) |
Dec
(54) |
2002 |
Jan
(72) |
Feb
(37) |
Mar
(126) |
Apr
(62) |
May
(34) |
Jun
(124) |
Jul
(36) |
Aug
(34) |
Sep
(60) |
Oct
(37) |
Nov
(23) |
Dec
(104) |
2003 |
Jan
(110) |
Feb
(73) |
Mar
(42) |
Apr
(8) |
May
(76) |
Jun
(14) |
Jul
(52) |
Aug
(26) |
Sep
(108) |
Oct
(82) |
Nov
(89) |
Dec
(94) |
2004 |
Jan
(117) |
Feb
(86) |
Mar
(75) |
Apr
(55) |
May
(75) |
Jun
(160) |
Jul
(152) |
Aug
(86) |
Sep
(75) |
Oct
(134) |
Nov
(62) |
Dec
(60) |
2005 |
Jan
(187) |
Feb
(318) |
Mar
(296) |
Apr
(205) |
May
(84) |
Jun
(63) |
Jul
(122) |
Aug
(59) |
Sep
(66) |
Oct
(148) |
Nov
(120) |
Dec
(70) |
2006 |
Jan
(460) |
Feb
(683) |
Mar
(589) |
Apr
(559) |
May
(445) |
Jun
(712) |
Jul
(815) |
Aug
(663) |
Sep
(559) |
Oct
(930) |
Nov
(373) |
Dec
|
From: Charles G W. <cg...@al...> - 2002-02-15 20:22:32
|
John J. Lee writes: > I think -- correct me if I'm wrong -- he was asking about interpolation. I think that only Mr Yeates knows for sure! I read the query a few times and I think he's looking for straight-ahead subsampling without interpolation. > If a Python loop is too slow, you can probably do it with the standard > numpy functions, with some experimentation. If interpolation is desired, it might also be worthwhile looking at the Python Imaging Library (PIL), I believe it has routines for resizing images with bilinear interpolation. Since PIL supports many different data formats (even floating point) and it's fairly easy, if inelegant, to inter-convert PIL images and NumPy arrays using "fromstring/tostring" methods (there should be tighter integration between these packages, maybe somebody has done this since last I looked), you might find that the PIL image resizing does what you're looking for. |
From: John J. L. <jj...@po...> - 2002-02-15 20:04:09
|
On Thu, 14 Feb 2002, Charles G Waldman wrote: > Mathew Yeates writes: > > > how can I take a matrix and subsample it down to > > an arbitrary size? It seems that using slices is > > limited to constant integer step sizes while, if > > I'm converting between arbitrary sizes, I would like > > to subsample at a nonuniform rate. > > I'm not sure exactly what you're trying to do, but maybe the following > Python session will show you the way. [examples of take() usage snipped] I think -- correct me if I'm wrong -- he was asking about interpolation. If a Python loop is too slow, you can probably do it with the standard numpy functions, with some experimentation. John |
From: Charles G W. <cg...@al...> - 2002-02-15 02:42:17
|
Mathew Yeates writes: > how can I take a matrix and subsample it down to > an arbitrary size? It seems that using slices is > limited to constant integer step sizes while, if > I'm converting between arbitrary sizes, I would like > to subsample at a nonuniform rate. I'm not sure exactly what you're trying to do, but maybe the following Python session will show you the way. >>> from Numeric import * >>> take.__doc__ 'take(a, indices, axis=0). Selects the elements in indices from array a along t he given axis.' >>> a = fromfunction(lambda i,j: 10*i+j, (10,5)) >>> a array([[ 0, 1, 2, 3, 4], [10, 11, 12, 13, 14], [20, 21, 22, 23, 24], [30, 31, 32, 33, 34], [40, 41, 42, 43, 44], [50, 51, 52, 53, 54], [60, 61, 62, 63, 64], [70, 71, 72, 73, 74], [80, 81, 82, 83, 84], [90, 91, 92, 93, 94]]) >>> b = take(a,(0,2,3,5,7)) >>> b array([[ 0, 1, 2, 3, 4], [20, 21, 22, 23, 24], [30, 31, 32, 33, 34], [50, 51, 52, 53, 54], [70, 71, 72, 73, 74]]) >>> c = take(b,(0,2,3), 1) >>> c array([[ 0, 2, 3], [20, 22, 23], [30, 32, 33], [50, 52, 53], [70, 72, 73]]) |
From: Mathew Y. <ma...@fu...> - 2002-02-15 02:24:28
|
Hi- Maybe this is a dumb question .... but.... how can I take a matrix and subsample it down to an arbitrary size? It seems that using slices is limited to constant integer step sizes while, if I'm converting between arbitrary sizes, I would like to subsample at a nonuniform rate. Am I missing something? Mathew |
From: Paul F. D. <pa...@pf...> - 2002-02-14 18:05:43
|
I recoded the new average function in both Numeric and MA. This version ensures that in the returned=1 case the weights returned will be of the same shape as the average. The new version is in CVS and labeled as 21.0b2. The average now allows weights that, rather than having to be the same size as the input, can be the same size as the input's axis'th dimension. This relieves the user of the rather tricky code needed to make an array of a given shape broadcasting a vector along a certain axis. This is a relatively frequent need and so I will write a separate routine for it soon. My proposed calling sequence is: def broadcast(v, axis=0, s) """Returns an array of the type of v and the shape s, such that setting the axis'th subscript to j results in an array whose values are all v[j]. """ Comments about this idea or the way I explain it would be welcome. |
From: Jon S. <js...@wm...> - 2002-02-07 10:13:50
|
import RandomArray mean=0.0 stdev=1.0 RandomArray.normal(mean,stdev,shape=ReturnFloat) Manual of Numpy, chapter 17, page 97. Edition October 200. Jon Saenz. | Tfno: +34 946012445 Depto. Fisica Aplicada II | Fax: +34 944648500 Facultad de Ciencias. \\ Universidad del Pais Vasco \\ Apdo. 644 \\ 48080 - Bilbao \\ SPAIN On Thu, 7 Feb 2002, Nils Wagner wrote: > Hi, > > How can I simulate a stationary, white noise, Gaussian random process > (zero mean and unit variance) with Numpy ? > > Nils > > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |
From: Nils W. <nw...@me...> - 2002-02-07 08:59:18
|
Hi, How can I simulate a stationary, white noise, Gaussian random process (zero mean and unit variance) with Numpy ? Nils |
From: SungPil Y. <yo...@al...> - 2002-01-31 22:32:08
|
Hi, all I have been trying to install numpy. Python is installed in my home directory ~/Python-2.2 and when I do % python setup.py install in the directory ~/Numeric-20.3, I get the following error message distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/local/lib/python2.2/config/Makefile (No such file or directory) Can anybody figure out what I am doing wrong? sungpil |
From: <kr...@po...> - 2002-01-30 07:38:37
|
Paul Dubois writes: > I have verified that this package seems to work on Windows. I says seems > only because I didn't try enough to uncover anything subtle. Thanks! If you run maparray.py from the command-line, it runs a basic regression test suite, which doesn't really try enough to uncover anything subtle either. > Unless or until we are convinced as a community that this is (a) the > right way to do this and (b) that the package is portable, it would not > be wise to put it in the main distribution. Well, I'm not the community, but I'll state my arguments. On (a): I don't know about the right way to do it; as I'm sure is obvious, I'm new to extending Numerical Python in C, but I doubt there's a simpler way to do it ("it" being seeing the contents of files as Numeric arrays), and I think it does work as well as it's possible to get it to work without major hacking of Numeric (to support read-only arrays) or the mmap module (to prevent closing an open object, to allow read-only mmapping on Windows). The other things on the wishlist are basically features to add --- "start" and "size" arguments to maparray(), a "create-a-file" argument to maparray(), etc., and don't change the basic structure. On (b): it depends on two-argument mmap.mmap(), open(), <file>.fileno(), and os.fstat(). The major portability hurdle there is probably mmap.mmap(), but that's OK. > I would like to hear from the community about this so that I will know > whether or not to add this package as a separate SourceForge 'package' > within the Numerical Python area. Meantime I will add a link to the web > page. I would too. There have been downloads from something like 50 IP addresses, but I've only heard from three people. |
From: Perry G. <pe...@st...> - 2002-01-29 22:53:42
|
> > Is there some support for random arrays in numarray? Or, if it becomes > part of the standard library, will there be a separate module (such as > Numeric's RandomArray)? > > -- > Magnus Lie Hetland The Anygui Project > http://hetland.org http://anygui.org > Not at the moment, but I imagine we will add a separate module as it is done now for Numeric. While I'm replying, our short range development plans are (now that we are back working on it): 1) adding properties for .shape, .flat, etc. This was done last week but we are testing this and will put it out as soon as possible (probably after the Python Conference). By the way, to make it usable from Python <2.2, we will add accessor functions with different names than we used previously (e.g., .getshape(), setshape(), .getflat()...) 2) reworking numarray to make it safe against array overruns and anything that might cause segfaults or buserrors (in principle should only happen now if you twiddle directly with private attributes). 3) provide examples of how to add new ufuncs and interface C code and such. We may decide to add a module or two in the process. And perhaps some limited benchmarking. 4) rework the implementation of complex types to be in C. 5) do more extensive benchmarking and look at how to optimize smaller arrays. Perry Greenfield |
From: Magnus L. H. <ma...@he...> - 2002-01-29 22:52:00
|
My numarray dumps core... >>> from numarray import * >>> a = zeros([10, 10]) >>> a = zeros([10, 10]) + 0.5 Bus Error (core dumped) Numeric tackles this just fine... What gives? -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org |
From: Magnus L. H. <ma...@he...> - 2002-01-29 22:37:15
|
Is there some support for random arrays in numarray? Or, if it becomes part of the standard library, will there be a separate module (such as Numeric's RandomArray)? -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org |
From: Magnus L. H. <ma...@he...> - 2002-01-29 21:06:55
|
Jay T Miller <jm...@st...>: > > Numarray should soon support the following properties: > > .shape > .flat > .real > .imag > .imaginary > > We're testing them here at STSCI. If all goes well, there should be > a new numarray release within 1-3 weeks. Yay! :)) > Todd -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org |
From: Jay T M. <jm...@st...> - 2002-01-29 21:00:02
|
Numarray should soon support the following properties: .shape .flat .real .imag .imaginary We're testing them here at STSCI. If all goes well, there should be a new numarray release within 1-3 weeks. Todd -- Todd Miller jm...@st... STSCI / SSG (410) 338 4576 |
From: Magnus L. H. <ma...@he...> - 2002-01-29 20:39:29
|
According to the (probably outdated) user guide for numarray[1] attributes have accessors such as a.foo() --> get foo a.foo(val) --> set foo to val but this doesn't seem to be the case. I see that the shape() method doesn't take any arguments; I guess the reshape method is the thing to use here. How about other attributes? Will they have special names for their setters too, or is this only true for the shape attribute? It seems to me that if we are going to abandon plain Python attributes (or 2.2 properties), it would be nice to handle the transition in a consistent manner... Perhaps? (But then again, I'm sure I'm missing something :) [1] http://stsdas.stsci.edu/numarray/Userguide.html -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org |
From: Magnus L. H. <ma...@he...> - 2002-01-29 20:33:48
|
I see in the docs that numarray uses accessor methods instead of properties, mainly because of performance (to avoid __getattr__ and __setattr__). With the new property type in Python 2.2, that shouldn't be as important anymore... Perhaps it would be possible to use properties where this type is available, and accessors elsewhere? -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org |
From: David A. <Da...@Ac...> - 2002-01-29 18:48:44
|
The O'Reilly Open Source Convention (July 22-26, 2002 -- San Diego, CA) is accepting proposals for tutorials, talks, panels, and lightning talks. See the Call for Participation in the Python and Zope track on python.org. Proposals are due by March 1, so don't wait a moment longer! CFP URL: http://www.python.org/workshops/oscon2002/cfp.html --david ascher |
From: Michaell T. <mic...@re...> - 2002-01-29 16:45:19
|
Thanks for your quick reply. This looks vaguely S-Plus-like, with which I am familar. I wasn't too clear in my question however, I would actually like a vector returned which would contain the values of c for the minimun value of b, within each category of a. Something like: for i in range(1:5000): # range of values of a d = c[Numeric.argmin(Numeric.where(a==i, b, sys.maxint))] Seems like I could hack a fix using such a vector, but I would guess that speed would be an issue. Essentially the functionality implied by GROUP BY in sql egen in stata lapply() in S-Plus. Paul F. Dubois wrote: > import Numeric, sys > a = Numeric.array([1,2,1,2,4,3,1,2,3,2,3,2]) > b = Numeric.array([4,3,5,2,4,5,3,6,3,2,5,6]) > c = Numeric.arange(len(b)) > > print c[Numeric.argmin(Numeric.where(a==1, b, sys.maxint))] > > > -----Original Message----- > From: num...@li... > [mailto:num...@li...] On Behalf Of > Michaell Taylor > Sent: Monday, January 28, 2002 12:59 PM > To: num...@li... > Subject: [Numpy-discussion] conditional array indexing > > > > Very new user to Numpy, so excuse the question. It relates to a > fundamental > issue which I have having trouble getting a grip on. > > Specifically, say I have the following: > > a = ([1,2,1,2,4,3,1,2,3,2,3,2]) > b = ([4,3,5,2,4,5,3,6,3,2,5,6]) > c = random variable of length=len(b) > > I would like to get the value of C associated with the lowest value of b > > within groupings of a. That is, there are three incidents of "1" in the > a > array. The lowest value of b associated with the value 1 in the a index > is > "3". This occurs in index value 6 on the a and b arrays. Now, I would > like > to then know the value of c[6]. > > Obviously the real problem is far more complex with len(a)==5000. > Any ideas? > > Thanks in advance. > > Michaell > > _______________________________________________ > Numpy-discussion mailing list Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion -- ========================================= Michaell Taylor, PhD Senior Economist, Reis, New York, USA |
From: John J. L. <jj...@po...> - 2002-01-29 16:39:29
|
On Sun, 27 Jan 2002, Travis Oliphant wrote: [...] > If I understand what you are trying to do, there is a function called > arraymap in the SciPy package (special module) (it was in the Numeric source [...] > I think that using this function and a combination of take and put can do > what you describe. I don't see how, though I may very well be missing something. To restate the problem very quickly (though the Python function I posted is much clearer -- it's only two or three lines of actual code): for every element in a list of array indices, the element in an output array at that index needs to be incremented; the tricky part is that this needs to happen once for *every time the index appears in the list*. Eg., in a 1D example, [0,1,1,1,4,5] might give you [1,3,0,0,1,1] (again, see my previous post for an actual tested example) I don't see how you can do this with arraymap, take and put. John |
From: Paul B. <Ba...@st...> - 2002-01-29 13:26:50
|
Magnus Lie Hetland wrote: > I'm trying to compile numarray 0.11 with Python 2.2 on a linux box but > somehow the compilation gets stuck on this line: > > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IInclude/numarray > -I/home/mlh/python/Python-2.2/include/python2.2 -c Src/_ufuncmodule.c > -o build/temp.linux-i686-2.2/_ufuncmodule.o > > No error message, no crash; it just never finishes -- it freezes. I > compiled/installed it on a Solaris box earlier, with no problems > whatsoever. > > I've never seen gcc freeze like this; can there be some circular > dependencies or something? (This machine had some problems with its > clock earlier, which made make go in a loop...) I tried running touch > on all files, but that didn't change anything... > > Any ideas, or tips for finding out what's wrong? (BTW, Numeric > compiles and installs just fine...) Yes, just wait several minutes for it to finish compiling. I had to wait over 5 minutes on 233 MHz i586. -- Paul Barrett, PhD Space Telescope Science Institute Phone: 410-338-4475 ESS/Science Software Group FAX: 410-338-4767 Baltimore, MD 21218 |
From: Paul F. D. <pa...@pf...> - 2002-01-28 21:20:11
|
import Numeric, sys a = Numeric.array([1,2,1,2,4,3,1,2,3,2,3,2]) b = Numeric.array([4,3,5,2,4,5,3,6,3,2,5,6]) c = Numeric.arange(len(b)) print c[Numeric.argmin(Numeric.where(a==1, b, sys.maxint))] -----Original Message----- From: num...@li... [mailto:num...@li...] On Behalf Of Michaell Taylor Sent: Monday, January 28, 2002 12:59 PM To: num...@li... Subject: [Numpy-discussion] conditional array indexing Very new user to Numpy, so excuse the question. It relates to a fundamental issue which I have having trouble getting a grip on. Specifically, say I have the following: a = ([1,2,1,2,4,3,1,2,3,2,3,2]) b = ([4,3,5,2,4,5,3,6,3,2,5,6]) c = random variable of length=len(b) I would like to get the value of C associated with the lowest value of b within groupings of a. That is, there are three incidents of "1" in the a array. The lowest value of b associated with the value 1 in the a index is "3". This occurs in index value 6 on the a and b arrays. Now, I would like to then know the value of c[6]. Obviously the real problem is far more complex with len(a)==5000. Any ideas? Thanks in advance. Michaell _______________________________________________ Numpy-discussion mailing list Num...@li... https://lists.sourceforge.net/lists/listinfo/numpy-discussion |
From: Michaell T. <mic...@re...> - 2002-01-28 20:57:56
|
Very new user to Numpy, so excuse the question. It relates to a fundamental issue which I have having trouble getting a grip on. Specifically, say I have the following: a = ([1,2,1,2,4,3,1,2,3,2,3,2]) b = ([4,3,5,2,4,5,3,6,3,2,5,6]) c = random variable of length=len(b) I would like to get the value of C associated with the lowest value of b within groupings of a. That is, there are three incidents of "1" in the a array. The lowest value of b associated with the value 1 in the a index is "3". This occurs in index value 6 on the a and b arrays. Now, I would like to then know the value of c[6]. Obviously the real problem is far more complex with len(a)==5000. Any ideas? Thanks in advance. Michaell |
From: Magnus L. H. <ma...@he...> - 2002-01-28 17:43:36
|
I'm trying to compile numarray 0.11 with Python 2.2 on a linux box but somehow the compilation gets stuck on this line: gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IInclude/numarray -I/home/mlh/python/Python-2.2/include/python2.2 -c Src/_ufuncmodule.c -o build/temp.linux-i686-2.2/_ufuncmodule.o No error message, no crash; it just never finishes -- it freezes. I compiled/installed it on a Solaris box earlier, with no problems whatsoever. I've never seen gcc freeze like this; can there be some circular dependencies or something? (This machine had some problems with its clock earlier, which made make go in a loop...) I tried running touch on all files, but that didn't change anything... Any ideas, or tips for finding out what's wrong? (BTW, Numeric compiles and installs just fine...) -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org |
From: Konrad H. <hi...@cn...> - 2002-01-28 16:21:35
|
Nils Wagner <nw...@me...> writes: > V,S,WT = singular_value_decomposition(Z) ? > > I am interested in a low rank approximation of Z. The singular values in S are sorted by decreasing order of magnitude, so you just replace as many "small" ones by zero as you wish, and multiply the three matrices back together. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hi...@cn... Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- |
From: Nils W. <nw...@me...> - 2002-01-28 14:47:27
|
Hi all, how can I obtain a truncated SVD (dyadic decomposition) of V,S,WT = singular_value_decomposition(Z) ? I am interested in a low rank approximation of Z. Thanks in advance. Nils |