code: def sampleLocationFromFeature(self, feature):
      
      if feature == "surface":
        coordinates = [random.gauss(0, 1.) for _ in xrange(self.dimension)]
        norm = sqrt(sum([coord ** 2 for coord in coordinates]))
        return [self.radius * coord / norm for coord in coordinates]
      elif feature == "random":
        return self.sampleLocation()
      else:
        raise NameError("No such feature in {}: {}".format(self, feature))
docs: Samples a location from the provided specific feature.
  
      In the case of a sphere, there is only one feature.