code: def sph2cart(lon, lat):
      
      x = np.cos(lat)*np.cos(lon)
      y = np.cos(lat)*np.sin(lon)
      z = np.sin(lat)
      return x, y, z
docs: Converts a longitude and latitude (or sequence of lons and lats) given in
      _radians_ to cartesian coordinates, `x`, `y`, `z`, where x=0, y=0, z=0 is
      the center of the globe.
  
      Parameters
      ----------
      lon : array-like
          Longitude in radians
      lat : array-like
          Latitude in radians
  
      Returns
      -------
      `x`, `y`, `z` : Arrays of cartesian coordinates