def dot(inp, matrix):
    """
    Decide the right type of dot product depending on the input
    arguments
    """
    if inp.dtype in 'int' and inp.ndim==2:
        return matrix[inp.flatten()]
    elif 'int' in inp.dtype:
        return matrix[inp]
    elif 'float' in inp.dtype and inp.ndim == 3:
        shape0 = inp.shape[0]
        shape1 = inp.shape[1]
        shape2 = inp.shape[2]
        return TT.dot(inp.reshape((shape0*shape1, shape2)), matrix)
    else:
        return TT.dot(inp, matrix)
dataset/ETHPy150Open pascanur/GroundHog/groundhog/utils/utils.py/dot/swapped operands of `in`