pinv_extended