[Numpy-discussion] Numarray: minor feature requests (setup.py and version info)

Eric Maryniak e.maryniak at pobox.com
Wed Jun 26 11:48:01 CDT 2002

Hello Perry,

On Wednesday 26 June 2002 19:29, Perry Greenfield wrote:
> ...
> > 2. Because I'm running two versions of Python (because Zope
> >    and a lot of Zope/C products depend on a particular version)
> >    the 'development' Python is installed in /usr/local/bin
> >    (whereas SuSE's python is in /usr/bin).
> >    It probably wouldn't do any harm if the manual would include
> >    a hint at the '--prefix' option and mention an alternative
> >    Python installation like:
> >
> >        /usr/local/bin/python ./setup.py install --prefix=/usr/local
> Good idea.

And perhaps another suggestion: no mention is made of the 'setupall.py'
script... and setup.py does _not_ install the LinearAlgebra2 (including
our favorite SVD ;-), Convolve, RandomArray2 and FFT2 packages.
I successfully installed them with:

    python ./setupall.py install

Other minor notes:
#1: No FFT2.pth file is generated (the others are ok).
    It should just include the string 'FFT2'.
#2: While RandomArray2 etc. nicely stay away from a concurrently imported
    Numeric.RandomArray, shouldn't Convolve, for orthogonality, be named
    Convolve2? (cuz who knows, numarray's Convolve may be backported
    to Numeric in the future, for comparative testing etc.).
    Of course in the end, when numarray is to replace Numeric, the '2'
    could be dropped altogether (breaking some programs then ;-)
#3: LinearAlgebra2, RandomArray2 and Convolve have empty __doc__ 's.
    FFT and these 3 have no __version__ attributes, either (like numarray
    itself, too).
    Module sys uses a tuple 'version_info':
        >>> sys.version_info
        (2, 2, 1, 'final', 0)
    allowing fine-grained version testing and e.g. conditional importing
    etc. based on that. This may be a good idea for numarray, where
    interfaces may change and you could thus allow your code to support
    multiple (or rather, evolving) versions of numarray.
    Btw: imho __versioninfo__ or just __version__ would be a better
    standard attribute (for all modules) allowing a standard way of
    testing for major/minor version number, if __version__[0] >= 2: etc()
    Ideally, numarray's sub-packages' numbers would be in sync with that
    of numarray itself.
    Numeric's __version__ is a string, which is not so handy, either.
#4: It is very helpful that there are a large number of self-tests of
    the packages, together with expected values. E.g.:

Average of  10000 chi squared random numbers with 11 degrees of freedom
(should be about  11 ): 11.0404176623
Variance of those random numbers (should be about  22 ): 21.6517761217
Skewness of those random numbers (should be about  0.852802865422 ): 0.718573002875

    But sometimes you wonder (e.g. 0.85 / 0.71) if deviations are not
    too serious. Perhaps a 95%-int or std.dev. could be added?

> >...
> Thanks very much for the feedback.
> Perry

You're welcome, they're just minor things one notices in the
beginning and tends to ignore later; please say so if this kind
of feedback should be postponed for later.


Eric Maryniak <e.maryniak at pobox.com>
WWW homepage: http://pobox.com/~e.maryniak/
Mobile phone: +31 6 52047532, or (06) 520 475 32 in NL.

Puzzle: what's another word for synonym?

More information about the Numpy-discussion mailing list