Write a Python function to perform a linear search in a given array.
array = [2, 3, 41, 64, 1, -5]
target = -5
def linear_search(arr, target):  
    for i in range(len(arr)): 
        if arr[i] == target: 
            return i 
    return -1