[Numpy-discussion] numpy.dot gives wrong results with floats?

Sasha ndarray at mac.com
Wed Mar 1 11:29:10 CST 2006


On 3/1/06, Travis Oliphant <oliphant.travis at ieee.org> wrote:
> ...
> Feel free to contribute more tests.

There are some things that we can do to help users contribute tests. 
Before I make specific suggestions, let me just express an opinion
that developers are less likely to write effective tests than users
because they tend to overlook in testing exactly the same cases that
they get wrong in coding.

Here are the things that we can do:

1. Documentation.  Tell users how to submit bug reports that can be
immediately converted into unit tests.

2. Improve NumpyTest: add facilities to generate test data with
various shapes and datatypes and filled with wide range of values:
extremely large/small numbers, IEEE special values, etc. Add routines
to automatically test universal functions on all datatypes.  Automate
consistency checks - when appropriate check that computations on
different datatypes produce similar results.

3. Add support for doctests.  This is probably the simplest type of
test that a user can produce - just cut and paste from python session.
 Doctests can be placed in separate files and don't need to clutter
real documentation.  Python 2.4 contains code integrating doctests and
unit tests and that code has 95% of what is needed.  If we have to
support 2.3, it may be appropriate to distribute a backport with
numpy.  The remaining 5% include support for ipython sessions, maybe
better output checking for printed arrays (such as scan through to a
closing paren rather than an empty line etc.).

Any volunteers?  I guess the first step would be to put up a wiki
page. Since this is really a developers/advanced users project it
belongs to the "hard hat" area.




More information about the Numpy-discussion mailing list