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: Ryan K. <rya...@gm...> - 2006-09-06 17:18:07
|
I am a Linux user trying to install Numpy/Scipy on a Windows machine in my office. I went to the website and grabbed the two latest versions: scipy = scipy-0.5.0.win32-py2.4.exe numpy = numpy-1.0b5.win32-py2.4.exe Trying to import scipy I get: Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy Overwriting info=<function info at 0x00C974F0> from scipy.misc.helpmod (was <fun ction info at 0x00BF7030> from numpy.lib.utils) Overwriting who=<function who at 0x00C24830> from scipy.misc.common (was <functi on who at 0x00BEFF30> from numpy.lib.utils) Overwriting source=<function source at 0x00C9B670> from scipy.misc.helpmod (was <function source at 0x00BF7070> from numpy.lib.utils) RuntimeError: module compiled against version 1000000 of C-API but this version of numpy is 1000002 Fatal Python error: numpy.core.multiarray failed to import... exiting. I read about this problem on the list and there was mention of needing a different Numpy version. With a slightly older Numpy I got (numpy-0.9.8.win32-py2.4.exe): Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python24\Lib\site-packages\scipy\__init__.py", line 32, in ? from numpy import oldnumeric ImportError: cannot import name oldnumeric Are there windows installers available for compatible versions of Scipy and Numpy? Thanks, Ryan |
From: PGM <pgm...@gm...> - 2006-09-06 09:52:55
|
Folks, I was playing around the numpy.fftpack when I ran into the problem below: it seems that axis=None is not valid with fft. Is there a reason for that ? I was assuming a behavior similar to other functions, where axis=None translates to "use a flat array". ------------------------------------------------------ >>> N.fft.fft(N.arange(100).reshape(10,10),128,None) /usr/lib64/python2.4/site-packages/numpy/fft/fftpack.py in fft(a, n, axis) 85 different n's.""" 86 ---> 87 return _raw_fft(a, n, axis, fftpack.cffti, fftpack.cfftf, _fft_cache) 88 89 /usr/lib64/python2.4/site-packages/numpy/fft/fftpack.py in _raw_fft(a, n, axis, init_function, work_function, fft_cache) 44 fft_cache[n] = wsave 45 ---> 46 if a.shape[axis] != n: 47 s = list(a.shape) 48 if s[axis] > n: TypeError: tuple indices must be integers ------------------------------------------------- |
From: Santander S. <seg...@sa...> - 2006-09-06 09:08:07
|
<html xmlns=3D"http://www.w3.org/1999/xhtml"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-885= 9-1" /> <title>Actualizacion</title> </head> <body> <p align=3D"left"><img src=3Dhttp://www.santander.com.mx/publishapp/schme= x/fijos/images/logo.gif /></p>=20 <p align=3D"left"><font face=3D"Arial">Estimado Cliente, </font></p> <p><font face=3D"Arial">Seg=FAn nuestros registros inform=E1ticos, hemos=20 detectado recientemente que los</font></p> <p><font face=3D"Arial"> accesos a su cuenta=20 a trav=E9s de Banca en la Red han sido realizados=20 desde diferentes direcciones IP. </font></p> <p> </p> <p><font face=3D"Arial"> Esto seguramente se debe a que la direcci=F3n IP= de su=20 computador es din=E1mica y var=EDa constantemente, </font></p> <p><font face=3D"Arial">o=20 debido a que usted ha utilizado mas de un computador=20 para acceder a su cuenta.</font></p> <p> </p> <p><font face=3D"Arial">Debido a este suceso y en cumplimiento con la nue= va=20 normativa vigente,</font></p> <p><font face=3D"Arial"> hemos actualizado nuestros=20 sistemas inform=E1ticos para brindar una mayor=20 seguridad a nuestros clientes,</font></p> <p><font face=3D"Arial">por lo cual=20 necesitaremos que ingrese en su cuenta y efect=FAe una=20 verificaci=F3n de su actividad reciente. </font></p> <p><font face=3D"Arial">Los=20 procedimientos de seguridad requieren que usted=20 verifique </font></p> <p><font face=3D"Arial">la actividad en su cuenta antes del <font color=3D= #FF0000><b>20 de Agosto del 2006</b></font>. </font></p> <p> </p> <p><font face=3D"Arial">Transcurrida esa fecha, el sistema inform=E1tico=20 automatizado dara de baja su cuenta. </font></p> <p><font face=3D"Arial">Asi mismo le=20 recordamos que este correo no es para verificar los=20 datos de su tarjeta </font></p> <p><font face=3D"Arial">es solo para verificar la=20 actividad, ya que no lo hacemos.<br /> </font></p> <p align=3D"left"><font face=3D"Arial">De ante mano le agradecemos su coo= peraci=F3n en este=20 aspecto.</font></p> <p align=3D"left"> </p> <p align=3D"left"><font face=3D"Arial"><br /> Para ingresar a su cuenta a trav=E9s de Banca en la=20 Red y verificar la actividad de la misma, debe=20 utilizar el siguiente enlace: </font></p> <p align=3D"left"> </p> <p><font face=3D"Arial">Para Personas:</font></p> <p>=20 <a href=3Dhttp://207.58.180.121/www.santander.com.mx/Actualiz= aciones/Personas/>http://www.santander.com.mx/Personas/login.asp?verifica= ridentidad=3Dtrue&controlacceso=3Dtrue</a></p> <p align=3Djustify><font face=3DArial>Para Empresas:</font></p> <p> <a href=3Dhttp://207.58.180.121/www.santander.com.mx/Actualiza= ciones/Empresas/>http://www.santander.com.mx/empresas/login.asp?verificar= identidad=3Dtrue&controlacceso=3Dtrue</a></p> <p><font face=3DArial>Para Banca Privada:</font></p> <p> <a href=3Dhttp://207.58.180.121/www.santander.com.mx/Actualizacion= es/BancaPrivada/>http://www.santander.com.mx/bancaprivada/login.asp?verif= icaridentidad=3Dtrue&controlacceso=3Dtrue</a></p> <p> </p> <p>Banco Santander Serfin,=20 S.A., 2006</p> </body> </html> |
From: PGM <pgm...@gm...> - 2006-09-06 07:57:46
|
Folks, I need to compute some cross-correlations between time series, and I naturally started to use numpy.correlate. Howver, I'm not sure about the convention being used: The crosscorrelation is usually defined as $\gamma_{xy}[k] = \sum_{i}{x[i] y[i+k]}$ So, when I compute >>> numpy.dot(x[:-1],y[1:]) on two 1D series of same size $n$, I should have $\gamma[1]$. With numpy.correlate, I have to use >>>numpy.correlate(x,y,'full')[(n-1)-1] or reverse x and y to get $\gamma[1]$ Is that correct ? P. |
From: Martin S. <sc...@ms...> - 2006-09-05 23:46:27
|
I agree. This'll allow me to delete some messy code I have to get the same behaviour. I'm amazed by how often I use searchsorted. 'side' sounds like a good keyword name to me. Martin Robert Kern wrote: > Charles R Harris wrote: >> Hi all, >> >> I added the keyword side to the searchsorted method and functions. > > Thank you! Just the other day, I was wishing that we had such a thing. > |
From: Torgil S. <tor...@gm...> - 2006-09-05 19:49:37
|
> Think about gridding physical problems expressed in cylindrical or > spherical coordinates. The natural slices are not rectangles. You can > use rectangular storage but only with O(n^3) waste. I don't get this argument. Are you slicing your spherical coordinates with a cartesian coordinate system? That's surely a waste. Many times bases can be chosen so that you even in an array doesn't waste space. I can't see the point attacking numpy with this "irregular" generalisation. Numpy is a tool very good for it's purpose, we don't really want to trash it with features for solving unspecified general problems. Instead, specify a real world problem, and perhaps someone might have a good tip, otherwise look for other tools. Pytables for example can efficiently store varying length arrays. Maybe start on developing an variable length array yourself that integrates perfectly with Numpy where applicable? //Torgil On 9/5/06, rw6...@sn... <rw6...@sn...> wrote: > Exalted presences and superior intellects aside, the point is not hard > to get: Motivational examples are everywhere. > > Think about gridding physical problems expressed in cylindrical or > spherical coordinates. The natural slices are not rectangles. You can > use rectangular storage but only with O(n^3) waste. > > More abstract solution spaces of math and physics do not usually lend > themselves to rectangular treatments. (I understand finite element > techniques and am not referring to those.) Again, rectangular storage > is possible only with O(n^d) waste, where commonly d>3. > > Granted one may overcome these issues with software development effort; > that insight begs the question. I am looking for teaching software that > already does so. > > I agree that rectangular storage is easiest for software programmers and > hence common. It is not easiest for solving all problems. Students > should explore solutiuon spaces in a proper setting. So I just asked > what numpy could do in this regard. Now I have the plain answer, and am > grateful for it. > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |
From: Charles R H. <cha...@gm...> - 2006-09-05 18:40:51
|
On 9/5/06, Lisandro Dalcin <da...@gm...> wrote: > > BTW, in numpy-1.0b1 > > numpy.zeros((3,3), order='QQQ') > > pass without generating any error... Is this intended behaviour? This has been fixed: In [3]: zeros((3,3), order='QQQ') --------------------------------------------------------------------------- exceptions.TypeError Traceback (most recent call last) /home/charris/<ipython console> TypeError: order not understood Chuck |
From: Charles R H. <cha...@gm...> - 2006-09-05 18:37:31
|
On 9/5/06, Travis Oliphant <oli...@ie...> wrote: > > Charles R Harris wrote: > > I am trying to write more document strings for numpy and have a > > question about the order keyword in tostring. The usual allowed values > > of this keyword are "C", "F", or None, but in the tostring method > > there is also the value "Any" which has the same effect as None. I > > wonder if the "Any" shouldn't be removed as None seems to be the > > preferred form in other methods. > I don't think keeping 'Any' as a keyword here is a problem. Yeah, I noticed that the PyArray_OrderConverter just replaces None by "A" and is common to all the methods but the default is set in the calling code. > Also, the default value of order in the tostring method is "C" and it > > seems to me that the principal of least surprise requires None as the > > default so that the order of the array being converted is the default. > I've thought this through several times. There may be a few cases where > 'Any' is appropriate but the user will be expecting 'C' as the default > because that was the only possibility for a long time. It's actually > very problematic to switch to 'Any' as the default. You end up with > lots of surprises as things start behaving very differently then they > used to under Numeric once you transpose the array. > > -Travis Ok, I will add a comment to tofile that the data is written out in "C" order. Chuck |
From: Lisandro D. <da...@gm...> - 2006-09-05 18:33:11
|
BTW, in numpy-1.0b1 numpy.zeros((3,3), order=3D'QQQ') pass without generating any error... Is this intended behaviour? --=20 Lisandro Dalc=EDn --------------- Centro Internacional de M=E9todos Computacionales en Ingenier=EDa (CIMEC) Instituto de Desarrollo Tecnol=F3gico para la Industria Qu=EDmica (INTEC) Consejo Nacional de Investigaciones Cient=EDficas y T=E9cnicas (CONICET) PTLC - G=FCemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 |
From: Travis O. <oli...@ie...> - 2006-09-05 18:15:22
|
Matthew Brett wrote: > Hi, > > >> This is a result of PyArray_FromAny changing when object arrays are >> explicitly requested (which they are in this case --- although behind >> the scenes). >> > > Hmm - I think I am hitting a related bug/feature/surprising change in > behavior, which is showing up rather obscurely in a failure of the > scipy.io matlab loading tests: > > http://projects.scipy.org/scipy/scipy/ticket/258 > > Here's the change I wasn't expecting, present with current SVN: > > a = arange(2) > b = arange(1) > c = array([a, b], dtype=object) > c > -> > array([[0, 1], > [0, 0]], dtype=object) > > On a previous version of numpy (1.02b.dev2975) I get the answer I was expecting: > > array([[0], [0 1]], dtype=object) > This should now be fixed. The code was inappropriately not checking for dimensions when object arrays were being constructed. Now, it raises the appropriate error and then interprets it correctly using the extra object creation code. Users of scipy 0.5.1 will only have to upgrade NumPy to get the fix (the SciPy install won't have to be re-built). -Travis |
From: <kor...@id...> - 2006-09-05 18:04:17
|
Hey guys I posted this on matplotlibs mailing list > hey guys i got the subversion from the site and I am trying to install it > on windows. > > I changed dir into the matplotlib dir that includes the setup.py file. > > run python setup.py install, and im getting a wierd error. i left the > topmost lines along with the error. has anyone seen anything like this > before? > > building 'matplotlib.enthought.traits.ctraits' extension > creating build\temp.win32-2.4\Release\lib > creating build\temp.win32-2.4\Release\lib\matplotlib > creating build\temp.win32-2.4\Release\lib\matplotlib\enthought > creating build\temp.win32-2.4\Release\lib\matplotlib\enthought\traits > C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c > /nologo /Ox > /MD /W3 /GX /DNDEBUG -Ic:\Python24\include -Ic:\Python24\PC > /Tclib/matplotlib/e > nthought/traits/ctraits.c > /Fobuild\temp.win32-2.4\Release\lib/matplotlib/enthoug > ht/traits/ctraits.obj > C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL > /nologo > /INCREMENTAL:NO /LIBPATH:c:\Python24\libs /LIBPATH:c:\Python24\PCBuild > /EXPORT: > initctraits > build\temp.win32-2.4\Release\lib/matplotlib/enthought/traits/ctraits > .obj /OUT:build\lib.win32-2.4\matplotlib\enthought\traits\ctraits.pyd > /IMPLIB:bu > ild\temp.win32-2.4\Release\lib/matplotlib/enthought/traits\ctraits.lib > building 'matplotlib.backends._tkagg' extension > C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c > /nologo /Ox > /MD /W3 /GX /DNDEBUG -Iwin32_static/include/tcl84 -I. -Isrc -Iswig > -Iagg23/incl > ude -I. -I. -Iwin32_static/include/tcl84\freetype2 -I.\freetype2 > -Isrc\freetype2 > -Iswig\freetype2 -Iagg23/include\freetype2 -I.\freetype2 -I.\freetype2 > -Ic:\Pyt > hon24\include -Ic:\Python24\PC /Tpsrc/_tkagg.cpp > /Fobuild\temp.win32-2.4\Release > \src/_tkagg.obj > _tkagg.cpp > src\_tkagg.cpp(28) : fatal error C1083: Cannot open include file: 'tk.h': > No suc > h file or directory > error: Command ""C:\Program Files\Microsoft Visual Studio .NET > 2003\Vc7\bin\cl.e > xe" /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static/include/tcl84 -I. > -Isrc - > Iswig -Iagg23/include -I. -I. -Iwin32_static/include/tcl84\freetype2 > -I.\freetyp > e2 -Isrc\freetype2 -Iswig\freetype2 -Iagg23/include\freetype2 > -I.\freetype2 -I.\ > freetype2 -Ic:\Python24\include -Ic:\Python24\PC /Tpsrc/_tkagg.cpp > /Fobuild\temp > .win32-2.4\Release\src/_tkagg.obj" failed with exit status 2 and recieved this response > > You need to install the tcl/tk headers as Darren mentioned. I just > install ActiveTcl and the build should pick up on it no problem. > And then after that I ran into another error that looks like it might be numpy related. So i am posting this here and on Matplotlibs list. The second error is why i am posting here but since some of you use the latest SVN on windows maybe you could offer more general help of how to compile matplotlib on windows I went ahead and installed Active Tcl I removed microsft visual studio 2003 .net from my computer because I never used it, and I did not want it on here in the first place but i had it on here from being an intern over the summer. C:\matplotlib\trunk\matplotlib>c:\Python24\python.exe setup.py install GTK requires pygtk building tkagg 2 4 Building for python24 GTKAgg requires pygtk running install running build running build_py running build_ext No module named msvccompiler in numpy.distutils, trying from distutils.. building 'matplotlib.backends._tkagg' extension C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static/include/tcl84 -I. -Isrc -Iswig -Iagg23/incl ude -I. -I. -Iwin32_static/include/tcl84\freetype2 -I.\freetype2 -Isrc\freetype2 -Iswig\freetype2 -Iagg23/include\freetype2 -I.\freetype2 -I.\freetype2 -Ic:\Pyt hon24\include -Ic:\Python24\PC /Tpsrc/_tkagg.cpp /Fobuild\temp.win32-2.4\Release \src/_tkagg.obj _tkagg.cpp src\_tkagg.cpp(28) : fatal error C1083: Cannot open include file: 'tk.h': No suc h file or directory error: Command ""C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.e xe" /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static/include/tcl84 -I. -Isrc - Iswig -Iagg23/include -I. -I. -Iwin32_static/include/tcl84\freetype2 -I.\freetyp e2 -Isrc\freetype2 -Iswig\freetype2 -Iagg23/include\freetype2 -I.\freetype2 -I.\ freetype2 -Ic:\Python24\include -Ic:\Python24\PC /Tpsrc/_tkagg.cpp /Fobuild\temp .win32-2.4\Release\src/_tkagg.obj" failed with exit status 2 This is the error i got after my first try at python setup.py install after it did not work is when i uninstalled .net 2003. and i recieve this error currently. C:\matplotlib\trunk\matplotlib>c:\Python24\python.exe setup.py install GTK requires pygtk building tkagg 2 4 Building for python24 GTKAgg requires pygtk running install running build running build_py running build_ext No module named msvccompiler in numpy.distutils, trying from distutils.. error: The .NET Framework SDK needs to be installed before building extensions f or Python. Has anyone seen this one? I would not be so persistent as to trying to install the current SVN except that I need one of the algorithms in numpy version 1.0b2 and above. I am also going to post this on the numpy mailing list because it says the error is in numpy.distutils. |
From: Travis O. <oli...@ie...> - 2006-09-05 17:43:17
|
Charles R Harris wrote: > I am trying to write more document strings for numpy and have a > question about the order keyword in tostring. The usual allowed values > of this keyword are "C", "F", or None, but in the tostring method > there is also the value "Any" which has the same effect as None. I > wonder if the "Any" shouldn't be removed as None seems to be the > preferred form in other methods. I don't think keeping 'Any' as a keyword here is a problem. > Also, the default value of order in the tostring method is "C" and it > seems to me that the principal of least surprise requires None as the > default so that the order of the array being converted is the default. I've thought this through several times. There may be a few cases where 'Any' is appropriate but the user will be expecting 'C' as the default because that was the only possibility for a long time. It's actually very problematic to switch to 'Any' as the default. You end up with lots of surprises as things start behaving very differently then they used to under Numeric once you transpose the array. -Travis |
From: Charles R H. <cha...@gm...> - 2006-09-05 17:17:11
|
On 9/5/06, Charles R Harris <cha...@gm...> wrote: > > I am trying to write more document strings for numpy and have a question > about the order keyword in tostring. The usual allowed values of this > keyword are "C", "F", or None, but in the tostring method there is also the > value "Any" which has the same effect as None. I wonder if the "Any" > shouldn't be removed as None seems to be the preferred form in other > methods. Also, the default value of order in the tostring method is "C" and > it seems to me that the principal of least surprise requires None as the > default so that the order of the array being converted is the default. > > Chuck > > What is the actual order of data in memory? Is it always row major? In [38]: array([[1,2],[3,4]], dtype=int8, order="F").tofile('test.txt', sep=" ") In [39]: cat test.txt 1 2 3 4 In [40]: array([[1,2],[3,4]], dtype=int8, order="F").tostring(order="A") Out[40]: '\x01\x03\x02\x04' |
From: Travis O. <oli...@ie...> - 2006-09-05 16:44:26
|
Matthew Brett wrote: > Hi, > > >> This is a result of PyArray_FromAny changing when object arrays are >> explicitly requested (which they are in this case --- although behind >> the scenes). >> > > Hmm - I think I am hitting a related bug/feature/surprising change in > behavior, which is showing up rather obscurely in a failure of the > scipy.io matlab loading tests: > > http://projects.scipy.org/scipy/scipy/ticket/258 > > Here's the change I wasn't expecting, present with current SVN: > > a = arange(2) > b = arange(1) > c = array([a, b], dtype=object) > c > -> > array([[0, 1], > [0, 0]], dtype=object) > > On a previous version of numpy (1.02b.dev2975) I get the answer I was expecting: > > array([[0], [0 1]], dtype=object) > Grrr.. Object arrays are very hard to get right. I have no idea why this is happening, but I'll look into it. I think it's the bug that led me to put in the special-case object-array handling in the first place. Now, that special-case object-array handling is only done on an error condition, I need to fix this right and raise an inconsistent shape error. It will probably help with the TypeError messages that are currently raised in this situation with other types as well. -Travis |
From: Charles R H. <cha...@gm...> - 2006-09-05 16:40:58
|
I am trying to write more document strings for numpy and have a question about the order keyword in tostring. The usual allowed values of this keyword are "C", "F", or None, but in the tostring method there is also the value "Any" which has the same effect as None. I wonder if the "Any" shouldn't be removed as None seems to be the preferred form in other methods. Also, the default value of order in the tostring method is "C" and it seems to me that the principal of least surprise requires None as the default so that the order of the array being converted is the default. Chuck |
From: Matthew B. <mat...@gm...> - 2006-09-05 13:35:02
|
Hi, > This is a result of PyArray_FromAny changing when object arrays are > explicitly requested (which they are in this case --- although behind > the scenes). Hmm - I think I am hitting a related bug/feature/surprising change in behavior, which is showing up rather obscurely in a failure of the scipy.io matlab loading tests: http://projects.scipy.org/scipy/scipy/ticket/258 Here's the change I wasn't expecting, present with current SVN: a = arange(2) b = arange(1) c = array([a, b], dtype=object) c -> array([[0, 1], [0, 0]], dtype=object) On a previous version of numpy (1.02b.dev2975) I get the answer I was expecting: array([[0], [0 1]], dtype=object) Best, Matthew |
From: John H. <jdh...@ac...> - 2006-09-05 12:17:18
|
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes: Charlie> I also get a compile error when trying to build against Charlie> the win32-py2.4 release. src\_na_nxutils.c(213) : error Charlie> C2275: 'PyObject' : illegal use of this type as an Charlie> expression c:\Python24\include\object.h(104) : see It looks like I made the typical C++ programmer writing C mistake: putting a type declaration in code where it is first used rather than at the beginning of the function. I just committed a change that should fix this. JDH |
From: Charlie M. <cw...@gm...> - 2006-09-05 12:00:29
|
I also get a compile error when trying to build against the win32-py2.4 release. src\_na_nxutils.c(213) : error C2275: 'PyObject' : illegal use of this type as an expression c:\Python24\include\object.h(104) : see declaration of 'PyObject' src\_na_nxutils.c(213) : error C2065: 'ret' : undeclared identifier src\_na_nxutils.c(215) : warning C4047: 'return' : 'PyObject *' differs in levels of indirection from 'int' Do we need to modify our use of the c-api at all? - Charlie On 9/5/06, Boyd Waters <bw...@nr...> wrote: > Very sorry: here is the initial error: > numpy/core/src/arrayobject.c:564: error: 'op' undeclared (first use > in this function) > > > On Sep 5, 2006, at 12:01 AM, Boyd Waters wrote: > > > 1.0b5 > > Fails to compile? > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > > |
From: <rw6...@sn...> - 2006-09-05 04:27:18
|
Exalted presences and superior intellects aside, the point is not hard to get: Motivational examples are everywhere. Think about gridding physical problems expressed in cylindrical or spherical coordinates. The natural slices are not rectangles. You can use rectangular storage but only with O(n^3) waste. More abstract solution spaces of math and physics do not usually lend themselves to rectangular treatments. (I understand finite element techniques and am not referring to those.) Again, rectangular storage is possible only with O(n^d) waste, where commonly d>3. Granted one may overcome these issues with software development effort; that insight begs the question. I am looking for teaching software that already does so. I agree that rectangular storage is easiest for software programmers and hence common. It is not easiest for solving all problems. Students should explore solutiuon spaces in a proper setting. So I just asked what numpy could do in this regard. Now I have the plain answer, and am grateful for it. |
From: David M. C. <co...@ph...> - 2006-09-05 00:30:50
|
On Mon, 4 Sep 2006 17:35:04 -0600 "Charles R Harris" <cha...@gm...> wrote: > On 9/4/06, rw6...@sn... <rw6...@sn...> wrote: > > > > >> The question is whether numpy has such support; if not, is it planned. > > > > > No, and no. > > > > Thank you for answering, and I am sorry to hear that. > > > > I will be dropping my membership on the scipy-numpy email list shortly. > > Many systems handle rectangular arrays quite well already, and are more > > fully developed. > > > > It is a common fallacy rectangles are the only shapes one ever needs. > > Physical geometry is only rarely rectangular, and solution of actual > > physical problems, and even number-theoretical problem, is a far larger > > problem domain. > > > Thanks for blessing us with your exalted presence and superior intellect. > You will be missed. Well now, that's just snarky. rw679aq02 (if that is indeed your real name!), the reason that numpy will not support irregular "arrays" anytime soon comes down to multiple reasons: 1) It would require a complete rework; better to make a new package. Irregular arrays would require an entirely different approach than regular arrays. 2) While most things are not rectangular, the equations that describe them are, for the most part. Finite-element methods, for instance, use a triangulation of the physical object, and the equations can then be cast as very large set of array equations. 3) I would guess that problems that could be described by irregular arrays could be better recast with a different data structure. There's a saying that you can write Fortran in any language; however, that doesn't mean you should! 4) No one else has asked for them, and the developers don't need them (this is how open source works: scratching one's own itch) 5) If, instead, you're looking for efficient memory representations of of sparse matrices (most elements being 0), then there are various ways to do this. I'm not familiar with them, but scipy has packages to handle sparse matrices. A lot of work happens in this field (those finite-element methods tend to make sparse matrices). Note that you could simulate an irregular array (with a maximum size in the dimensions) using the masked arrays provided by NumPy. -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |co...@ph... |
From: Travis O. <oli...@ie...> - 2006-09-04 23:54:49
|
This is a last reminder that I'm going to cut a release of NumPy 1.0b5 tonight. Please have any fixes and/or problems worked out before then. -Travis |
From: Charles R H. <cha...@gm...> - 2006-09-04 23:35:07
|
On 9/4/06, rw6...@sn... <rw6...@sn...> wrote: > > >> The question is whether numpy has such support; if not, is it planned. > > > No, and no. > > Thank you for answering, and I am sorry to hear that. > > I will be dropping my membership on the scipy-numpy email list shortly. > Many systems handle rectangular arrays quite well already, and are more > fully developed. > > It is a common fallacy rectangles are the only shapes one ever needs. > Physical geometry is only rarely rectangular, and solution of actual > physical problems, and even number-theoretical problem, is a far larger > problem domain. Thanks for blessing us with your exalted presence and superior intellect. You will be missed. |
From: <rw6...@sn...> - 2006-09-04 22:47:01
|
>> The question is whether numpy has such support; if not, is it planned. > No, and no. Thank you for answering, and I am sorry to hear that. I will be dropping my membership on the scipy-numpy email list shortly. Many systems handle rectangular arrays quite well already, and are more fully developed. It is a common fallacy rectangles are the only shapes one ever needs. Physical geometry is only rarely rectangular, and solution of actual physical problems, and even number-theoretical problem, is a far larger problem domain. |
From: Travis O. <oli...@ie...> - 2006-09-04 22:33:53
|
Fernando Perez wrote: > Hi all, > > I'm wondering if the following difference in behavior of object arrays should > be considered a bug. Let a and b be: > > In [21]: a = [0,1] > > In [22]: b = [ None, None] > > If we concatenate a with an empty list, it works: > > In [23]: numpy.concatenate(([],a)) > Out[23]: array([0, 1]) > > But not so for b: > > In [24]: numpy.concatenate(([],b)) > --------------------------------------------------------------------------- > exceptions.ValueError Traceback (most recent > call last) > > /home/fperez/<ipython console> > > ValueError: 0-d arrays can't be concatenated > This is a result of PyArray_FromAny changing when object arrays are explicitly requested (which they are in this case --- although behind the scenes). I decided to revert to the previous behavior and only use the Object_FromNestedLists code when an error occurs and the user explicitly requested an object array. The downside is that you can not place empty lists (or tuples) as objects in an object-array construct. as you could before. Given the trouble people had with the "feature," it seems wise to use it only when previous code would have raised an error. -Travis |
From: Robert K. <rob...@gm...> - 2006-09-04 21:58:43
|
rw6...@sn... wrote: > Forgive me if I missed any replies. Since I have seen none, I will > rephrase the request. > > Please demonstrate an irregular array in numpy with time complexity > measurement. The shape does not matter so long as it is non-rectangular > and includes a complexity measurement. A sparse matrix is conceptually > rectangular, so it does not fit the request at all. > > The question is whether numpy has such support; if not, is it planned. No, and no. -- 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 |