简体   繁体   中英

Python: Multi-Dimensional Array Using ctypes?

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

Is there a limitation to the 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM