# The bin2 function

**URL:** <https://discourse.julialang.org/t/the-bin2-function/70488>\
**Category:** General Usage\
**Tags:** tullio\
**Created:** [October 27, 2021, 3:03pm UTC](https://discourse.julialang.org/t/the-bin2-function/70488 "2021-10-27T15:03:24Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 1, 2021, 6:43pm UTC](https://discourse.julialang.org/t/the-bin2-function/70488/6 "2021-11-01T18:43:38Z")

</div>

Not as fast as the Tullio example but, fwiw, a good general solution can be found [in this post](https://discourse.julialang.org/t/there-is-an-analog-of-numpy-reduceat-in-julia/70187/4).

Do you know if it is possible to generalize Tulio’s approach for `k x k` bin sizes?

---

_[View the full topic](https://discourse.julialang.org/t/the-bin2-function/70488)._
