use PDL; use PDL::Transform; @a = [[1,0,0],[0,1,0],[0,0,1]]; $c= pdl @a; $e = t_rot(45,45,45); $c = $e * $c print $c;