cluster_toolkit
cluster_toolkit copied to clipboard
Properly cast arrays before calling C code
This is actually two issues.
-
Arrays in Python can sometimes not be C-ordered and require a
numpy.ascontiguousarray()
call. This can be handled internally in the toolkit. -
Similarly, the C code in the toolkit assumes double precision (float64). If a numpy array is floating point precision (float32) then interpolation errors can occur. This can be handled with proper casting at the same time that issue (1) is handled.