You can subscribe to this list here.
2000 |
Jan
(8) |
Feb
(49) |
Mar
(48) |
Apr
(28) |
May
(37) |
Jun
(28) |
Jul
(16) |
Aug
(16) |
Sep
(44) |
Oct
(61) |
Nov
(31) |
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(56) |
Feb
(54) |
Mar
(41) |
Apr
(71) |
May
(48) |
Jun
(32) |
Jul
(53) |
Aug
(91) |
Sep
(56) |
Oct
(33) |
Nov
(81) |
Dec
(54) |
2002 |
Jan
(72) |
Feb
(37) |
Mar
(126) |
Apr
(62) |
May
(34) |
Jun
(124) |
Jul
(36) |
Aug
(34) |
Sep
(60) |
Oct
(37) |
Nov
(23) |
Dec
(104) |
2003 |
Jan
(110) |
Feb
(73) |
Mar
(42) |
Apr
(8) |
May
(76) |
Jun
(14) |
Jul
(52) |
Aug
(26) |
Sep
(108) |
Oct
(82) |
Nov
(89) |
Dec
(94) |
2004 |
Jan
(117) |
Feb
(86) |
Mar
(75) |
Apr
(55) |
May
(75) |
Jun
(160) |
Jul
(152) |
Aug
(86) |
Sep
(75) |
Oct
(134) |
Nov
(62) |
Dec
(60) |
2005 |
Jan
(187) |
Feb
(318) |
Mar
(296) |
Apr
(205) |
May
(84) |
Jun
(63) |
Jul
(122) |
Aug
(59) |
Sep
(66) |
Oct
(148) |
Nov
(120) |
Dec
(70) |
2006 |
Jan
(460) |
Feb
(683) |
Mar
(589) |
Apr
(559) |
May
(445) |
Jun
(712) |
Jul
(815) |
Aug
(663) |
Sep
(559) |
Oct
(930) |
Nov
(373) |
Dec
|
From: Charles R H. <cha...@gm...> - 2006-10-11 16:52:58
|
On 10/11/06, Keith Goodman <kwg...@gm...> wrote: > > On 10/11/06, Keith Goodman <kwg...@gm...> wrote: > > This works: > > > > >> M.asmatrix(['a', 'b', None]) > > matrix([[a, b, None]], dtype=object) > > > > But this doesn't: > > > > >> M.asmatrix(['a', 'b', None, 'c']) > > TypeError: expected a readable buffer object > > As a side observation, I note that the 'None' is also non-printing: >>> a = asarray(['a', 'b', None, 'c'], dtype=object) >>> a[2] >>> str(a[2]) 'None' I wonder if this should be changed? Chuck |
From: Darren D. <dd...@co...> - 2006-10-11 16:51:57
|
On Wednesday 11 October 2006 12:48, Carl Wenrich wrote: > The installation of Numpy went well, and numeric.py is in the python > site-packages/numpy/core directory. But when I run python, and enter import > Numeric, it says no module named Numeric. Please advise. import numpy |
From: Travis O. <oli...@ee...> - 2006-10-11 16:50:53
|
Hanno Klemm wrote: >Hi, > >I don't know if this is a bug or just me doing something wrong (I >suspect the latter). I try to compile numpy-1.0rc1 with python2.5 and >atlas 3.7.17. > >I have build the atlas library myself, it doesn't give any errors >under make test or make pttest, so it seems to be okay. if I try to >build numpy I get the following error: > >creating build/temp.linux-x86_64-2.5/numpy/core/blasdot >compile options: '-DATLAS_INFO="\"3.7.17\"" -Inumpy/core/blasdot >-I/scratch/python2.5/include -Inumpy/core/include >-Ibuild/src.linux-x86_64-2.5/numpy/core -Inumpy/core/src >-Inumpy/core/include -I/scratch/python2.5/include/python2.5 -c' >gcc: numpy/core/blasdot/_dotblas.c >gcc -pthread -shared >build/temp.linux-x86_64-2.5/numpy/core/blasdot/_dotblas.o >-L/scratch/python2.5/lib -lcblas -latlas -o >build/lib.linux-x86_64-2.5/numpy/core/_dotblas.so >/usr/bin/ld: /scratch/python2.5/lib/libcblas.a(cblas_dgemm.o): >relocation R_X86_64_32 can not be used when making a shared object; >recompile with -fPIC > > This may be part of your problem. It's looks like the linker is having a hard time making use of your compiled extension in a shared library. Perhaps you should make sure -fPIC is on when you compile atlas (I'm not sure how to do that --- perhaps setting CCFLAGS environment variable to include -fPIC would help). -Travis |
From: Carl W. <car...@ya...> - 2006-10-11 16:48:41
|
The installation of Numpy went well, and numeric.py is in the python site-packages/numpy/core directory. But when I run python, and enter import Numeric, it says no module named Numeric. Please advise. Carl |
From: Travis O. <oli...@ee...> - 2006-10-11 16:46:32
|
Keith Goodman wrote: >On 10/11/06, Keith Goodman <kwg...@gm...> wrote: > > >>This works: >> >> >> >>>>M.asmatrix(['a', 'b', None]) >>>> >>>> >>matrix([[a, b, None]], dtype=object) >> >>But this doesn't: >> >> >> >>>>M.asmatrix(['a', 'b', None, 'c']) >>>> >>>> >>TypeError: expected a readable buffer object >> >> >> >>>>M.__version__ >>>> >>>> >>'1.0rc1' >> >>It also doesn't work for asarray and for tuples. >> >> >> > > > It is pretty fragile to rely on NumPy's "detection" of object arrays. The problem is that with the introduction of string, unicode, and record array styles, what is supposed to be an object array is harder to detect. The type-error propagates up from trying to create a record-array (apparently that's what was detected). You can only create record-array items from tuples or objects exposing the buffer interface. It's interesting that the detection algorithm gets thrown off by the addition of an other element. There may be an easy fix there. -Travis |
From: Charles R H. <cha...@gm...> - 2006-10-11 16:43:58
|
On 10/11/06, Alan G Isaac <ai...@am...> wrote: > > Python's MT documentation exmphasize the period of the > MT19937 algorithm but discusses not at all the seed size. > The numpy documentation contains no commentary (I believe). > Speaking from a position of utter RNG ignorance, seed size > seems really important too: why is it not discussed? > I noticed this algorithm > http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html > provides explicitly for seed size choice, which suggests > that some documentation in this area would not be irrelevant > (and also addresses some other interesting technical issues). The maximum seed size is 624 32bit words. No doubt the documentation should mention this. Chuck |
From: Keith G. <kwg...@gm...> - 2006-10-11 16:06:36
|
On 10/11/06, Keith Goodman <kwg...@gm...> wrote: > This works: > > >> M.asmatrix(['a', 'b', None]) > matrix([[a, b, None]], dtype=object) > > But this doesn't: > > >> M.asmatrix(['a', 'b', None, 'c']) > TypeError: expected a readable buffer object > > >> M.__version__ > '1.0rc1' > > It also doesn't work for asarray and for tuples. > Here's a workaround: >> M.asmatrix(['a', 'b', None, 'c'], dtype=object) matrix([[a, b, None, c]], dtype=object) |
From: Keith G. <kwg...@gm...> - 2006-10-11 16:00:09
|
This works: >> M.asmatrix(['a', 'b', None]) matrix([[a, b, None]], dtype=object) But this doesn't: >> M.asmatrix(['a', 'b', None, 'c']) TypeError: expected a readable buffer object >> M.__version__ '1.0rc1' It also doesn't work for asarray and for tuples. |
From: Alan G I. <ai...@am...> - 2006-10-11 15:59:50
|
Python's MT documentation exmphasize the period of the=20 MT19937 algorithm but discusses not at all the seed size. The numpy documentation contains no commentary (I believe). Speaking from a position of utter RNG ignorance, seed size seems really important too: why is it not discussed? I noticed this algorithm http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html provides explicitly for seed size choice, which suggests that some documentation in this area would not be irrelevant (and also addresses some other interesting technical issues). Just trying to understand a bit better. Thanks in advance for any helpful comments or URLs, Alan Isaac |
From: Hanno K. <kl...@ph...> - 2006-10-11 14:24:29
|
Hi, I don't know if this is a bug or just me doing something wrong (I suspect the latter). I try to compile numpy-1.0rc1 with python2.5 and atlas 3.7.17. I have build the atlas library myself, it doesn't give any errors under make test or make pttest, so it seems to be okay. if I try to build numpy I get the following error: creating build/temp.linux-x86_64-2.5/numpy/core/blasdot compile options: '-DATLAS_INFO="\"3.7.17\"" -Inumpy/core/blasdot -I/scratch/python2.5/include -Inumpy/core/include -Ibuild/src.linux-x86_64-2.5/numpy/core -Inumpy/core/src -Inumpy/core/include -I/scratch/python2.5/include/python2.5 -c' gcc: numpy/core/blasdot/_dotblas.c gcc -pthread -shared build/temp.linux-x86_64-2.5/numpy/core/blasdot/_dotblas.o -L/scratch/python2.5/lib -lcblas -latlas -o build/lib.linux-x86_64-2.5/numpy/core/_dotblas.so /usr/bin/ld: /scratch/python2.5/lib/libcblas.a(cblas_dgemm.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /scratch/python2.5/lib/libcblas.a: could not read symbols: Bad value collect2: ld returned 1 exit status /usr/bin/ld: /scratch/python2.5/lib/libcblas.a(cblas_dgemm.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /scratch/python2.5/lib/libcblas.a: could not read symbols: Bad value collect2: ld returned 1 exit status error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.5/numpy/core/blasdot/_dotblas.o -L/scratch/python2.5/lib -lcblas -latlas -o build/lib.linux-x86_64-2.5/numpy/core/_dotblas.so" failed with exit status 1 I then tried to recompile atlas with the configure options as: configure --cflags=-fPIC --with-netlib-lapack=/scratch/src/python_dist/LAPACK --prefix=/scratch/python2.5 but the error still remains. I'm on a 2 CPU Intel Xeon machine with gcc 3.2.3. Any hints? Hanno -- Hanno Klemm kl...@ph... |
From: O'Keefe, M. <Mic...@nr...> - 2006-10-11 13:50:32
|
Just FYI, I got the following warning while running the unittests from = RC02: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit = (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** =20 IDLE 1.2 =20 >>> from numpy import test >>> from numpy import __version__ >>> __version__ '1.0rc2' >>> test() Found 5 tests for numpy.distutils.misc_util Found 3 tests for numpy.lib.getlimits Found 31 tests for numpy.core.numerictypes Found 32 tests for numpy.linalg Found 13 tests for numpy.core.umath Found 4 tests for numpy.core.scalarmath Found 9 tests for numpy.lib.arraysetops Found 4 tests for numpy.ctypeslib Found 42 tests for numpy.lib.type_check Warning: FAILURE importing tests for <module 'numpy.core.multiarray' = from '...ages\\numpy\\core\\multiarray.pyd'> C:\Python25\Lib\site-packages\numpy\core\tests\test_multiarray.py:355: = ImportError: No module named test_unicode (in <module>) Found 3 tests for numpy.fft.helper Found 36 tests for numpy.core.ma Found 1 tests for numpy.lib.ufunclike Found 12 tests for numpy.lib.twodim_base Found 10 tests for numpy.core.defmatrix Found 41 tests for numpy.lib.function_base Found 2 tests for numpy.lib.polynomial Found 8 tests for numpy.core.records Found 26 tests for numpy.core.numeric Found 4 tests for numpy.lib.index_tricks Found 47 tests for numpy.lib.shape_base Found 0 tests for __main__ .........................................................................= .........................................................................= .........................................................................= .........................................................................= ......................................... ---------------------------------------------------------------------- Ran 333 tests in 2.687s OK <unittest.TextTestRunner object at 0x01462C10> |
From: <hu...@ya...> - 2006-10-11 13:49:13
|
Le mardi 10 octobre 2006 16:30, Darren Dale a =E9crit=A0: > On Tuesday 10 October 2006 15:41, hu...@ya... wrote: > > I asked if that will be possible to use ipython instead of the python > > console in eric4 (I know that it's not possible with eric3) but it's > > seems that eric4 does have it's own console. So, at least for me, it's > > not anymore an option. > > Why do you say that? I just installed the latest development snapshots, a= nd > Eric4 does have its own console. I haven't been able to set ipython as the > custom interpretter, but I will ask the developer about it. > > Darren I asked on the mail list and this is the answer from the developer: On Tuesday 10 October 2006 17:33, hu...@ya... wrote: > Hi, > > I would like to know if that will be possible to use ipython with eric4 > instead of the normal python console? > > Thanks, > > N. > _______________________________________________ No. Eric uses it's own console, which talks to a remote Python (or Ruby)=20 interpreter via a network socket. Regards, Detlev =2D-=20 Detlev Offenbach de...@di... |
From: Nils W. <nw...@ia...> - 2006-10-11 09:29:49
|
Mark Bakker wrote: > Hello - > > I want to select part of an array using two conditions. > I know how to do it with one condition (and it works great), but when > I use two conditions I get an error message? > This is probably easy, but I cannot figure it out. > Thanks for any help, Mark > > >>> a = arange(10) > >>> a > array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) > >>> a[ a>2 ] > array([3, 4, 5, 6, 7, 8, 9]) > >>> a[ a>2 and a<8 ] > Traceback (most recent call last): > File "<pyshell#52>", line 1, in ? > a[ a>2 and a<8 ] > ValueError: The truth value of an array with more than one element is > ambiguous. Use a.any() or a.all() > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 > a[ (a>2) & (a<8) ] Nils |
From: Francesc A. <fa...@ca...> - 2006-10-11 09:21:01
|
El dc 11 de 10 del 2006 a les 11:06 +0200, en/na Mark Bakker va escriure: > Hello - >=20 > I want to select part of an array using two conditions. > I know how to do it with one condition (and it works great), but when > I use two conditions I get an error message? > This is probably easy, but I cannot figure it out.=20 > Thanks for any help, Mark >=20 > >>> a =3D arange(10) > >>> a > array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) > >>> a[ a>2 ] > array([3, 4, 5, 6, 7, 8, 9]) > >>> a[ a>2 and a<8 ]=20 > Traceback (most recent call last): > File "<pyshell#52>", line 1, in ? > a[ a>2 and a<8 ] > ValueError: The truth value of an array with more than one element is > ambiguous. Use a.any() or a.all() Yeah, this is a common error on people that is not used to these kind of selections. You have to use the boolean binary operators (and not the logical operators) for doing this: >>> a[(a>2) & (a<8)] Notice the parenthesis. They are necessary because the operator & has more precedence than < or >. --=20 >0,0< Francesc Altet http://www.carabos.com/ V V C=C3=A1rabos Coop. V. Enjoy Data "-" |
From: Mark B. <ma...@gm...> - 2006-10-11 09:06:25
|
Hello - I want to select part of an array using two conditions. I know how to do it with one condition (and it works great), but when I use two conditions I get an error message? This is probably easy, but I cannot figure it out. Thanks for any help, Mark >>> a = arange(10) >>> a array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> a[ a>2 ] array([3, 4, 5, 6, 7, 8, 9]) >>> a[ a>2 and a<8 ] Traceback (most recent call last): File "<pyshell#52>", line 1, in ? a[ a>2 and a<8 ] ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() |
From: Johannes L. <a.u...@gm...> - 2006-10-11 08:35:47
|
> I'm just wondering if there is a way that i can increment all the values > along a diagonal? Assume you want to change mat. # min() only necessary for non-square matrices index = arange(min(mat.shape[0], mat.shape[1])) # add 1 to each diagonal element matrix[index, index] += 1 # add some other stuff matrix[index, index] += some_array_shaped_like_index HTH, Johannes |
From: David N. <da...@di...> - 2006-10-11 08:09:31
|
Hi, i'm moving some old perl PDL code to python. I've come across a line which changes values in a diagonal line accross a matrix. matrix.diagonal() returns a list of values, but making changes to these does not reflect in the original (naturally). I'm just wondering if there is a way that i can increment all the values along a diagonal? Cheers Dave P.S i wasnt sure how to sign to the mailing list - so i'd appreciate being CC'd in any replies ;) |
From: Karol L. <kar...@kn...> - 2006-10-11 07:44:36
|
On Wednesday 11 of October 2006 05:38, Steven H. Rogers wrote: > Is there a specific libblas required by NumPy? I just installed 1.0rc2 > and get this error. > > Python 2.5 (r25:51908, Sep 21 2006, 17:18:24) > [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > > >>> import numpy > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", line > 40, in <module> > import linalg > File > "/usr/local/lib/python2.5/site-packages/numpy/linalg/__init__.py", line > 4, in <module> > from linalg import * > File "/usr/local/lib/python2.5/site-packages/numpy/linalg/linalg.py", > line 25, in <module> > from numpy.linalg import lapack_lite > ImportError: /usr/lib/libblas.so.3: undefined symbol: e_wsfe > > Regards, > Steve I've seen this a couple of times - e_wsfe is a Fortran I/O symbol from the gcc system and should be made available by libg2c. My guess if that you have inconsistencies in the compilers used, i .e. a different one was used for building the blas libraries by RH and by you for numpy. Try adding g2c to the list of libraries. There's a comment about it in the scipy FAQ: http://www.scipy.org/FAQ#head-26562f0a9e046b53eae17de300fc06408f9c91a8 Karol -- written by Karol Langner Wed Oct 11 09:35:15 CEST 2006 |
From: Steven H. R. <st...@sh...> - 2006-10-11 03:36:21
|
Is there a specific libblas required by NumPy? I just installed 1.0rc2 and get this error. Python 2.5 (r25:51908, Sep 21 2006, 17:18:24) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", line 40, in <module> import linalg File "/usr/local/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in <module> from linalg import * File "/usr/local/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in <module> from numpy.linalg import lapack_lite ImportError: /usr/lib/libblas.so.3: undefined symbol: e_wsfe Regards, Steve -- Steven H. Rogers, Ph.D., st...@sh... Weblog: http://shrogers.com/weblog "He who refuses to do arithmetic is doomed to talk nonsense." -- John McCarthy |
From: Travis O. <oli...@ee...> - 2006-10-11 00:36:59
|
Daniel Drake wrote: >Hi, > >I have an area of memory which is shared between processes (it is >actually a shared memory segment). The address of this memory is stored >in a python long variable, which I pass to various custom C/C++ python >modules. > >I would like to construct a numpy array in this area. Is there any way I >can tell numpy to use a specific address (stored as a long) to use as >storage for the array? > This functionality is already available. There are two ways to do it. 1) Create an object with an __array_interface__ attribute that returns a dictionary with shape, typestr, and data fields. The data field should return the tuple (memory-address-as-long, True-if-read-only-otherwise-False). Passing this object into the asarray constructor will use the memory given 2) Use the asbuffer function in numpy.core.multiarray (it's not exposed to numpy yet) to create a buffer object from the memory address and then use frombuffer to create an array from the memory. Good luck, -Travis |
From: Sasha <nd...@ma...> - 2006-10-10 21:14:00
|
On 10/10/06, Fernando Perez <fpe...@gm...> wrote: > ... > 1. Should the docstring be changed to simply say > > If axis is None, this equals: > a.sum(axis, dtype) * 1.0 / a.size > I would think so. In addition, at the expense of being slightly inaccurate, I would change that to simply a.sum(axis, dtype)/a.size . This will only be inaccurate if dtype is integer and true division is not enabled. If you want to be pedantic, a.sum(axis, dtype)/float(a.size) would still read better. |
From: Darren D. <dd...@co...> - 2006-10-10 20:30:20
|
On Tuesday 10 October 2006 15:41, hu...@ya... wrote: > I asked if that will be possible to use ipython instead of the python > console in eric4 (I know that it's not possible with eric3) but it's seems > that eric4 does have it's own console. So, at least for me, it's not > anymore an option. Why do you say that? I just installed the latest development snapshots, and Eric4 does have its own console. I haven't been able to set ipython as the custom interpretter, but I will ask the developer about it. Darren |
From: <hu...@ya...> - 2006-10-10 19:41:47
|
I asked if that will be possible to use ipython instead of the python conso= le=20 in eric4 (I know that it's not possible with eric3) but it's seems that eri= c4=20 does have it's own console. So, at least for me, it's not anymore an option. N. Le mardi 10 octobre 2006 12:47, Christopher Barker a =E9crit=A0: > Eric Emsellem wrote: > > I have problems getting binaries for wxPython (Suse10.1) and I > > don't want to attempt a full compilation of that package... > > Di you try the rpms at sourceforge? one of them may well be compatible. > > If not, I've had good luck with building the source rpms: > > rpmbuild --rebuild NameOfRPM.srpm > > > installed Suse10.1 from the downloadable version and many many > > packages are missing there - > > That would be a trick -- you'll need relevant the dev packages. But that > sounds like an issue you'll be coming up against over and over again > anyway. > > -Chris |
From: Fernando P. <fpe...@gm...> - 2006-10-10 19:33:41
|
Hi all, I was updating some old Numeric code to be more 'numpythonic' (it works, but uses a lot of Numeric-style cruft), and read the a.mean() docstring that says: If axis is None, this equals: a.sum(axis, dtype) * 1.0 / product(a.shape,axis=0) Is this convoluted form of the denominator really needed? Isn't it equivalent to a.size? A few quick tests (and my understanding of numpy's new attributes) seem to indicate so: In [78]: a=rand(1,2,3,4); product(a.shape,axis=0)==a.size Out[78]: True In [79]: a=rand(2,3,4,2); product(a.shape,axis=0)==a.size Out[79]: True In [80]: a=rand(2); product(a.shape,axis=0)==a.size Out[80]: True In [81]: a=rand(2,4,4); product(a.shape,axis=0)==a.size Out[81]: True So my question is two-fold (assuming the above is correct in all cases): 1. Should the docstring be changed to simply say If axis is None, this equals: a.sum(axis, dtype) * 1.0 / a.size This is clearer to readers, and promotes the use of .size as a quick and correct way of getting an array's size. 2. Does the implementation actually used the more complicated product() approach, or does it just read .size? I'm wondering about efficiency. Regards, f |
From: Charles R H. <cha...@gm...> - 2006-10-10 17:30:17
|
On 10/10/06, Charles R Harris <cha...@gm...> wrote: > > > > On 10/10/06, Christopher Barker <Chr...@no...> wrote: > > > > Hi all: > > > > Fredrik Lundh wrote: > > > A little later that planned, but PIL 1.1.6 beta 2 is now available > > from SVN: > > > > > > http://svn.effbot.python-hosting.com/tags/pil-1.1.6b2/ > > > > > > A tarball will appear on effbot.org shortly: > > > > > > http://effbot.org/downloads/#Imaging > > > > > > As usual, PIL 1.1.6 supports all Python versions from 1.5.2 and > > onwards, > > > including 2.5. > > > > > > For a hopefully complete list of changes, see: > > > > > > http://effbot.org/zone/pil-changes-116.htm > > > > From there: > > > > """ > > * Added "fromarray" function, which takes an object implementing the > > NumPy array interface and creates a PIL Image from it. (from Travis > > Oliphant). > > > > * Added NumPy array interface support (__array_interface__) to the Image > > class (based on code by Travis Oliphant). This allows you to easily > > convert between PIL image memories and NumPy arrays: > > import numpy, Image > > > > i = Image.open('lena.jpg') > > a = numpy.asarray(i) # a is readonly > > i = Image.fromarray(a) > > """ > > > Fromarray wasn't there for me running latest PIL from svn last week. I had > to use another function whose name escapes me at the moment (I don't use PIL > very often), but yes, there is a way to use numpy arrays in PIL. > Ah, I recall now, I used Image.frombuffer(...) or some such. This is probably a problem if the numpy array is not of the right type. Chuck |