#NEWLINE# def validate( self ) : #NEWLINE# #INDENT# super ( Window , self ) . validate ( ) #NEWLINE# window = self . window #NEWLINE# if isinstance ( window , ( list , tuple , np . ndarray ) ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if com . is_integer ( window ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# import scipy.signal as sig #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# raise ImportError ( 'Please install scipy to generate window weight' ) #NEWLINE# #UNINDENT# if ( not isinstance ( self . win_type , compat . string_types ) ) : #NEWLINE# #INDENT# raise ValueError ( 'Invalid win_type {0}' . format ( self . win_type ) ) #NEWLINE# #UNINDENT# if ( getattr ( sig , self . win_type , None ) is None ) : #NEWLINE# #INDENT# raise ValueError ( 'Invalid win_type {0}' . format ( self . win_type ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'Invalid window {0}' . format ( window ) )