#NEWLINE# def check_bool_indexer( ax , key ) : #NEWLINE# #INDENT# result = key #NEWLINE# if ( isinstance ( key , ABCSeries ) and ( not key . index . equals ( mask ) ) ) : #NEWLINE# #INDENT# result = result . reindex ( ax ) #NEWLINE# mask = com . isnull ( result . _values ) #NEWLINE# if mask . any ( ) : #NEWLINE# #INDENT# raise IndexingError ( 'Unalignable boolean Series key provided' ) #NEWLINE# #UNINDENT# result = result . astype ( bool ) . _values #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = np . asarray ( result , dtype = bool ) #NEWLINE# #UNINDENT# return result