Housekeeping enzyme that catalyzes the last step in proline biosynthesis. In some cell types, such as erythrocytes, its primary function may be the generation of NADP(+). Can utilize both NAD and NADP. Has higher affinity for NADP, but higher catalytic efficiency with NADH (PubMed:2722838, PubMed:6894153). Involved in cellular response to oxidative stress (PubMed:25865492).