No, numpy bincount only works with one-dimensional arrays. If you have a 2D array, you can flatten it into a 1D array using the flatten() method or the ravel() function before using numpy bincount.
Copyright QStack.ai, 2010-2023. Content on this site is licensed under the Creative Commons Attribution Share Alike 3.0 license.