Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

frecuency (count) in Numpy Array

Hi experts!

For a list (L) the command L.count(z) shows the number of times that the element 'z' is repeated in list 'L'.

For example:

[I] L=[1,1,3,1,4,5,8] [I] L.count(1) [O] 3.

How can i do that with a Numpay array?

Waiting for your answers.

Thanks a lot!

click to hide/show revision 2
code formatting + typos

frecuency frequency (count) in Numpy Array

Hi experts!

For a list (L) L the command L.count(z) L.count(z) shows the number of times that the element 'z' z is repeated in list 'L'.L.

For example:

[I] L=[1,1,3,1,4,5,8]
[I] L.count(1)
[O] 3.

3

How can i do that with a Numpay Numpy array?

Waiting for your answers.

Thanks a lot!