human
how to call methods dynamically.
assistant
Here is a Python program to call methods dynamically

import numpy as np

def call_method(obj, method_name, *args, **kwargs):
    """Calls a method on an object.

    Args:
        obj (object): The object to call the method on.
        method_name (str): The name of the method to call.
        *args: The arguments to pass to the method.
        **kwargs: The keyword arguments to pass to the method.

    Returns:
        The result of calling the method.
    """
    return getattr(obj, method_name)(*args, **kwargs)

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

# Enter the method name
method_name = "sum"

# Calling the function
print((call_method(obj, method_name)))

#Example Output
# 10

#Remember to inspect code for bugs.