On Mar 12, 10:26 am, Larry <[EMAIL PROTECTED]> wrote:
> I'm new to Python. I have a file (an image file actually) that I need
> to read pixel by pixel. It's an 8-bit integer type. I need to get the
> statistics like mean, standard deviation, etc., which I know a little
> bit already from reading numpy module. What I want to know is how to
> get the number of occurences of numeric element in an array. Say,
Something like this should do the job:
histogram = [0] * 256
for x in my_array:
histogram[x] += 1
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list