'Find the index with the maximum value along the given dimension, where 0 represents the
leading dimension and 1 represents the non-leading dimension. If a target
is not prvided, a new vector is created for storing the result.'

def argmax(self, axis, target=None):

    (m, n) = self.shape
    if (axis == 0):
        if (not target):
            target = empty((1, n))
    elif (axis == 1):
        if (not target):
            target = empty((m, 1))
    err_code = _eigenmat.argmax_by_axis(self.p_mat, target.p_mat, ct.c_int(axis))
    if err_code:
        raise generate_exception(err_code)
    return target
