mllg / checkmate

Fast and versatile argument checks
https://mllg.github.io/checkmate/
Other
261 stars 30 forks source link

Handle long vectors in min/max checking. #231

Closed rorynolan closed 2 years ago

rorynolan commented 2 years ago

With the current package, the following code

checkmate::assert_numeric(rep(0, 2^33), min = 0)

produces the error

Error in checkmate::assert_numeric(img, lower = 0) :
long vectors not supported yet: ../../src/include/Rinlinedfuns.h:537

Changing a couple of length()s to xlength()s in checks.c fixes this.

mllg commented 2 years ago

Thanks! Note that there are likely to be more issues with long vectors, I need to test this thoroughly as soon as I find the time.