np.mean() of a DenseMatrix, across one axis, should return a DenseVector of the means. Instead, it returns a DenseMatrix wrapping a vector, which is just all kinds of bad.
Fixing this will require either (a) digging into the subclass magic, or (b) making DenseMatrix and DenseVector actually the same class.
Workaround: run np.asarray() on it first.