import base64


def encode_array(array):
    """Encodes array to byte64

    Args:
        array (ndarray): array

    Returns:
        byte64: encoded array
    """
    # Encoding of 3darray to save in database
    encoded_array = base64.b64encode(array)
    return encoded_array