histogram function
Implementation
(VARP, VARP) histogram(VARP x, {int bins = 10, (int, int)? range}) {
final (min, max) = range ?? (F.reduceMin(x).value.toInt(), F.reduceMax(x).value.toInt());
final hist = F.histogram(x, bins, min, max);
final binEdges = linspace<float32>(min, max, count: bins + 1);
return (hist, binEdges);
}