
Sept. 8, 2019
8:12 p.m.
Chris, In the ctypes wrapper we perform this test on entry: if (type(main_loop[0]) != float): #return an error message That's an imperfect test because lists can contain mixed types. To test an entire array would be a large performance penalty, so the developer must be sure that data passed in are all 64-bit float. Typically data passed into a ctypes wrapper are read from a data store because the arrays are large. When read from a data store, the developer specifies the data type like this: newarray = (ctypes.c_double * len(arr))(*arr). So that ensures all data are of the same type. Mark