Human: k random element from array. Assistant: 
Here is a Python function to k random element from array

import numpy as np

def random_element(array, k):
    """
    Returns k random elements from array.
    """
    return np.random.choice(array, k)

# Enter the array
array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# Enter the number of elements to be selected
k = 3

# Calling the function
print((random_element(array, k)))

#Example Output
# [ 9  5 10]

#Remember to inspect code for bugs.