Added transformation matrix reshape to pass tests