Hi,

Summary: Slicing seems to be broken with matrices now.

I eagerly installed the new beta, but soon stumbled over this
bug. I hope I'm missing something, but afaics that behavior used to be
different (and correct) before in 0.9.8. Don't know exactly when this
changed, though. I did a fresh install (uninstalled old numpy and also
matplotlib first) of the official binary for windows/python 2.4.

Example:

>>> import numpy as n
>>> n.__version__
'1.0b1'
>>> import numpy.matlib as m
>>> a = n.zeros((2,3))
>>> b = m.zeros((2,3))
>>> a[:1,:].shape
(1, 3)
>>> b[:1,:].shape
(3, 1)
>>>

Note the array slicing works correct, but the equivalent thing with the
matrix does not.

I also noticed the following (in a new python session) import strangeness:

>>> import numpy
>>> numpy.matlib.zeros((2,3))
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
AttributeError: 'module' object has no attribute 'matlib'
>>>

Why is the direct access to matlib impossible?

Either I'm missing something (I well may be, because I'm melting away at
36 centigrades or so...), or imho a new beta should be put out quickly
to enable further testing (and use).

Thanks,
Sven


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to