Make `greta::round` use tensorflow digits arg instead of warning
Open
- Dominant language
- C++
- Stars
- 607
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
Description
See https://forum.greta-stats.org/t/rounding-error-stan-model-in-greta/324/6 from @goldingn
- something like:
```r
tf_round <- function(x, digits) {
# round the digits to nearest integer, to match R's round behaviour
digits <- tf$round(digits)
# convert to a factor of 10
factor <- fl(10) ^ digit
# scale, round to integer, unscale
tf$round(x * factor) / factor
}
```
Contributor guide
Assessment
This issue has not been assessed yet.