3D mathematical functions using NumPy