human
What is a good Python function to return a list or an array type check.
assistant
Here is a Python function to return a list or an array type check

import numpy as np

def is_list_or_ndarray(obj):
    """
    Return True if obj is a list or ndarray, False otherwise.
    """
    return isinstance(obj, (list, np.ndarray))

# Enter the list
list_obj = [1, 2, 3]

# Calling the function
print((is_list_or_ndarray(list_obj)))

#Example Output
# True

#Remember to inspect code for bugs.