On of the devs can correct me if I’m wrong, but under the hood PyMC uses a package called Aesara to handle all the math stuff. Aesara has its own versions of all the usual math functions. pm.math points to those functions, but Aesara is smart enough to swap out most “routine” numpy functions like np.exp, np.log, and whatnot with the Aesara versions.
Despite this, using pm.math is best practice because you’ll never be surprised by odd corner cases.