[Numpy-discussion] 1.1 dev on the trunk and the road to 1.2

Charles R Harris charlesr.harris at gmail.com
Wed May 14 06:26:55 EDT 2008


On Wed, May 14, 2008 at 1:47 AM, Travis E. Oliphant <oliphant at enthought.com>
wrote:

> Eric Firing wrote:
> > Jarrod Millman wrote:
> >
> >> On Tue, May 13, 2008 at 9:39 PM, Charles R Harris
> >> <charlesr.harris at gmail.com> wrote:
> >>
> >>> I was getting ready to add a big code cleanup, so you lucked out ;)
> Let's
> >>> get this release out as quickly as possible once masked arrays are
> ready to
> >>> go.
> >>>
> >> What is left to do for the masked arrays?  Just want to make sure I
> >> haven't missed something.
> >>
> >> Thanks,
> >>
> >>
> >
> > Masked arrays: the only thing I know of as a possibility is the
> > suggestion that the new code be accessible with a DeprecationWarning
> > from numpy.core as well as from numpy.  I'm neutral on this, and will
> > not try to implement it.
> >
> > All is not yet well in matrix land; the end of the numpy.test() output
> is:
> >
> > ======================================================================
> > ERROR: check_array_from_matrix_list
> > (numpy.core.tests.test_defmatrix.TestNewScalarIndexing)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >    File
> >
> "/usr/local/lib/python2.5/site-packages/numpy/core/tests/test_defmatrix.py",
> > line 194, in check_array_from_matrix_list
> >      x = array([a, a])
> > ValueError: setting an array element with a sequence.
> >
> > ======================================================================
> > FAIL: check_dimesions
> > (numpy.core.tests.test_defmatrix.TestNewScalarIndexing)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >    File
> >
> "/usr/local/lib/python2.5/site-packages/numpy/core/tests/test_defmatrix.py",
> > line 190, in check_dimesions
> >      assert_equal(x.ndim, 1)
> >    File "/usr/local/lib/python2.5/site-packages/numpy/testing/utils.py",
> > line 145, in assert_equal
> >      assert desired == actual, msg
> > AssertionError:
> > Items are not equal:
> >   ACTUAL: 2
> >   DESIRED: 1
> >
> > ----------------------------------------------------------------------
> > Ran 1004 tests in 1.534s
> >
> > FAILED (failures=1, errors=1)
> > Out[2]:<unittest._TextTestResult run=1004 errors=1 failures=1>
> >
>
> I'm aware of these errors.   I will try to clean them up soon by fixing
> the dimension reduction assumption mistakes.
>

Nah, leave it. You not only have to fix the descent in dimensions, you will
have to fix PyArray_From DescAndData (or whatever it is). I vote for simply
noting that x = array([a, a]) won't work, and keep it around as a reminder
of what a horrible mistake the current Matrix implementation is. The code is
difficult as it is, and if we keep this up it will start looking like
windows with 15 years of compatibility crud.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080514/7ef2582a/attachment.html>


More information about the NumPy-Discussion mailing list