implement Matrix.dup() close #3