`data.shape` has not been checked, so `data.shape[:3]` could fail.