#NEWLINE# @ staticmethod #NEWLINE# def checkArray( array , softCheck = False , arrayInfo = '' ) : #NEWLINE# #INDENT# '\n        Check that an array contains no nan or inf values\n        ' #NEWLINE# if numpy . isinf ( array ) . any ( ) : #NEWLINE# #INDENT# return Parameter . whatToDo ( ( ( 'The array ' + arrayInfo ) + " contains a 'inf' value" ) , softCheck ) #NEWLINE# #UNINDENT# if numpy . isnan ( array ) . any ( ) : #NEWLINE# #INDENT# return Parameter . whatToDo ( ( ( 'The array ' + arrayInfo ) + " contains a 'NaN' value" ) , softCheck ) #NEWLINE# #UNINDENT# if ( not numpy . isrealobj ( array ) ) : #NEWLINE# #INDENT# return Parameter . whatToDo ( ( ( 'The array ' + arrayInfo ) + ' has an imaginary part' ) , softCheck ) #NEWLINE# #UNINDENT# return True