import numpy as np


def sigmoid(x):
    """
    Implementation of the sigmoid function.

    Parameters:
        x (str): Input np.ndarray.

    Returns:
        An np.ndarray after applying the sigmoid function element-wise to the
        input.
    """
    e = np.exp(x)
    return e / (1 + e)


def train(theta, X, y, num_epoch, learning_rate):
    # TODO: Implement `train` using vectorization
    pass


def predict(theta, X):
    # TODO: Implement `predict` using vectorization
    pass


def compute_error(y_pred, y):
    # TODO: Implement `compute_error` using vectorization
    pass
