code: def cfloat32_array_to_numpy(cptr, length):
      
      if isinstance(cptr, ctypes.POINTER(ctypes.c_float)):
          return np.fromiter(cptr, dtype=np.float32, count=length)
      else:
          raise RuntimeError('Expected float pointer')
docs: Convert a ctypes float pointer array to a numpy array.