def row_wise_dot(A, B):
    """Row-wise dot product

    Parameters
    ----------
    A : array_like
        2D array
    B : array_like
        2D array with same shape as A

    Returns
    -------
    array_like
        1D array with shape equal to A.shape[0] and B.shape[0]
    """
    return (A * B).sum(axis=1)