<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Using a given array of numbers, create a function to display the frequency of each number.
<|im_end|>
<|im_start|>assistant
def frequency(array):
    count = {}
    # Count the number of occurances
    for element in array:
        if element not in count:
            count[element] = 1
        else:
            count[element] += 1

    # Display the count
    for element in count:
        print("Number {} occurs {} times".format(element, count[element]))<|im_end|>
