[Matrix-SIG] Bug in NumPy

hinsen@dirac.cnrs-orleans.fr hinsen@dirac.cnrs-orleans.fr
Tue, 5 Oct 1999 11:59:08 +0200


I just hit what I consider a bug in NumPy:

  from Numeric import *

  a = zeros((0,))
  print a
  print a[::-1]

prints:

  zeros((0,), 'l')
  [0]

I'd expect the reverse of nothing to be nothing! I also wonder where the
added element comes from - it is always zero, integer or float depending
on the array type.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------