Fix test failure due to wrong matrix shape in hyperexpand

Fix test failure due to wrong matrix shape in hyperexpand