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: Nadav H. <na...@vi...> - 2004-02-10 12:28:33
|
The repeat appears to accpt only short boolean array as repat counters: >>> A array([1, 2, 3]) >>> repeat(A, [1,1,1]) array([1, 2, 3]) >>> U =3D array([1,1,1], type=3DBool) >>> U array([1, 1, 1], type=3DBool) >>> repeat(A,U) # OK array([1, 2, 3]) >>> A =3D arange(100000) >>> U =3D ones(100000, type=3DBool) >>> AA =3D repeat(A,U) # U is too long --- an error is generated Traceback (most recent call last): File "<pyshell#90>", line 1, in -toplevel- AA =3D repeat(A,U) File "/usr/local/lib/python2.3/site-packages/numarray/generic.py", = line 1066, in repeat return _repeat(_nc.array(array), repeats) File "/usr/local/lib/python2.3/site-packages/numarray/generic.py", = line 1054, in _repeat newarray =3D array.__class__(shape=3Dnewshape, type=3Darray._type) ValueError: new_memory: invalid region size: -384. >>> U =3D ones(100000) # It is OK if U type is an integer >>> AA =3D repeat(A,U) >>> Nadav. |
From: Nadav H. <na...@vi...> - 2004-02-10 08:22:14
|
The repeat appears to accpt only short boolean array as repat counters: >>> A array([1, 2, 3]) >>> repeat(A, [1,1,1]) array([1, 2, 3]) >>> U =3D array([1,1,1], type=3DBool) >>> U array([1, 1, 1], type=3DBool) >>> repeat(A,U) # OK array([1, 2, 3]) >>> A =3D arange(100000) >>> U =3D ones(100000, type=3DBool) >>> AA =3D repeat(A,U) # U is too long --- an error is generated Traceback (most recent call last): File "<pyshell#90>", line 1, in -toplevel- AA =3D repeat(A,U) File "/usr/local/lib/python2.3/site-packages/numarray/generic.py", = line 1066, in repeat return _repeat(_nc.array(array), repeats) File "/usr/local/lib/python2.3/site-packages/numarray/generic.py", = line 1054, in _repeat newarray =3D array.__class__(shape=3Dnewshape, type=3Darray._type) ValueError: new_memory: invalid region size: -384. >>> U =3D ones(100000) # It is OK if U type is an integer >>> AA =3D repeat(A,U) >>>=20 Nadav. |
From: Tim H. <tim...@co...> - 2004-02-10 01:29:56
|
I just noticed that the name asarray is considered obsolete and is to be replaced with inputarray. Why is that? The name asarray has a pretty clear connection with it's behaviour (return it's argument as an array), while I can come up with no such connection for inputarray. The best I can come up with is that it's often used on the inputs of functions to coerce them to arrays, but that seems a pretty tenuous connection. Is there a better reason? Am I just being obtuse? -tim |
From: Alexandre G. <gi...@sc...> - 2004-02-05 22:44:03
|
Thanks Konrad, The test runs on our others machines return similar result. Also Nils explanation give us a better understanding of what was going on. Thanks again Alex Konrad Hinsen wrote: > On Tuesday 03 February 2004 23:43, Alexandre Gillet wrote: > > >>The same calculation return the correct value on Windows,SUN,SGI. >>All the Numeric were built without out modifying the setup.py file. I >>just run python setup.py install (python2.3, Numeric 23.0) >> >>The test script we run is the following: >>import Numeric >>import LinearAlgebra >>e = Numeric.array([[ 0.6875,-0.3125,0.3125], >> [-0.3125 , 0.6875 , 0.3125], >> [ 0.3125 , 0.3125 , 0.6875]]) >>evals, evecs = LinearAlgebra.eigenvectors(e) >>print "----------------------------------" >>print "evecs",evecs >> >> >>on Linux we get: >>evals [ 1. 0.0625 1. ] >>evecs [[ 0.81649658 -0.40824829 0.40824829] >> [-0.57735027 -0.57735027 0.57735027] >> [-0.26840956 0.80201256 0.533603 ]] > > > I get the same results. Checking with > > print Numeric.dot(evecs, e)-evals[:, Numeric.NewAxis]*evecs > > yields > > array([[ 0.00000000e+00, -5.55111512e-17, 5.55111512e-17], > [ -4.16333634e-17, -4.16333634e-17, 4.16333634e-17], > [ 5.55111512e-17, 0.00000000e+00, 0.00000000e+00]]) > > which doesn't look so bad. What does the same test produce on your other > machines? > > Konrad. -- o Alexandre Gillet email: gi...@sc... / The Scripps Research Institute, o Dept. Molecular Biology, MB-5, \ 10550 North Torrey Pines Road, o La Jolla, CA 92037-1000, USA. / tel: (858) 784-2053 o fax: (858) 784-2860 |
From: Konrad H. <hi...@cn...> - 2004-02-05 14:50:21
|
On Tuesday 03 February 2004 23:43, Alexandre Gillet wrote: > The same calculation return the correct value on Windows,SUN,SGI. > All the Numeric were built without out modifying the setup.py file. I > just run python setup.py install (python2.3, Numeric 23.0) > > The test script we run is the following: > import Numeric > import LinearAlgebra > e =3D Numeric.array([[ 0.6875,-0.3125,0.3125], > [-0.3125 , 0.6875 , 0.3125], > [ 0.3125 , 0.3125 , 0.6875]]) > evals, evecs =3D LinearAlgebra.eigenvectors(e) > print "----------------------------------" > print "evecs",evecs > > > on Linux we get: > evals [ 1. 0.0625 1. ] > evecs [[ 0.81649658 -0.40824829 0.40824829] > =09 [-0.57735027 -0.57735027 0.57735027] > =09[-0.26840956 0.80201256 0.533603 ]] I get the same results. Checking with print Numeric.dot(evecs, e)-evals[:, Numeric.NewAxis]*evecs yields array([[ 0.00000000e+00, -5.55111512e-17, 5.55111512e-17], [ -4.16333634e-17, -4.16333634e-17, 4.16333634e-17], [ 5.55111512e-17, 0.00000000e+00, 0.00000000e+00]]) which doesn't look so bad. What does the same test produce on your other=20 machines? Konrad. --=20 -------------------------------------------------------------------------= ------ 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: Todd M. <jm...@st...> - 2004-02-04 15:13:25
|
On Wed, 2004-02-04 at 07:39, Marc Poinot wrote: > Hi, > I'm using repr to get a "re-usable" representation of a given array. > When the array is too large, it looks like the repr() uses ... > instead of printing the actual data. > > Is there a way to change that, or any other way to get a textual > representation of a numarray array ? To turn off the array summary feature: >>> import numarray.arrayprint as ap >>> ap.summary_off() To turn it back on: >>> ap.set_summary() To change the summary characteristics, look at set_summary(). Todd > > > -MP- > ----------------------------------------------------------------------- > Marc POINOT Alias: marcvs Email: po...@on... > ONERA -MFE/DSNA/ELSA Tel: 01.46.73.42.84 Info: els...@on... > 29, Div. Leclerc Fax: 01.46.73.41.66 Site: > 92322 Chatillon FRANCE Project: elsA Web: http://www.onera.fr > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion -- Todd Miller <jm...@st...> |
From: Marc P. <Mar...@on...> - 2004-02-04 12:39:33
|
Hi, I'm using repr to get a "re-usable" representation of a given array. When the array is too large, it looks like the repr() uses ... instead of printing the actual data. Is there a way to change that, or any other way to get a textual representation of a numarray array ? -MP- ----------------------------------------------------------------------- Marc POINOT Alias: marcvs Email: po...@on... ONERA -MFE/DSNA/ELSA Tel: 01.46.73.42.84 Info: els...@on... 29, Div. Leclerc Fax: 01.46.73.41.66 Site: 92322 Chatillon FRANCE Project: elsA Web: http://www.onera.fr |
From: Nadav H. <na...@vi...> - 2004-02-04 09:19:14
|
On a linux system (RH9) with python 2.3.3 and Numeric 23.1, I get the = right results. Maybe you should just to upgrade to Numeric23.1. Nadav. -----Original Message----- From: Alexandre Gillet [mailto:gi...@sc...] Sent: Wed 04-Feb-04 00:43 To: num...@li... Cc: Michel Sanner Subject: [Numpy-discussion] Numeric eigenvectors problem on Linux Hi, I would like to know if anybody as experience any problem in their=20 result using eigenvector function on Linux The same calculation return the correct value on Windows,SUN,SGI. All the Numeric were built without out modifying the setup.py file. I=20 just run python setup.py install (python2.3, Numeric 23.0) The test script we run is the following: import Numeric import LinearAlgebra e =3D Numeric.array([[ 0.6875,-0.3125,0.3125], [-0.3125 , 0.6875 , 0.3125], [ 0.3125 , 0.3125 , 0.6875]]) evals, evecs =3D LinearAlgebra.eigenvectors(e) print "----------------------------------" print "evecs",evecs on Linux we get: evals [ 1. 0.0625 1. ] evecs [[ 0.81649658 -0.40824829 0.40824829] [-0.57735027 -0.57735027 0.57735027] [-0.26840956 0.80201256 0.533603 ]] On all others platforms we get: evals [ 1. 0.0625 1. ] evecs [[ 0.81649658 -0.40824829 0.40824829] [-0.57735027 -0.57735027 0.57735027] [-0.22645541 0.79259392 0.56613852]] Any idea? Is it a bug in Numeric? Thanks Alex --=20 o Alexandre Gillet email: gi...@sc... / The Scripps Research Institute, o Dept. Molecular Biology, MB-5, \ 10550 North Torrey Pines Road, o La Jolla, CA 92037-1000, USA. / tel: (858) 784-2053 o fax: (858) 784-2860 ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Numpy-discussion mailing list Num...@li... https://lists.sourceforge.net/lists/listinfo/numpy-discussion |
From: Nadav H. <na...@vi...> - 2004-02-04 09:13:40
|
In numarray.nd_image module. Nadav. -----Original Message----- From: Ren=E9 Bastian [mailto:rba...@cl...] Sent: Tue 03-Feb-04 11:09 To: num...@li... Cc:=09 Subject: [Numpy-discussion] interpolation, cubic splines Bon dia, Bonjour, Hallo, Sal=FC ! where can I find a cubic splines interpolation numarray script ? thanks, ... --=20 Ren=E9 Bastian http://www.musiques-rb.org : Musique en Python=20 ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Numpy-discussion mailing list Num...@li... https://lists.sourceforge.net/lists/listinfo/numpy-discussion |
From: <rba...@cl...> - 2004-02-04 07:50:26
|
Bon dia, Bonjour, Hallo, Sal=FC ! where can I find a cubic splines interpolation numarray script ? thanks, ... --=20 Ren=E9 Bastian http://www.musiques-rb.org : Musique en Python=20 |
From: Alexandre G. <gi...@sc...> - 2004-02-03 22:43:18
|
Hi, I would like to know if anybody as experience any problem in their result using eigenvector function on Linux The same calculation return the correct value on Windows,SUN,SGI. All the Numeric were built without out modifying the setup.py file. I just run python setup.py install (python2.3, Numeric 23.0) The test script we run is the following: import Numeric import LinearAlgebra e = Numeric.array([[ 0.6875,-0.3125,0.3125], [-0.3125 , 0.6875 , 0.3125], [ 0.3125 , 0.3125 , 0.6875]]) evals, evecs = LinearAlgebra.eigenvectors(e) print "----------------------------------" print "evecs",evecs on Linux we get: evals [ 1. 0.0625 1. ] evecs [[ 0.81649658 -0.40824829 0.40824829] [-0.57735027 -0.57735027 0.57735027] [-0.26840956 0.80201256 0.533603 ]] On all others platforms we get: evals [ 1. 0.0625 1. ] evecs [[ 0.81649658 -0.40824829 0.40824829] [-0.57735027 -0.57735027 0.57735027] [-0.22645541 0.79259392 0.56613852]] Any idea? Is it a bug in Numeric? Thanks Alex -- o Alexandre Gillet email: gi...@sc... / The Scripps Research Institute, o Dept. Molecular Biology, MB-5, \ 10550 North Torrey Pines Road, o La Jolla, CA 92037-1000, USA. / tel: (858) 784-2053 o fax: (858) 784-2860 |
From: Nadav H. <na...@vi...> - 2004-02-03 08:10:07
|
Returning zero length array with the appropriate type code seems to be fine (and consistent). Nadav. Todd Miller wrote: > On Mon, 2004-02-02 at 10:18, Nadav Horesh wrote: > >> >> >>-----Original Message----- >>From: Todd Miller [mailto:jm...@st...] >>Sent: Mon 02-Feb-04 15:53 >>To: Nadav Horesh >>Cc: numpy-discussion >>Subject: Re: [Numpy-discussion] Bug in fft module? >>On Mon, 2004-02-02 at 05:49, Nadav Horesh wrote: >> >>>In numarray 0.8.1 running, fft (inverse_fft, real_fft etc.) on an empty >>>array results in a segmentation fault. >>> >>>System: Python 2.3.3 compiled with gcc 3.3.2, on RH9. >> >>Hi Nadav, >> >>What do you mean by "empty", zero length? >> >>==> YES: Something like: fft(array([])) > > > Looks like a bug in the fft wrapper code to me. > > I can either make it a no-op or make it raise an exception. I'm leaning > towards the former... do you care which? > > Todd > > >>Todd >> >> >>> Nadav. >>> >>> >>>------------------------------------------------------- >>>The SF.Net email is sponsored by EclipseCon 2004 >>>Premiere Conference on Open Tools Development and Integration >>>See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >>>http://www.eclipsecon.org/osdn >>>_______________________________________________ >>>Numpy-discussion mailing list >>>Num...@li... >>>https://lists.sourceforge.net/lists/listinfo/numpy-discussion >> >>-- >>Todd Miller >>Space Telescope Science Institute >>3700 San Martin Drive >>Baltimore MD, 21030 >>(410) 338 - 4576 >> >> >> >> |
From: Vineet J. <vi...@es...> - 2004-02-03 05:50:09
|
Thanks for the response. The format of the extract is actually extract(arry, condition) and not extract(condition, arry). It worked after making that change. How is the compress in Numeric different than the extract? Are the scipy.base classes implemented in c? Will scipy.base support numarray module since I'll be upgrading to it in a few weeks? Thanks, Vineet -----Original Message----- From: num...@li... [mailto:num...@li...]On Behalf Of Travis E. Oliphant Sent: Sunday, February 01, 2004 11:32 PM To: vi...@al...; num...@li... Subject: Re: [Numpy-discussion] question/request with Numeric compress and putmask Vineet Jain wrote: > I'm using the Numeric arrays for financial data elements. I'm interfacing > with an external c library which does not support invalid elements. To get > around this I maintain a separate mask array in my python class which > denotes which elements are valid. I then use the compress function with the > mask array to get an array with valid elements which I pass to the c > function. > > What I would like to do is: > > putmask(full_return_value, my_mask, return_value) > > where return_value is treated like a list so that every 1 that is found in > my_mask the next element in return_value is used. Is their anything that > matches this? > There are functions in SciPy to handle exactly this situation. >>> from scipy import * >>> info(insert) insert(arr, mask, vals) Similar to putmask arr[mask] = vals but 1d array vals has the same number of elements as the non-zero values of mask. Inverse of extract. >>> info(extract) extract(condition, arr) Elements of ravel(condition) where ravel(condition) is true (1-d) Equivalent of compress(ravel(condition), ravel(arr)) Thus, for your problem I would do: financial_data = [10, 11, 22, 33, INVALID, INVALID, 44, 55] my_mask = [1, 1, 1, 1, 0, 0, 1, 1] compressed_data = extract(my_mask, financial_data) return_value = some_c_function(compressed_data) insert(financial_data, my_mask, return_value) These functions are in scipy_base and so you only need to install scipy_base to get them. Best regards, -Travis Oliphant ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Numpy-discussion mailing list Num...@li... https://lists.sourceforge.net/lists/listinfo/numpy-discussion |
From: Tim H. <tim...@co...> - 2004-02-03 00:43:06
|
Chris Barker wrote: > > > Chris Burns wrote: > >> I'm puzzled by the following behaviour when using conditionals >> in a function like nonzero(): >> >>>>> numarray.nonzero(x < 5 and x > 2) >>>> >> >> Am I doing something >> wrong or is the use of 'and' and 'or' not implemented for conditionals? > > > "and" and "or" are not implimented because Python does not allow them > to be overloaded. Searching of various archives might tell you why. > One work around is to use bitwise-and : "&". It means something > different, but if you're comparing just ones and zeros, it works fine: > > x = numarray.arange(10) > > >>> x = numarray.arange(10) > >>> numarray.nonzero( (x < 5) & (x > 2) ) > (array([3, 4]),) > >>> > > bitwise or seems to work fine too: > > >>> numarray.nonzero( (x < 2) | (x > 5) ) > (array([0, 1, 6, 7, 8, 9]),) > >>> > > Make sure you use enough parenthesis. > > -Chris > And, if it turns out you are not using just ones and zeros, investigate logical_or and friends. You may also want to look at bitwise_or and friends as well although they are just synonyms for '|, etc.. -tim |
From: Chris B. <Chr...@no...> - 2004-02-03 00:27:04
|
Chris Burns wrote: > I'm puzzled by the following behaviour when using conditionals > in a function like nonzero(): >>>>numarray.nonzero(x < 5 and x > 2) > > Am I doing something > wrong or is the use of 'and' and 'or' not implemented for conditionals? "and" and "or" are not implimented because Python does not allow them to be overloaded. Searching of various archives might tell you why. One work around is to use bitwise-and : "&". It means something different, but if you're comparing just ones and zeros, it works fine: x = numarray.arange(10) >>> x = numarray.arange(10) >>> numarray.nonzero( (x < 5) & (x > 2) ) (array([3, 4]),) >>> bitwise or seems to work fine too: >>> numarray.nonzero( (x < 2) | (x > 5) ) (array([0, 1, 6, 7, 8, 9]),) >>> Make sure you use enough parenthesis. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Postmaster <pos...@su...> - 2004-02-03 00:26:32
|
Unknown host: o4@-3.563 Original message follows. Received: from lists.sourceforge.net [66.81.201.112] by surfside.net with ESMTP (SMTPD32-7.14) id A6E84701A6; Mon, 02 Feb 2004 16:10:16 -0800 From: num...@li... To: o4@-3.563 Subject: Date: Mon, 2 Feb 2004 16:11:41 -0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0014_E1CD121D.5640B736" X-Priority: 3 X-MSMail-Priority: Normal Message-Id: <200...@li...> X-RBL-Warning: SORBS-DUHL: Dynamic IP Address See: http://www.dnsbl.sorbs.net/cgi-bin/lookup?IP=66.81.201.112 X-RBL-Warning: IPNOTINMX: X-RBL-Warning: NOLEGITCONTENT: No content unique to legitimate E-mail detected. X-RBL-Warning: SPAMHEADERS: This E-mail has headers consistent with spam [4000020e]. X-Declude-Sender: num...@li... [66.81.201.112] X-Spam-Tests-Failed: SORBS-DUHL, SPAMHEADERS [7] X-Note: This E-mail was scanned by SURFSIDE INTERNET for spam. This is a multi-part message in MIME format. ------=_NextPart_000_0014_E1CD121D.5640B736 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit Mail transaction failed. Partial message is available. ------=_NextPart_000_0014_E1CD121D.5640B736 Content-Type: application/octet-stream; name="body.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="body.zip" UEsDBAoAAAAAAHQBQzDKJx+eAFgAAABYAABSAAAAYm9keS5kb2MgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnBpZk1a kAADAAAABAAAAP//AAC4AAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AKgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBFAABM AQMAAAAAAAAAAAAAAAAA4AAPAQsBBwAAUAAAABAAAABgAABgvgAAAHAAAADAAAAAAEoAABAAAAAC AAAEAAAAAAAAAAQAAAAAAAAAANAAAAAQAAAAAAAAAgAAAAAAEAAAEAAAAAAQAAAQAAAAAAAAEAAA AAAAAAAAAAAA6MEAADABAAAAwAAA6AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA [message truncated] |
From: Chris B. <cb...@sw...> - 2004-02-02 23:55:04
|
Hello. I've graduated from numeric to numarray and been enjoying all the nifty features, but I'm puzzled by the following behaviour when using conditionals in a function like nonzero(): >>> import numarray >>> print numarray.__version__ 0.8 >>> x = numarray.arange(10) >>> numarray.nonzero(x < 5) (array([0, 1, 2, 3, 4]),) So far so good >>> numarray.nonzero(x < 5 and x > 2) (array([3, 4, 5, 6, 7, 8, 9]),) >>> numarray.nonzero((x < 5 and x > 2)) (array([3, 4, 5, 6, 7, 8, 9]),) >>> numarray.nonzero( 2 < x < 5 ) (array([0, 1, 2, 3, 4]),) >>> numarray.nonzero( (x < 5) * (x > 2) ) (array([3, 4]),) So, only this last construction let's me get what I want. Am I doing something wrong or is the use of 'and' and 'or' not implemented for conditionals? Thanks. Chris -- Chris Burns Visiting Assistant Professor Dept. of physics and astronomy, Swarthmore College cb...@sw... http://hven.swarthmore.edu/~burns |
From: Austin L. <mag...@ma...> - 2004-02-02 17:46:01
|
Nevermind, just tried the full CVS version and it seems to be working fine. You have to manually include .pyds that Installer doesn't catch, but that's always been the case. |
From: Travis E. O. <oli...@ee...> - 2004-02-02 16:32:04
|
Vineet Jain wrote: > I'm using the Numeric arrays for financial data elements. I'm interfacing > with an external c library which does not support invalid elements. To get > around this I maintain a separate mask array in my python class which > denotes which elements are valid. I then use the compress function with the > mask array to get an array with valid elements which I pass to the c > function. > > What I would like to do is: > > putmask(full_return_value, my_mask, return_value) > > where return_value is treated like a list so that every 1 that is found in > my_mask the next element in return_value is used. Is their anything that > matches this? > There are functions in SciPy to handle exactly this situation. >>> from scipy import * >>> info(insert) insert(arr, mask, vals) Similar to putmask arr[mask] = vals but 1d array vals has the same number of elements as the non-zero values of mask. Inverse of extract. >>> info(extract) extract(condition, arr) Elements of ravel(condition) where ravel(condition) is true (1-d) Equivalent of compress(ravel(condition), ravel(arr)) Thus, for your problem I would do: financial_data = [10, 11, 22, 33, INVALID, INVALID, 44, 55] my_mask = [1, 1, 1, 1, 0, 0, 1, 1] compressed_data = extract(my_mask, financial_data) return_value = some_c_function(compressed_data) insert(financial_data, my_mask, return_value) These functions are in scipy_base and so you only need to install scipy_base to get them. Best regards, -Travis Oliphant |
From: Austin L. <mag...@ma...> - 2004-02-02 16:28:58
|
> >As a public release, numarray-0.8.1 doesn't really exist yet; 0.8.1 is >a tag in CVS which defines a release being used internally at STScI. >I'm not sure what you mean by 0.8.2 at all. Thanks, I must have been confusing it with the older 0.6.1 and 0.6.2. >This has been fixed in CVS, but there is no official release with it >yet. Do you know if it has been fixed beyond the LICENSE.TXT change? I got the new __init__.py from CVS, but I get an abnormal program termination with Installer. |
From: Todd M. <jm...@st...> - 2004-02-02 15:43:51
|
On Mon, 2004-02-02 at 10:18, Nadav Horesh wrote: > > > > -----Original Message----- > From: Todd Miller [mailto:jm...@st...] > Sent: Mon 02-Feb-04 15:53 > To: Nadav Horesh > Cc: numpy-discussion > Subject: Re: [Numpy-discussion] Bug in fft module? > On Mon, 2004-02-02 at 05:49, Nadav Horesh wrote: > > In numarray 0.8.1 running, fft (inverse_fft, real_fft etc.) on an empty > > array results in a segmentation fault. > > > > System: Python 2.3.3 compiled with gcc 3.3.2, on RH9. > > Hi Nadav, > > What do you mean by "empty", zero length? > > ==> YES: Something like: fft(array([])) Looks like a bug in the fft wrapper code to me. I can either make it a no-op or make it raise an exception. I'm leaning towards the former... do you care which? Todd > > Todd > > > > > Nadav. > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by EclipseCon 2004 > > Premiere Conference on Open Tools Development and Integration > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > http://www.eclipsecon.org/osdn > > _______________________________________________ > > Numpy-discussion mailing list > > Num...@li... > > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > -- > Todd Miller > Space Telescope Science Institute > 3700 San Martin Drive > Baltimore MD, 21030 > (410) 338 - 4576 > > > > -- Todd Miller Space Telescope Science Institute 3700 San Martin Drive Baltimore MD, 21030 (410) 338 - 4576 |
From: Nadav H. <na...@vi...> - 2004-02-02 15:18:40
|
-----Original Message----- From: Todd Miller [mailto:jm...@st...] Sent: Mon 02-Feb-04 15:53 To: Nadav Horesh Cc: numpy-discussion Subject: Re: [Numpy-discussion] Bug in fft module? On Mon, 2004-02-02 at 05:49, Nadav Horesh wrote: > In numarray 0.8.1 running, fft (inverse_fft, real_fft etc.) on an = empty=20 > array results in a segmentation fault. >=20 > System: Python 2.3.3 compiled with gcc 3.3.2, on RH9. Hi Nadav, What do you mean by "empty", zero length? =3D=3D> YES: Something like: fft(array([])) Todd >=20 > Nadav. >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion --=20 Todd Miller =09 Space Telescope Science Institute 3700 San Martin Drive Baltimore MD, 21030 (410) 338 - 4576 |
From: Todd M. <jm...@st...> - 2004-02-02 13:59:08
|
On Fri, 2004-01-30 at 21:32, Austin Luminais wrote: > > Hello, is there any place I can download a Windows installer for numarray > 0.8.1? I upgraded to 0.8.2 a while back, but it does not work with > McMillan's Installer. 0.8.1 worked fine, but I neglected to keep a copy of it. As a public release, numarray-0.8.1 doesn't really exist yet; 0.8.1 is a tag in CVS which defines a release being used internally at STScI. I'm not sure what you mean by 0.8.2 at all. > > As for why it doesn't work with Installer, I'm not sure. At least part of > the problem is that it is hardcoded to load LICENSE.TXT in __init__.py in a > way that is incompatible with Installer. > I tried removing the loading of LICENSE.TXT (which I realize is a > questionable thing to do; I was just trying to get it working), but it > doesn't work after that either. This has been fixed in CVS, but there is no official release with it yet. > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion -- Todd Miller Space Telescope Science Institute 3700 San Martin Drive Baltimore MD, 21030 (410) 338 - 4576 |
From: Todd M. <jm...@st...> - 2004-02-02 13:54:02
|
On Mon, 2004-02-02 at 05:49, Nadav Horesh wrote: > In numarray 0.8.1 running, fft (inverse_fft, real_fft etc.) on an empty > array results in a segmentation fault. > > System: Python 2.3.3 compiled with gcc 3.3.2, on RH9. Hi Nadav, What do you mean by "empty", zero length? Todd > > Nadav. > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion -- Todd Miller Space Telescope Science Institute 3700 San Martin Drive Baltimore MD, 21030 (410) 338 - 4576 |
From: Nadav H. <na...@vi...> - 2004-02-02 10:54:26
|
In numarray 0.8.1 running, fft (inverse_fft, real_fft etc.) on an empty array results in a segmentation fault. System: Python 2.3.3 compiled with gcc 3.3.2, on RH9. Nadav. |