original_docstring: 
          Calculate a 2-d probability density surface using kernel density
          estimation.
  
          :param tracks: Collection of :class:`Track` objects.
          
docstring: Calculate a 2-d probability density surface using kernel density
  estimation.
docstring_tokens: Calculate a 2 - d probability density surface using kernel density estimation .
code: def calculatePDF(self, tracks):
          """
          Calculate a 2-d probability density surface using kernel density
          estimation.
  
          :param tracks: Collection of :class:`Track` objects.
          """
  
          if len(tracks) == 0:
              # No tracks:
              return np.zeros(self.X.shape)
  
          lon = np.array([])
          lat = np.array([])
          for t in tracks:
              lon = np.append(lon, t.Longitude)
              lat = np.append(lat, t.Latitude)
  
          xy = np.vstack([self.X.ravel(), self.Y.ravel()])
          data = np.array([[lon], [lat]])
  
          kde = KDEMultivariate(data, bw='cv_ml', var_type='cc')
          pdf = kde.pdf(data_predict=xy)
  
          return pdf.reshape(self.X.shape)
code_tokens: def calculatePDF ( self , tracks ) : if len ( tracks ) == 0 : return np . zeros ( self . X . shape ) lon = np . array ( [ ] ) lat = np . array ( [ ] ) for t in tracks : lon = np . append ( lon , t . Longitude ) lat = np . append ( lat , t . Latitude ) xy = np . vstack ( [ self . X . ravel ( ) , self . Y . ravel ( ) ] ) data = np . array ( [ [ lon ] , [ lat ] ] ) kde = KDEMultivariate ( data , bw = 'cv_ml' , var_type = 'cc' ) pdf = kde . pdf ( data_predict = xy ) return pdf . reshape ( self . X . shape )
short_docstring: Calculate a 2-d probability density surface using kernel density
  estimation.
short_docstring_tokens: Calculate a 2 - d probability density surface using kernel density estimation .
comment: """
          Calculate a 2-d probability density surface using kernel density
          estimation.
  
          :param tracks: Collection of :class:`Track` objects.
          """$SEP$# No tracks: