I also wonder why we raise ValueError when a key is not found instead of KeyError or at least some kind of LookupError? I remember looking at StackOverflow for this, but I don't remember the reasoning anymore.
>>> arr['b4']
ValueError: 'b4' is not a valid label for any axis:
a [2]: 'a0' 'a1'
b [3]: 'b0' 'b1' 'b2'
Unsure which though.
Compare this with dict:
I also wonder why we raise ValueError when a key is not found instead of KeyError or at least some kind of LookupError? I remember looking at StackOverflow for this, but I don't remember the reasoning anymore.