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 _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/3RD74SRQ7PMCD7RTNHOP72QQG5FTETHJ/ Code of Conduct: http://python.org/psf/codeofconduct/