Fixed subtle bug with respect to Matrix (and therefore DistMatrix) unnecessary allocating memory when shrinking a view and also fixing a typing issue in the SWIG code