Python:使用ctypes的多维数组?

Python:使用ctypes的多维数组?,python,ctypes,Python,Ctypes,如何使用python中的ctypes定义多维浮点数组 可以定义的维度数量有限制吗?这里有一个快速而肮脏的方法: >>> A = ((ctypes.c_float * 10) * 10) >>> a = A() >>> a[5][5] 0.0

如何使用
python
中的
ctypes
定义多维浮点数组


可以定义的维度数量有限制吗?

这里有一个快速而肮脏的方法:

>>> A = ((ctypes.c_float * 10) * 10)
>>> a = A()
>>> a[5][5]
0.0