Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chancyk committed Dec 19, 2024
1 parent cd81a5c commit 64ff098
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/derichekde.nim
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ proc density_1d*(
adjust: float = 1.0,
pad: int = 3,
bins: int = 512
): (seq[float], float, float) =
): tuple[density: seq[float], lo: float, hi: float] =

var w: seq[float]
if weight.len == 0:
Expand All @@ -265,7 +265,7 @@ proc density_1d*(
else:
(lo, hi) = extent

let grid = bin1d(data, w, lo, hi, bins)
let grid = bin_1d(data, w, lo, hi, bins)
let delta = (hi - lo) / float(bins - 1)
let neg = has_negative(grid)

Expand Down
2 changes: 1 addition & 1 deletion src/derichekde/common.nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ proc nrd*(data: var openArray[float]): float =
return 1.06 * v * pow(n, -0.2)


proc bin1d*(
proc bin_1d*(
data: openArray[float], weight: openArray[float],
lo: float, hi: float, n: int
): seq[float] =
Expand Down

0 comments on commit 64ff098

Please sign in to comment.