Skip to content

Commit 6dbb95b

Browse files
authored
fix: Only bare double to be cast to integer in pl$linear_spaces's num_samples (#1492)
1 parent 4e3406d commit 6dbb95b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/functions-range-linear_space.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pl__linear_spaces <- function(
9292
check_dots_empty0(...)
9393
# Non-integer values are rejected in the Rust function but we want to allow
9494
# num_samples = 3 for instance (for a better user experience).
95-
if (is_integerish(num_samples)) {
95+
if (is_bare_double(num_samples) && is_integerish(num_samples)) {
9696
num_samples <- as.integer(num_samples)
9797
}
9898
closed <- arg_match0(closed, values = c("both", "left", "none", "right"))

0 commit comments

Comments
 (0)