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

Answer by tktk for How to define dictionary structure in ndarray

$
0
0

AFAIK there is none. The best you can do is define dtype = object (which is what you'll get if you try setting dtype=dict, for example) - and then populate it manually. Nothing will ensure the structure ("syntax", as you call it) of the dictionary - you can use a class for that.

However, please note that numpy is optimized for scalar variables and your usage is very odd.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>