Quantcast
Channel: How to define dictionary structure in ndarray - Stack Overflow
Viewing all articles
Browse latest Browse all 3

How to define dictionary structure in ndarray

$
0
0

I want to create a 3 dimensional array with each value in the array represents a dictionary.

For example: myArray[m][n][k] of type {'position':(0,0), 'boundary': [(8,8)(512,512)]}

I know that, it could be defined by specifying dtype parameter in numpy.ndarray

numpy.ndarray(shape=(m, n, k), dtype=...)

What should be the dtype to specify the exact dictionary syntax as above


Viewing all articles
Browse latest Browse all 3

Trending Articles