Dear, All,

just wanted to confirm with you whether there exists a built-in function in Mata to calculate the equivalent of python's

No problem implementing this with nested loops. Just looking for a built-in function if available.

Thank you, Sergiy

just wanted to confirm with you whether there exists a built-in function in Mata to calculate the equivalent of python's

*, which reports the number (count) of the elements of a matrix that are different from zero.***count_nonzero()**No problem implementing this with nested loops. Just looking for a built-in function if available.

Thank you, Sergiy

## Comment