[Numpy-discussion] A few comments (MDP conversion)

Pietro Berkes berkes at gatsby.ucl.ac.uk
Thu Jul 13 09:11:00 EDT 2006


Dear numpys,

a couple of weeks ago Tiziano and I completed the conversion of our data
processing library MDP to numpy. We collected a few ideas and
questions:

- we found the convertcode.py module quite useful to perform a first,
  low-level conversion. We had some problem when 'typecode' was
  used as a keyword argument because the parser only converts
  'typecode=' to 'dtype=' and skips the cases where there is an
  additional space character before the equal sign ('typecode =').
  Other names that might be easily converted are 'ArrayType' and
  'NewAxis'.

- some functions changed the columns/rows conventions ('cov', for
  example). It would be really helpful to explicitly write this in the
  list of necessary changes in the documentation.  It could be nice
  to have the file 'convertcode.py' to print a warning every time one 
  of this functions is used in the code.

- the linalg functions svd, eig, inv, pinv, diag, and possibly
  others perform an upcast, e.g. from 'f' to 'd'. This is apparently
  because the litelapack module only wraps double precision routines.
  Wouldn't it be more consistent to cast the results back to the
  numerical type of the input? Otherwise, the user always has to take
  care of the casting, which makes the use of single precision
  arrays quite cumbersome.

- we found a bug in the 'eig' function in the case the solution
  is complex: in (linalg.py, line 269) 'Complex' should be 'w.dtype'

We wondered whether it would be possible to obtain SVN write access in 
orderto be able to fix this kind of issues by ourselves in the future.  
We could also contribute docstrings for some of the functions.

In general, we found the conversion to numpy quite straightforward
and would like to thank you all for the great work!

Cheers,
Pietro Berkes and Tiziano Zito
http://mdp-toolkit.sourceforge.net/




More information about the NumPy-Discussion mailing list