human
Can you show me a Python function to 2 dimensional array access with an array.
assistant
Here is a Python function to 2 dimensional array access with an array

import numpy as np

def _2d_array_access(array, index):
    """Return the value of the 2d array at the given index."""
    return array[index[0]][index[1]]

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

# Calling the function
print((_2d_array_access(array, [0, 1])))

#Example Output
# 2

#Remember to inspect code for bugs.