Use view rather than astype to avoid a copy