def one(self, entity_name, type_name):
    """An NQL encoding of a one-hot set containing just this entity.

    Args:
      entity_name: a string naming an entity
      type_name: the string type name of the named entity

    Returns:
      A NeuralQueryExpression.
    """
    provenance = NQExprProvenance(
        operation='one', args=(type_name, entity_name))
    return self.as_nql(
        self.one_hot_numpy_array(entity_name, type_name), type_name, provenance)
An NQL encoding of a one-hot set containing just this entity.

    Args:
      entity_name: a string naming an entity
      type_name: the string type name of the named entity

    Returns:
      A NeuralQueryExpression.
    
language/nql/nql/__init__.py