Added a check if matrix is rectangular before transposing
Added a check if matrix is rectangular before transposing

anders9ustafsson/framework,anders9ustafsson/framework,anders9ustafsson/framework,anders9ustafsson/framework,anders9ustafsson/framework