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?
asked Jul 5, 2011 at 15:16
user3262424
7,50916 gold badges60 silver badges86 bronze badges
1 Answer 1
Here's one quick-and-dirty method:
>>> A = ((ctypes.c_float * 10) * 10)
>>> a = A()
>>> a[5][5]
0.0
answered Jul 5, 2011 at 15:30
senderle
152k36 gold badges218 silver badges244 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-py