On 02/22/2012 03:47 PM, Matthew Brett wrote: > Hi, > > I was gaily using np.longlong for casting to the highest available > float type when I noticed this: > > In [4]: np.array([2.1], dtype=np.longlong) > Out[4]: array([2], dtype=int64) > > whereas: > > In [5]: np.array([2.1], dtype=np.float128) > Out[5]: array([ 2.1], dtype=float128) > > This on OSX snow leopard numpies 1.2 .1 -> current devel and OSX tiger > PPC recent devel. > > I had the impression that np.float128 and np.longlong would be > identical in behavior - but I guess not?
A C long (and longlong) is an integer type. Were you expecting int128? -- Jonathan Niehof ISR-3 Space Data Systems Los Alamos National Laboratory MS-D466 Los Alamos, NM 87545 Phone: 505-667-9595 email: [email protected] Correspondence / Technical data or Software Publicly Available _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
