If a has more than two dimensions, then broadcasting rules apply [...]. This means that SVD is working in “stacked” mode: it iterates over all indices of the first a.ndim - 2 dimensions and for each combination SVD is applied to the last two indices.
From numpy doc:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.svd.html
When calculating the derivatives for SVD chumpy assumes 2D arrays:
line 196 of
linalg.py
:line 214ff of
linalg.py
The only workaround I see right now is looping over the dimensions outside of SVD (slow).