5

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?

1 Answer 1

9

Here's one quick-and-dirty method:

>>> A = ((ctypes.c_float * 10) * 10)
>>> a = A()
>>> a[5][5]
0.0
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.