Numerical Python Version 1.1

Release Notes 3/11/97 Paul F. Dubois

Distributed as a public service by X-Division, Lawrence Livermore National Laboratory.

This is the first public release of the Numerical Python package since LLNL has taken over custody of it from Jim Hugunin. We have not been able to do anything much yet in the way of quality control or testing. In the future we plan to restructure the distribution as a set of packages. However, in this release everything is simply lumped in together.

How to make the NumPy packages from the sources

NumPy consists of a number of separate dynamically-loadable modules and a set of Python source (.py) files. The Python source files are all in the Lib directory. They need to be installed somewhere in the Python search path. The C modules are built into shared libraries and the shared libraries need to be installed into the search path.

On Windows, the shared libraries are produced in a subdirectory named pyds. A .pyd file is a Windows DLL renamed to have the .pyd extension, which Python recognizes. On Unix, the shared library might be called .so or .sl and is produced in the top-level directory.

On Unix: Get the file Makefile.pre.in from your Python installation and put it in the NumPy directory. Then execute python makenumpy.py followed by make; or follow the directions in the Makefile.pre.in file.

On Windows with Microsoft Visual C++ 5.0:

  • c:\wherever> python makenumpy.py
  • c:\wherever> msdev workspace.dsw
    [Go to "Build", pull down "Batch Build", do "Build All", exit DevStudio]
  • In both cases you then need to install the resulting shared libraries and the contents of the directory Lib into your Python path. We do not have an automatic installation script at this time.

    Changes from the last version as distributed by Konrad Hinsen are:

    1. ArrayPrinter.py

    Fixed a bug. (Lee Busby)

    2. LinearAlgebra.py / lapack_litemodule.c

    The only difference from a user's point of view is in LinearAlgebra.singular_value_decomposition(). This function now takes a second optional argument which defaults to zero. Zero means that only the singular values and singular vectors are returned. One (or non-false) means that square matrices containing the singular vectors and a basis for the complementary space of the singular vectors are returned. (Konrad Hinsen)

    3. Added tool to help make NumPy on Windows / Unix and a Windows binary installer. (Dubois, Ascher, Hinsen)

    4. Note that compared to the last version distributed by Jim Hugunin, this version now uses Hinsen's method of improved dynamic loading. This requires you to add the following statement to the initialization section of any C extension module that uses C API arrayobject.h:

    #include "arrayobject.h" 
    .... during module initialization 
    import_array(); 

    To-Do List (Suggestions welcomed.)

    1. Add a Fortran interface to the API: This is to allow interfacing to Fortran libraries without transposing 2+ dimensional arrays. Current thinking is to add some new functions to the API: PyFortranArray_FromDims, etc., which are a thin wrapper around their non-Fortran counterparts.
    2. Add the ability to handle ``missing'' values: Current plan is to investigate using one of the IEEE silent NaN's to represent missing data. This approach might founder if people want to BOTH use missing data AND handle IEEE floating point exceptions. We at LLNL have little experience in this area. Input regarding the desired semantics for missing values is requested.
    3. Modify umathops.py to incorporate K. Hinsen's changes in umathmodule.c and fast_umathmodule.c: The two .c files are designed to be generated from this python script. Hinsen made changes before he was aware of umathops.py. We need to back those changes into the script.  (The file umathops is not distributed).
    4. Put PyFPE_START_PROTECT and PyFPE_END_PROTECT macros around "dangerous" sections of code in NumPy: Python-1.5 has standardized a method to handle IEEE floating point exceptions. In order to use the method, extensions need to protect sections where exceptions may occur. See Include/pyfpe.h for details.
    5. Normalize the formatting of the C source code in NumPy to ease reading and editing by human beings: 80 character lines, etc.
    6. Add support for one-bit arrays. [da]
    7. Make sure all appropriate functions support typecode argument (e.g. identity). [da]