Context Since numpy version 1.16, if you access multiple fields of a structured array, the dtype of the resulting array will have the same item size as the original one, leading to extra “padding”: The new behavior as of Numpy 1.16 leads to extra “padding” bytes at the location of unindexed fields compared to 1.15. You will need to update
Tag: structured-array
Finding matching subset of “row” in a numpy structured array
I have data stored in a NumPy structured array where part of the information identifies various cases. I would like to find the row that matches a given case. E.g., let’s say I’m storing the name of a building, room number, and the number of chairs and tables in the room in a (2,) array. This would then look something