Skip to content

Commit

Permalink
Merge branch 'v2.0' of http://github.com/GeoscienceAustralia/tcrm int…
Browse files Browse the repository at this point in the history
…o v2.0
  • Loading branch information
wcarthur committed Mar 9, 2017
2 parents 1d7b2be + 47b4378 commit 51d8859
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions StatInterface/KDEParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def generateKDE(self, parameters, kdeStep, kdeParameters=None,
data (e.g. day of year). If given, it should
be the period of the data (e.g. for annual data,
``periodic=365``).
:type periodic: boolean or float, default=``False``
:type periodic: boolean or int, default=``False``
:param missingValue: Missing values have this value (default
:attr:`sys.maxint`).
Expand Down Expand Up @@ -139,8 +139,9 @@ def generateKDE(self, parameters, kdeStep, kdeParameters=None,
self.pdf = self._generatePDF(self.grid, bw, self.parameters)

if periodic:
self.pdf = 3.0*self.pdf[(periodic/kdeStep):2*(periodic/kdeStep)]
self.grid = self.grid[(periodic/kdeStep):2*(periodic/kdeStep)]
idx = int(periodic/kdeStep)
self.pdf = 3.0*self.pdf[idx:2*idx]
self.grid = self.grid[idx:2*idx]

self.cy = stats.cdf(self.grid, self.pdf)
if kdeParameters is None:
Expand Down

0 comments on commit 51d8859

Please sign in to comment.