[SciPy-Dev] Enhancements to scipy.spatial.cKDTree

Sturla Molden sturla@molden...
Mon Jul 16 07:54:53 CDT 2012

Den 16.07.2012 02:00, skrev Patrick Varilly:
> * I get the issues with int vs np.int <http://np.int> vs np.npy_intp, 
> but is there really any SciPy-supported platform in which double 
> doesn't mean np.float64_t?

Sorry, I misread you question. (I don't speak English natively.)

np.float64_t is the C typedef corresponding to np.float64, i.e. npy_float64.
np.double_t is the C typedef corresponding to np.double, i.e. npy_double.

Both are C double by definition, AFAIK.

So on the C side we could use them interchangeably on all platforms I 
know about. So this is more pedantery, unless there are very strange 
platforms I don't know about.

Well, internally on x86 a C double is 80 bits, I don't know if 
npy_float64 sets the mantissa of the FPU to 53 bits or not. (You might 
ask on the NumPy list.) But np.float64_t will ensure consistency with 
NumPy and KDTree.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20120716/63a1ce07/attachment.html 

More information about the SciPy-Dev mailing list