human
Give me a Python function to access the last element numpy.
assistant
Here is a Python function to access the last element numpy

import numpy as np

def get_last_element(arr):
    """Returns the last element of a numpy array."""
    return arr[-1]

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

# Calling the function
print((get_last_element(arr)))

#Example Output
# 5

#Remember to inspect code for bugs.