<s> """<STR_LIT>""" <EOL> import numpy as np <EOL> from libact . base . interfaces import Labeler <EOL> from libact . utils import inherit_docstring_from <EOL> class IdealLabeler ( Labeler ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , dataset , ** kwargs ) : <EOL> X , y = zip ( * dataset . get_entries ( ) ) <EOL> assert ( ( np . array ( y ) != np . array ( None ) ) . all ( ) ) <EOL> self . X = X <EOL> self . y = y <EOL> @ inherit_docstring_from ( Labeler ) <EOL> def label ( self , feature ) : <EOL> return self . y [ np . where ( [ np . array_equal ( x , feature ) for x in self . X ] ) [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] ] </s>
