human
get number of nonzero values in array.
assistant
Here is a Python function to get number of nonzero values in array

import numpy as np

def nonzero_values(array):
        """
        Return the number of nonzero values in the array.
        """
        return len(array[array!= 0])

# Enter the array
array = np.array([1, 2, 3, 4, 5])

# Calling the function
print((nonzero_values(array)))

#Example Output

# 5

#Remember to inspect code for bugs.