#NEWLINE# def _get_dates_loc( self , dates , date ) : #NEWLINE# #INDENT# if hasattr ( dates , 'indexMap' ) : #NEWLINE# #INDENT# date = dates . indexMap [ date ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# date = dates . get_loc ( date ) #NEWLINE# try : #NEWLINE# #INDENT# len ( date ) #NEWLINE# from numpy import where #NEWLINE# date = where ( date ) [ 0 ] . item ( ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# return date