cluster_toolkit icon indicating copy to clipboard operation
cluster_toolkit copied to clipboard

Properly cast arrays before calling C code

Open tmcclintock opened this issue 6 years ago • 0 comments

This is actually two issues.

  1. Arrays in Python can sometimes not be C-ordered and require a numpy.ascontiguousarray() call. This can be handled internally in the toolkit.

  2. 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.

tmcclintock avatar Dec 28 '17 23:12 tmcclintock