开发者

Python: Multi-Dimensional Array Using ctypes?

开发者 https://www.devze.com 2023-03-17 05:03 出处:网络
How do I define a multi-dimensional float array using ctypes in python? Is there a limitation to the开发者_如何学Go number of dimensions that can be defines?Here\'s one quick-and-dirty method:

How do I define a multi-dimensional float array using ctypes in python?

Is there a limitation to the开发者_如何学Go number of dimensions that can be defines?


Here's one quick-and-dirty method:

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

精彩评论

暂无评论...
验证码 换一张
取 消