Here's the culprit. flat returns an iterator which will not provide expected access to axes in a callback context. FYI @Eric89GXL @agramfort