Hi, * Sebastian <se...@sebix.at> [2014-12-13]: > I'll just comment on the creation of your dtype: > > > dt = [("<f8", "<f8")] > > You are creating a dtype with one field called '<f8' and with type '<f8': > > >>> dt = [("<f8", "<f8")] > >>> dty = np.dtype(dt) > >>> dty.names > > ('<f8',) > > What you may want are two fields with type '<f8' and without fieldname: > > >>> dt = [("<f8", "<f8")] > >>> dty = np.dtype(('<f8,<f8')) > >>> dty.names > > ('f0', 'f1') > >>> dty.descr > > [('f0', '<f8'), ('f1', '<f8')]
Apologies for this oversight on my part. You are right of course. I chose my example badly. Perhaps I should have chosen: arr = numpy.array([('a', 1), ('b', 2)], dtype=[('a', 'S1'), ('b', 'f8')]) V- _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion