human
Can you show me a Python function to mask a numpy array.
assistant
Here is a Python function to mask a numpy array

import numpy as np

def mask_array(array, mask):
    """
    Mask a numpy array.
    """
    return array[mask]

# Enter the array
array = np.arange(10)

# Enter the mask
mask = [True, False, True, True, False, True, True, False, True, True]

# Calling the function
print((mask_array(array, mask)))

#Example Output
# [0 2 3 5 6 8 9]

#Remember to inspect code for bugs.