# -*- coding: utf-8 -*-

import numpy as np
import logging


import vrl


logger = vrl.utils.get_logger('sartb')
vrl.utils.set_loglevel(logging.INFO)


def maximum(unary):
    nrow, ncol, nstates = unary.shape

    logger.info("Maximum: Inference")
    y = np.argmax(unary, axis=2)

    return y.reshape(nrow, ncol)
