Are numpy
structured arrays an alternative to Python dict
?
I would like to save memory and I cannot affort much of a performance decline.
In my case, the keys are str
and the values are int
.
Can you give a quick conversion line in case they actually are an alternative?
I also don't mind if you can suggest a different alternative.
I need to save memory, because some dictionaries get larger than 50Gb in memory and I need to open multiple at a time with 'only' 192 GB RAM available.