With numpy 1.5.1: Python 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec 3 2010, 15:41:32) [GCC 4.0.1 (Apple Inc. build 5488)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from numpy import array >>> x = array((1.2, 2.3), dtype=[('field1', float), ('field2', float)]) >>> x.astype(object) array((1.2, 2.3), dtype=object) >>>
So the conversion from the structured dtype item to type 'object' produces a tuple, which makes sense. With numpy 1.6.0, the same computation gives a different result, apparently truncating the tuple: Python 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec 3 2010, 15:41:32) [GCC 4.0.1 (Apple Inc. build 5488)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from numpy import array >>> x = array((1.2, 2.3), dtype=[('field1', float), ('field2', float)]) >>> x.astype(object) array(1.2, dtype=object) >>> Was this change intentional, or should I file a bug? I couldn't find any reference to it in the changelog or release notes. Thanks, Mark _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion