<human>:  Python function to array get element by index with default.
<bot>:

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

# Calling the function
print((get_element(array, 2)))

#Example Output
# 2

#Remember to inspect code for bugs.