[Numpy-discussion] Numeric and Python 2.5b1 (original) (raw)

Konrad Hinsen konrad.hinsen at laposte.net
Thu Jun 22 06:39:47 EDT 2006


Those who try out Python 2.5b1 and add Numeric might be annoyed by
the warning message that Python issues when Numeric is imported the
first time. This is due to the fact that Numeric lives inside a
directory called "Numeric" without being a package - Numeric has been
around for longer than packages in Python.

You can get rid of this warning by adding the following lines to
sitecustomize.py:

import warnings try: warnings.filterwarnings("ignore", category=ImportWarning) except NameError: pass del warnings

The try statement ensures that the code will work for older Python
releases as well.

Konrad.


Konrad Hinsen Centre de Biophysique Moléculaire, CNRS Orléans Synchrotron Soleil - Division Expériences Saint Aubin - BP 48 91192 Gif sur Yvette Cedex, France Tel. +33-1 69 35 97 15 E-Mail: hinsen ät cnrs-orleans.fr



More information about the NumPy-Discussion mailing list