Infinite in `histogram()` function

Hello,
is there any way to provide an infinite value when setting the bins for the histogram function?
I want something like:

histogram(
  column: "_value",
  upperBoundColumn: "le",
  countColumn: "_value",
  bins: [50.0, 75.0, 90.0, +Inf]
)

What should I put in place of +Inf?

I know that I can get an infinite value using the linearBins function as bins: linearBins(start:0.0, width:10.0, count:10) but I would like to keep my custom thresholds.
Thanks

1 Like

@eloparco You can just convert the string +Inf into a float. Right now, Flux doesn’t recognize the +Inf identifier as a float value.

histogram(
  column: "_value",
  upperBoundColumn: "le",
  countColumn: "_value",
  bins: [50.0, 75.0, 90.0, float(v: "+Inf")]
)
1 Like

Thanks, indeed this is the answer! :slight_smile:

@eloparco You can just convert the string +Inf into a float. Right now, Flux doesn’t recognize the +Inf identifier as a float value. I think this will help you. :slightly_smiling_face:

1 Like