fixed subtlety of matrix vs. ndarray dimensions