import base64


def np_to_base64(a):
    """
    base64 encode the input NumPy array
    
    Args:
        a (array): numpy array
    
    Returns:
        str: Encoded string
    """
    return base64.b64encode(a).decode("utf-8")