0
を返しません。Pythonのctypesの配列は、これは動作しません正しく
def CopyExportVars(self, n_export):
export_array = (ctypes.c_double * n_export)()
self.dll_handle.vs_copy_export_vars(ctypes.cast(export_array, ctypes.POINTER(ctypes.c_double)))
return export_array().contents
私はこのエラーを取得する(n_export
である3):
TypeError: 'c_double_Array_3' object is not callable
'export_array.contents'返しますか? –
@ŁukaszRogalskiは括弧を付けずに、 'contents'という属性がないことを訴えています。 – Jiminion
これは申し訳ありませんが、 'export_array'は値でありポインタではありません。それは 'ctypes'配列なので、値を撤回するためにインデックスを作成することができます。' export_array [0] 'はすべてexport_array [n_export-1]' –