(index, size)
return vec
returns one-hot vector with given size and value 1 at given index
returns one-hot vector with given size and value 1 at given index
returns one - hot vector with given size and value 1 at given index
def _one_hot(index, size):
    '''returns one-hot vector with given size and value 1 at given index
    '''
    vec = [0 for _ in range(size)]
    vec[int(index)] = 1
    return vec
def _one_hot ( index , size ) : vec = [ 0 for _ in range ( size ) ] vec [ int ( index ) ] = 1 return vec