optimizes matrix resizing when the number of columns stays the same
optimizes matrix resizing when the number of columns stays the same

dassencio/freeaml,dassencio/freeaml,dassencio/freeaml,dassencio/freeaml