Hi Travis, Could you look over the thread about dtype comparisons<http://thread.gmane.org/gmane.comp.python.numeric.general/41074/focus=41082>and offer an opinion? TIA, Chuck
Thanks for pointing out the discussion. This is an oversight. The dtypes should not compare equal if the subarrays don't match. If the patch looks OK, then we should accept it. Travis -- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Oct 29, 2010, at 9:20 AM, Charles R Harris <charlesr.harris@gmail.com> wrote:
Hi Travis,
Could you look over the thread about dtype comparisons and offer an opinion?
TIA,
Chuck _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Hi Travis! Fri, 29 Oct 2010 17:40:20 -0400, Travis Oliphant wrote:
Thanks for pointing out the discussion. This is an oversight. The dtypes should not compare equal if the subarrays don't match.
If the patch looks OK, then we should accept it.
Another issue from the thread where you might want to chip in:
x = np.zeros((2, 3), dtype=[('a', 'f8', (4,))]) x.T['a'].shape (4, 3, 2) x.T.copy()['a'].shape (3, 2, 4)
Fortran-order is special-cased. We might want to change this to work like so:
x.T['a'].shape (3, 2, 4)
which is more predictable. -- Pauli Virtanen
Yeah. This does look odd and should be fixed. -- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Oct 29, 2010, at 6:10 PM, Pauli Virtanen <pav@iki.fi> wrote:
Hi Travis!
Fri, 29 Oct 2010 17:40:20 -0400, Travis Oliphant wrote:
Thanks for pointing out the discussion. This is an oversight. The dtypes should not compare equal if the subarrays don't match.
If the patch looks OK, then we should accept it.
Another issue from the thread where you might want to chip in:
x = np.zeros((2, 3), dtype=[('a', 'f8', (4,))]) x.T['a'].shape (4, 3, 2) x.T.copy()['a'].shape (3, 2, 4)
Fortran-order is special-cased. We might want to change this to work like so:
x.T['a'].shape (3, 2, 4)
which is more predictable.
-- Pauli Virtanen
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (3)
-
Charles R Harris
-
Pauli Virtanen
-
Travis Oliphant