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: Keith G. <kwg...@gm...> - 2006-06-22 16:33:16
|
On 6/22/06, Jocelyn E. Renner <j-r...@no...> wrote: > python setup.py install > > when I was in the numarray directory. When I executed this, I received > the following error message: > error: could not create > '/System/Library/Frameworks/Python.framework/Versions/2.3/include/ > python2.3/numarray': Permission denied > > I have tried to unlock this folder with little to no luck (I must > confess I am not the most computer savvy person ever). Try sudo python setup.py install |
From: David H. <dav...@gm...> - 2006-06-22 16:27:02
|
Hi, Numpy's unique(x) returns an array x with repetitions removed. However, since it returns asarray(dict.keys()), the resulting array is not sorted, worse, the original order may not be conserved. I think that unique() should return a sorted array, like its matlab homonym. Regards, David Huard |
From: Jocelyn E. R. <j-r...@no...> - 2006-06-22 16:25:07
|
Hello! I am attempting to install numarray on my Mac OX 10.3, and I successfully downloaded it. Since I am attempting to use this with Cantera, I followed their recommendations as to installing which included typing: python setup.py install when I was in the numarray directory. When I executed this, I received the following error message: error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3/numarray': Permission denied I have tried to unlock this folder with little to no luck (I must confess I am not the most computer savvy person ever). If anyone could give me some advice as to how to get this to install properly, I'd appreciate it! If it does not need to be in this folder, is there anyway to bypass this? Thanks so much! Jocelyn Jocelyn Renner Mechanical Engineering, Northwestern University ------------------------------------------------------------------------ ----------------- No man is an island, entire of itself...any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee. ---John Donne Meditation XVII |
From: Bill B. <wb...@gm...> - 2006-06-22 10:53:41
|
On 6/22/06, Ed Schofield <sch...@ft...> wrote: > > > On 22/06/2006, at 12:40 AM, Bill Baxter wrote: > > > Actually I think using mat() (just an alias for the matrix > > constructor) is a bad way to do it. That mat() (and most others on > > that page) should probably be replaced with asmatrix() to avoid the > > copy. > > Perhaps the 'mat' function should become an alias for 'asmatrix'. > I've thought this for a while. That makes sense to me. As far as I know, asmatrix() defaults to calling the constructor if it can't snarf the memory of the object being passed in. So, go on, shoot Ed and me down! :-) --Bill |
From: Konrad H. <kon...@la...> - 2006-06-22 10:40:21
|
Those who try out Python 2.5b1 and add Numeric might be annoyed by =20 the warning message that Python issues when Numeric is imported the =20 first time. This is due to the fact that Numeric lives inside a =20 directory called "Numeric" without being a package - Numeric has been =20= around for longer than packages in Python. You can get rid of this warning by adding the following lines to =20 sitecustomize.py: import warnings try: warnings.filterwarnings("ignore", category=3DImportWarning) except NameError: pass del warnings The try statement ensures that the code will work for older Python =20 releases as well. Konrad. -- --------------------------------------------------------------------- Konrad Hinsen Centre de Biophysique Mol=E9culaire, CNRS Orl=E9ans Synchrotron Soleil - Division Exp=E9riences Saint Aubin - BP 48 91192 Gif sur Yvette Cedex, France Tel. +33-1 69 35 97 15 E-Mail: hinsen =E4t cnrs-orleans.fr --------------------------------------------------------------------- |
From: Pau G. <pau...@gm...> - 2006-06-22 10:26:20
|
''' The following mail is a bit long and tedious to read, sorry about that. Here is the abstract: "I would like boolean indexing to work like slices and not like arrays of indices" ''' hi, I'm _really_ sorry to insist, but I have been thinking on it and I don't feel like replacing <boolean> with nonzero(<boolean>) is what we want. For me this is a bad trick equivalent to replacing slices to arrays of indices with r_[<slice>]: - it works only if you do that for a single axis. Let me explain: if i have an array, >>> from numpy import * >>> a = arange(12).reshape(3,4) i can slice it: >>> a[1:3,0:3] array([[ 4, 5, 6], [ 8, 9, 10]]) i can define boolean arrays 'equivalent' to this slices >>> b1 = array([False,True,True]) # equivalent to 1:3 >>> b2 = array([True,True,True,False]) # equivalent to 0:3 now if i use one of this boolean arrays for indexing, all work like with slices: >>> a[b1,:] #same as a[1:3,:] array([[ 4, 5, 6, 7], [ 8, 9, 10, 11]]) >>> a[:,b2] # same as a[:,0:3] array([[ 0, 1, 2], [ 4, 5, 6], [ 8, 9, 10]]) but if I use both at the same time: >>> a[b1,b2] # not equivalent to a[1:3,0:3] but to a[r_[1:3],r_[0:3]] Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: shape mismatch: objects cannot be broadcast to a single shape it doesn't work because nonzero(b1) and nonzero(b2) have different shapes. if I want the equivalent to a[1:3,1:3], i can do >>> a[ix_(b1,b2)] array([[ 4, 5, 6], [ 8, 9, 10]]) I can not see when the current behaviour of a[b1,b2] would be used. >From my (probably naive) point of view, <boolean> should not be converted to nonzero(<boolean>), but to some kind of slicing object. In that way boolean indexing could work like slices and not like arrays of integers, which will be more intuitive for me. Converting slices to arrays of indices is a trick that only works for one axis: >>> a[r_[1:3],0:3] #same as a[1:3,0:3] array([[ 4, 5, 6], [ 8, 9, 10]]) >>> a[1:3,r_[0:3]] #same as a[1:3,0:3] array([[ 4, 5, 6], [ 8, 9, 10]]) >>> a[r_[1:3],r_[0:3]] # NOT same as a[1:3,0:3] Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: shape mismatch: objects cannot be broadcast to a single shape am I completly wrong?? may be the current behaviour (only usefull for one axis) is enought?? sorry for asking things and not giving solutions and thanks for everything. pau PD: I noticed that the following code works >>> a[a>4,:,:,:,:,1:2:3,...,4:5:6] array([ 5, 6, 7, 8, 9, 10, 11]) |
From: Stefan v. d. W. <st...@su...> - 2006-06-22 08:49:33
|
Hi Tim On Wed, Jun 21, 2006 at 12:02:27PM -0700, Tim Hochberg wrote: >=20 > Numexpr can now handle broadcasting. As an example, check out this=20 > implementation of the distance-in-a-bunch-of-dimenstions function that'= s=20 > been going around. This is 80% faster than the most recent one posted o= n=20 > my box and considerably easier to read. This looks really cool. However, it does seem to break scalar operation: a =3D 3. b =3D 4. expr =3D numexpr("2*a+3*b",[('a',float),('b'.float)]) expr.run(a,b) Out[41]: array(-7.1680117685147315e-39) I havn't used numexpr before, so I could be doing something silly (although I did verify that the above works on r1986). Cheers St=E9fan |
From: Ed S. <sch...@ft...> - 2006-06-22 07:54:35
|
On 22/06/2006, at 12:40 AM, Bill Baxter wrote: > Actually I think using mat() (just an alias for the matrix > constructor) is a bad way to do it. That mat() (and most others on > that page) should probably be replaced with asmatrix() to avoid the > copy. Perhaps the 'mat' function should become an alias for 'asmatrix'. I've thought this for a while. Then code and documentation like this page could remain short and simple without incurring the performance penalty. Go on, shoot me down! :) -- Ed |
From: Travis O. <oli...@ie...> - 2006-06-22 05:58:55
|
Simon Burton wrote: > On Wed, 21 Jun 2006 10:50:26 -0600 > Travis Oliphant <oli...@ie...> wrote: > > >> So, in SVN NumPy, you will be able to do >> >> a[:,V>0] >> a[V>0,:] >> >> The V>0 will be replaced with integer arrays as if nonzero(V>0) had been >> called. >> > > OK. > But just for the record, we should note how to > do the operation that this used to do, eg. > > >>>> a=numpy.array([1,2]) >>>> a[[numpy.bool_(1)]] >>>> > array([2] > This behavior hasn't changed... All that's changed is that what used to raise an error (boolean arrays in a tuple) now works in the same way that boolean arrays worked before. > > So, with the new implementation, is it possible to cast > the bool array to an integer type without incurring a copy overhead ? > I'm not sure what you mean. What copy overhead? There is still copying going on. The way it's been implemented, the boolean arrays get replaced with integer index arrays under the hood so it is really nearly identical to replacing the boolean array with nonzero(<boolean>). > And finally, is someone keeping track of the performance > of array getitem ? It seems that as travis overloads it more and > more it might then slow down in some cases. > Actually, I'm very concientious of the overhead of getitem in code that I add. I just today found a memory leak in code that was added that I did not review carefully that was also slowing down all accesses of arrays > 1d that resulted in array scalars. I added an optimization that should speed that up. But, it would be great if others could watch the speed changes for basic operations. > I must admit my vision is blurring and head is spining as numpy > goes through these growing pains The 1.0 beta release is coming shortly. I would like to see the first beta by the first of July. The final 1.0 release won't occur, though, until after SciPy 2006. Thanks for your patience. We've been doing a lot of house-cleaning lately to separate the "old but compatible" interface from the "new." This has resulted in some confusion, to be sure. Please don't hesitate to voice your concerns. -Travis |
From: Michael F. <fi...@as...> - 2006-06-22 04:40:02
|
Hello all, I'm encountering some (relatively new?) behavior with masked arrays that strikes me as bizarre. Raising zero to a floating-point value is triggering a mask to be set, even though the result should be well-defined. When using fixed-point integers for powers, everything works as expected. I'm seeing this with both numarray and numpy. Take the case of 0**1, illustrated below: >>> import numarray as n1 >>> import numarray.ma as n1ma >>> n1.array(0.)**1 array(0.0) >>> n1.array(0.)**1. array(0.0) >>> n1ma.array(0.)**1 array(0.0) >>> n1ma.array(0.)**1. array(data = [1.0000000200408773e+20], mask = 1, fill_value=[ 1.00000002e+20]) >>> import numpy as n2 >>> import numpy.core.ma as n2ma >>> n2.array(0.)**1 array(0.0) >>> n2.array(0.)**1. array(0.0) >>> n2ma.array(0.)**1 array(0.0) >>> n2ma.array(0.)**1. array(data = 1e+20, mask = True, fill_value=1e+20) I've been using python v2.3.5 & v.2.4.3, numarray v1.5.1, and numpy v0.9.8, and tested this on an x86 Debian box and a PPC OSX box. It may be the case that this issue has manifested in the past several months, as it's causing a new problem with some of my older code. Any thoughts? Thanks in advance, Mike |
From: Bill B. <wb...@gm...> - 2006-06-22 03:51:15
|
On 6/22/06, Alan G Isaac <ai...@am...> wrote: > > > Alan G Isaac wrote: > >> M.transpose()[V>0] > >> If you want the columns as columns, > >> you can transpose again. > > > On Wed, 21 Jun 2006, Keith Goodman apparently wrote: > > I can't get that to work when M is a n by m matrix: > > The problem is not M being a matrix. > You made V a matrix (i.e., 2d). > So you need to ravel() it first. > >> M.transpose()[V.ravel()>0] No dice, V.ravel() returns a matrix still. Looks like you'll need M.T[V.A.ravel()>0].T Just lovely. Is the new bool conversion thingy going to help make the syntax more reasonable for matrices, too? Seems like it will still require M[:,V.A.ravel() > 0] or M[:, V.A.squeeze() > 0] or M[:,V.A[:,0]>0] Anyway, this seems to me just more evidence that one is better off getting used to the 'array' way of doing things rather than clinging to Matlab ways by using 'matrix'. Is it worth dealing with the extra A's and asmatrix()'s and squeeze()'s that seem to crop up just to be able to write A*B instead of dot(A,B) (*)? --Bill (*) Ok, there's also the bit about being able to tell column vectors from row vectors and getting useful errors when you try to use a row that should have been a column. And then there's also the .T, .I, .H convenience factor. |
From: Simon B. <si...@ar...> - 2006-06-22 02:20:28
|
On Wed, 21 Jun 2006 10:50:26 -0600 Travis Oliphant <oli...@ie...> wrote: > > So, in SVN NumPy, you will be able to do > > a[:,V>0] > a[V>0,:] > > The V>0 will be replaced with integer arrays as if nonzero(V>0) had been > called. OK. But just for the record, we should note how to do the operation that this used to do, eg. >>> a=numpy.array([1,2]) >>> a[[numpy.bool_(1)]] array([2]) >>> This could be a way of, say, maping a large boolean array onto some other values (1 or 2 in the above case). So, with the new implementation, is it possible to cast the bool array to an integer type without incurring a copy overhead ? And finally, is someone keeping track of the performance of array getitem ? It seems that as travis overloads it more and more it might then slow down in some cases. I must admit my vision is blurring and head is spining as numpy goes through these growing pains. I hope it's over soon. Not because I have trouble keeping up (although i do) but it's my matlab/R/numarray entrenched co-workers who cannot be exposed to this unstable development (they will run screaming to the woods). cheers, Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com |
From: Michael S. <mic...@gm...> - 2006-06-22 02:02:01
|
I was setting the fill_value as 'NA' when constructing the array so the masked values would be printed as 'NA'. It is not a big deal to avoid doing this. Nevertheless, the differences between a masked array with a boolean mask and a mask of booleans have caused me trouble before. Especially when there are hidden in-place conversions of a mask which is a array of False to a mask which is False. e.g. import numpy print numpy.version.version ma1 = numpy.ma.array(((1.,2,3),(4,5,6)), mask=((0,0,0),(0,0,0))) print ma1.mask a1 = numpy.asarray(ma1) print ma1.mask ---------------------- 0.9.9.2538 [[False False False] [False False False]] False On 6/21/06, Pierre GM <pgm...@ma...> wrote: > On Wednesday 21 June 2006 04:46, Michael Sorich wrote: > > When transposing a masked array of dtype '<f8' I noticed that an > > ndarray of dtype '|O4' was returned. > > > OK, I see where the problem is: > When your fill_value has a type that cannot be converted to the type of your > data, the `filled` method (used internally in many functions, such as > `transpose`) raises a TypeError, which is caught and your array is converted > to 'O'. > > That's what happen here: your fill_value is a string, your data are integer, > the types don't match, hence the conversion. So, no, I don't think that's a > bug. > > Why filling when you don't have any masked values, then ? Well, there's a > subtle difference between a boolean mask and a mask of booleans. > When the mask is boolean (mask=nomask=False), there's no masked value, and > `filled` returns the data. > Now, when your mask is an array of boolean (your first case), MA doesn't check > whether mask.any()==False to determine whether there are some missing data or > not, it just processes the whole array of boolean. > > I agree that's a bit confusing here, and there might be some room for > improvement (for example, changing the current > `if m is nomask` to `if m is nomask or m.any()==False`, or better, forcing > mask to nomask if mask.any()==False). But I don;t think that qualifies as > bug. > > In short: > when you have an array of numbers, don't try to fill it with characters. > |
From: Alan G I. <ai...@am...> - 2006-06-22 02:01:17
|
I do not understand how to think about this: >>> x=arange(3).flat >>> x <numpy.flatiter object at 0x01BD0C58> >>> x>2 True >>> x>10 True Why? (I realize this behaves like xrange, so this may not be a numpy question, but I do not understand that behavior either.) What I expected: that a flatiter object would iterate through its values and return either - a flatiter of the resulting comparisons, or - an array of the resulting comparisons Thank you, Alan Isaac |
From: Alan G I. <ai...@am...> - 2006-06-22 02:01:17
|
> Alan G Isaac wrote: >> M.transpose()[V>0] >> If you want the columns as columns, >> you can transpose again. On Wed, 21 Jun 2006, Keith Goodman apparently wrote: > I can't get that to work when M is a n by m matrix: The problem is not M being a matrix. You made V a matrix (i.e., 2d). So you need to ravel() it first. >> M.transpose()[V.ravel()>0] hth, Alan Isaac |
From: Bill B. <wb...@gm...> - 2006-06-21 22:40:49
|
Actually I think using mat() (just an alias for the matrix constructor) is a bad way to do it. That mat() (and most others on that page) should probably be replaced with asmatrix() to avoid the copy. --bb On 6/22/06, Keith Goodman <kwg...@gm...> wrote: > > On 6/21/06, Robert Kern <rob...@gm...> wrote: > > > Keith Goodman wrote: > > > The NumPy for Matlab Users page suggests mat(a.A * b.A) for > > > element-by-element matrix multiplication. I think it would be helpful > > > to also include multiply(a, b). > > > > > > a.*b > > > > > > mat(a.A * b.A) or > > > multiply(a, b) > > > > It is a wiki page. You may edit it yourself without needing to ask > permission. > > OK. Done. I also added a notice about SciPy's PayPal account being > suspended. > > All the advantages of Linux Managed Hosting--Without the Cost and Risk! > Fully trained technicians. The highest number of Red Hat certifications in > the hosting industry. Fanatical Support. Click to learn more > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > -- William V. Baxter III OLM Digital Kono Dens Building Rm 302 1-8-8 Wakabayashi Setagaya-ku Tokyo, Japan 154-0023 +81 (3) 3422-3380 |
From: Emelia L. <eme...@ho...> - 2006-06-21 21:02:10
|
Hi =20 =20 Save over 50% on your medications with our online STORE <http://fonakilastoe.com>=20 =20 =20 _____ =20 the river-bank bent and sighed. I dont know what river it was, a rushing red one, swollen with the rains of the last few days, that came down from the hills and mountains in front of them. Soon it was nearly dark. The winds broke up the grey clouds, and a waning moon appeared above the hills between the flying rags. Then they stopped, and Thorin muttered something about supper, and where shall we get a dry patch to |
From: Tim H. <tim...@co...> - 2006-06-21 19:02:49
|
Numexpr can now handle broadcasting. As an example, check out this implementation of the distance-in-a-bunch-of-dimenstions function that's been going around. This is 80% faster than the most recent one posted on my box and considerably easier to read. expr = numexpr("(a - b)**2", [('a', float), ('b', float)]) def dist_numexpr(A, B): return sqrt(sum(expr(A[:,newaxis], B[newaxis,:]), axis=2)) Now, if we just could do 'sum' inside the numexpr, I bet that this would really scream. This is something that David has talked about adding at various points. I just made his life a bit harder by supporting broadcasting, but I still don't think it would be all that hard to add reduction operations like sum and product as long as they were done at the outermost level of the expression. That is, "sum(x*2 + 5)" should be doable, but "5 + sum(x**2)" would likely be difficult. Anyway, I thought that was cool, so I figured I'd share ;-) [Bizzarely, numexpr seems to run faster on my box when compiled with "-O1" than when compiled with "-O2" or "-O2 -funroll-all-loops". Go figure.] -tim |
From: Travis O. <oli...@ie...> - 2006-06-21 18:22:56
|
saa...@sf... wrote: > Hi Travis > > Not sure if you've had a chance to look at the previous code I sent or not, > but I was able to reduce the code (see below) to its smallest size and still > have the problem, albeit at a slower rate. The problem appears to come from > changing values in the array. Does this create another reference to the > array, which can't be released? If this problem does not have a work-around > or "fix", please let me know. > This is now fixed in SVN. -Travis |
From: Keith G. <kwg...@gm...> - 2006-06-21 17:45:55
|
On 6/21/06, Robert Kern <rob...@gm...> wrote: > Keith Goodman wrote: > > The NumPy for Matlab Users page suggests mat(a.A * b.A) for > > element-by-element matrix multiplication. I think it would be helpful > > to also include multiply(a, b). > > > > a.*b > > > > mat(a.A * b.A) or > > multiply(a, b) > > It is a wiki page. You may edit it yourself without needing to ask permission. OK. Done. I also added a notice about SciPy's PayPal account being suspended. |
From: Pau G. <pau...@gm...> - 2006-06-21 17:31:50
|
On 6/21/06, Travis Oliphant <oli...@ie...> wrote: > Pau Gargallo wrote: > > On 6/21/06, Travis Oliphant <oli...@ie...> wrote: > > > >> Johannes Loehnert wrote: > >> > >>> Hi, > >>> > >>> > >>> > >>>> I'm not sure why bool arrays cannot be used as indices. > >>>> The "natural" solution to the original problem seemed to be: > >>>> M[:,V>0] > >>>> but this is not allowed. > >>>> > >>>> > >>> I started a thread on this earlier this year. Try searching the archive for > >>> "boolean indexing" (if it comes back online somewhen). > >>> > >>> Travis had some reason for not implementing this, but unfortunately I do not > >>> remember what it was. The corresponding message might still linger on my home > >>> > >>> PC, which I can access this evening.... > >>> > >>> > >> I suspect my reason was just not being sure if it could be explained > >> consistently. But, after seeing this come up again. I decided it was > >> easy enough to implement. > >> > >> So, in SVN NumPy, you will be able to do > >> > >> a[:,V>0] > >> a[V>0,:] > >> > >> The V>0 will be replaced with integer arrays as if nonzero(V>0) had been > >> called. > >> > >> > > > > does it work for a[<boolean>,<boolean>] ? > > > Sure, it will work. Basically all boolean arrays will be interpreted as > nonzero(V>0), everywhere. > > what about a[ix_( nonzero(<boolean>), nonzero(<boolean>) )] ? > > > > maybe the <boolean> to nonzero(<boolean>) conversion would be more > > coherently done by the ix_ function than by the [] > > > > > I've just added support for <boolean> inside ix_ so that the nonzero > will be done automatically as well. > > So > > a[ix_(<boolean>,<boolean>)] will give the cross-product selection. > ok so: a[ b1, b2 ] will be different than a[ ix_(b1,b2) ] just like with integer indices. Make sense to me. also, a[b] will be as before (a[where(b)]) ? maybe a trailing coma could lunch the new behaviour? a[b] -> a[where(b)] a[b,] -> a[b,...] -> a[nonzero(b)] Thanks, pau |
From: Webb S. <web...@gm...> - 2006-06-21 17:29:35
|
I am trying to install numpy on Gentoo (see my info below for version etc). It all seems to go fine, but when I try to import it and run the tests, I get the following error (in ipython): In [1]: import numpy import linalg -> failed: libg2c.so.0: cannot open shared object file: No such file or directory I have gfortran on my system, but libg2c is not part of the gcc-4.1.1 distribution anymore (maybe that is a bug with Gentoo?). I also get the same error when I run f2py from the command line. Here is the bug I filed: http://bugs.gentoo.org/show_bug.cgi?id=136988 Info that might help: cowboy ~ # ls /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/ crtbegin.o libgcc.a libgfortran.so.1 libobjc.so.1.0.0 crtbeginS.o libgcc_eh.a libgfortran.so.1.0.0 libstdc++.a crtbeginT.o libgcc_s.so libgfortranbegin.a libstdc++.so crtend.o libgcc_s.so.1 libgfortranbegin.la libstdc++.so.6 crtendS.o libgcov.a libobjc.a libstdc++.so.6.0.8 crtfastmath.o libgfortran.a libobjc.la libstdc++_pic.a include libgfortran.la libobjc.so libsupc++.a install-tools libgfortran.so libobjc.so.1 libsupc++.la cowboy ~ # ls /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/ SYSCALLS.c.X libffi.la libobjc.la crtbegin.o libffi.so libobjc.so crtbeginS.o libfrtbegin.a libobjc.so.1 crtbeginT.o libg2c.a libobjc.so.1.0.0 crtend.o libg2c.la libstdc++.a crtendS.o libg2c.so libstdc++.la hardened.specs libg2c.so.0 libstdc++.so hardenednopie.specs libg2c.so.0.0.0 libstdc++.so.6 hardenednopiessp.specs libgcc.a libstdc++.so.6.0.3 hardenednossp.specs libgcc_eh.a libstdc++_pic.a include libgcc_s.so libsupc++.a install-tools libgcc_s.so.1 libsupc++.la libffi-2.00-beta.so libgcov.a specs libffi.a libobjc.a vanilla.specs cowboy ~ # emerge --info Portage 2.1.1_pre1-r1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.11-gentoo-r9 i686) ================================================================= System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.12.1 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r2 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 2.0.0_rc1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS=" -march=athlon -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS=" -march=athlon -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts blas cli crypt cups dba dri eds emacs emboss encode esd f77 fftw foomaticdb fortran g77 gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg lapack libg++ libwww mad mikmod mime mmap motif mp3 mpeg ncurses nls nptl nptlonly objc ogg opengl oss pam pcre pdflib perl png postgres pppd python quicktime readline reflection sdl session spell spl ssl svg tcltk tcpd tidy truetype truetype-fonts type1-fonts udev unicode vorbis xml xmms xorg xv zlib elibc_glibc kernel_linux userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS cowboy ~ # gcc --version i686-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
From: Travis O. <oli...@ie...> - 2006-06-21 17:27:21
|
Pau Gargallo wrote: > On 6/21/06, Travis Oliphant <oli...@ie...> wrote: > >> Johannes Loehnert wrote: >> >>> Hi, >>> >>> >>> >>>> I'm not sure why bool arrays cannot be used as indices. >>>> The "natural" solution to the original problem seemed to be: >>>> M[:,V>0] >>>> but this is not allowed. >>>> >>>> >>> I started a thread on this earlier this year. Try searching the archive for >>> "boolean indexing" (if it comes back online somewhen). >>> >>> Travis had some reason for not implementing this, but unfortunately I do not >>> remember what it was. The corresponding message might still linger on my home >>> >>> PC, which I can access this evening.... >>> >>> >> I suspect my reason was just not being sure if it could be explained >> consistently. But, after seeing this come up again. I decided it was >> easy enough to implement. >> >> So, in SVN NumPy, you will be able to do >> >> a[:,V>0] >> a[V>0,:] >> >> The V>0 will be replaced with integer arrays as if nonzero(V>0) had been >> called. >> >> > > does it work for a[<boolean>,<boolean>] ? > Sure, it will work. Basically all boolean arrays will be interpreted as nonzero(V>0), everywhere. > what about a[ix_( nonzero(<boolean>), nonzero(<boolean>) )] ? > > maybe the <boolean> to nonzero(<boolean>) conversion would be more > coherently done by the ix_ function than by the [] > > I've just added support for <boolean> inside ix_ so that the nonzero will be done automatically as well. So a[ix_(<boolean>,<boolean>)] will give the cross-product selection. -Travis |
From: Robert K. <rob...@gm...> - 2006-06-21 17:22:21
|
Keith Goodman wrote: > The NumPy for Matlab Users page suggests mat(a.A * b.A) for > element-by-element matrix multiplication. I think it would be helpful > to also include multiply(a, b). > > a.*b > > mat(a.A * b.A) or > multiply(a, b) It is a wiki page. You may edit it yourself without needing to ask permission. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Keith G. <kwg...@gm...> - 2006-06-21 17:16:48
|
The NumPy for Matlab Users page suggests mat(a.A * b.A) for element-by-element matrix multiplication. I think it would be helpful to also include multiply(a, b). a.*b mat(a.A * b.A) or multiply(a, b) |