A grade of “NP” will not affect your GPA. The UCs do not convert it to a “D” or an “F”. However, private universities and grad schools would most likely consider it as a failing grade and factor it into your undergraduate GPA.
The UCs and CSUs will not care about the NP since you will be replacing it with a passing grade. I believe that NPs are technically neutral on admissions even if not passed subsequently. However, this would not be the case in regard to prerequisites. Either way, it is best to simply retake any class that one does not pass.
Good luck!
Edit: And I am sure you have already verified this, but make sure taking the prerequisite as P/NP is acceptable over a letter grade.