[SciPy-Dev] ANN: SciPy 0.10 beta 1

Christoph Gohlke cgohlke at uci.edu
Tue Sep 13 14:03:45 EDT 2011



On 9/13/2011 9:20 AM, Ralf Gommers wrote:
> Hi Christoph,
>
>
> On Tue, Sep 13, 2011 at 12:21 AM, Christoph Gohlke <cgohlke at uci.edu
> <mailto:cgohlke at uci.edu>> wrote:
>
>
>
>     On 9/12/2011 2:36 PM, Ralf Gommers wrote:
>
>         Hi,
>
>         I am pleased to announce the availability of the first beta
>         release of
>         SciPy 0.10.0. For this release over a 100 tickets and pull
>         requests have
>         been closed, and many new features have been added. Some of the
>         highlights are:
>
>            - support for Bento as a build system for scipy
>            - generalized and shift-invert eigenvalue problems in
>         sparse.linalg
>            - addition of discrete-time linear systems in the signal module
>
>         Sources and binaries can be found at
>         https://sourceforge.net/ projects/scipy/files/scipy/0. 10.0b1/
>         <https://sourceforge.net/projects/scipy/files/scipy/0.10.0b1/>,
>         release
>         notes are copied below.
>         Binaries for Python 2.x are available, on Python 3 there are a
>         few known
>         problems that should be solved first. When they are, a second
>         beta will
>         follow.
>
>         Please try this release and report problems on the mailing list.
>
>         Cheers,
>         Ralf
>
>
>     Hi Ralf,
>
>     regarding Python 3:
>
>     1) The patch from numpy ticket #1919 might be necessary on some
>     platforms <http://projects.scipy.org/ numpy/ticket/1919
>     <http://projects.scipy.org/numpy/ticket/1919>>.
>
> Any important platforms? I haven't noticed any problems related to that
> issue yet, and I'd like to keep compatibility with numpy 1.5.x for the
> binaries.

It works for me too. The ticket doesn't specify the platform, but 
according to the Cython mailing list the import_umath() macro can fail 
to compile with Python 3.2, NumPy 1.6.1, 64bit Linux, GCC 4.5.2.


>
>     2) On my system, 2to3 did not correctly convert all imports in
>     special.__init__.py, special.add_newdocs.py
>     <http://special.add_newdocs.py>, and linalg.misc.py
>     <http://linalg.misc.py>. I needed to manually change
>
>     -from _logit import logit, expit
>     +from ._logit import logit, expit
>
>     -import fblas
>     +from . import fblas
>
>
> I noticed that too. "from . import foo" is not valid python 2.4 syntax,
> so I hope there's an easy way we can make 2to3 see the error of its ways.
>
>
>     3) The attached patch fixes some test errors and failures.
>
> That all looks fine. Is the changed PIL import necessary for PIL trunk?
> I seem to remember something about changed namespaces in PIL, but
> "import Image" used to be standard. Does your fix work with older PIL
> (1.1.6)?


This is ticket #1374 <http://projects.scipy.org/scipy/ticket/1374>. To 
be safe one could use a try-except:

diff --git a/scipy/misc/pilutil.py b/scipy/misc/pilutil.py
index d7e89bb..a54edf4 100644
--- a/scipy/misc/pilutil.py
+++ b/scipy/misc/pilutil.py
@@ -14,8 +14,11 @@ from numpy import amin, amax, ravel, asarray, cast, 
arange, \
       ones, newaxis, transpose, mgrid, iscomplexobj, sum, zeros, uint8, \
       issubdtype, array

-import Image
-import ImageFilter
+try:
+    from PIL import Image, ImageFilter
+except ImportError:
+    import Image
+    import ImageFilter

  __all__ = ['fromimage','toimage','imsave','imread','bytescale',
             'imrotate','imresize','imshow','imfilter','radon']


Christoph

>
> Thanks,
> Ralf
>
>
>     Christoph
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PIL.diff
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20110913/f1ca8629/attachment.ksh>


More information about the SciPy-Dev mailing list