#NEWLINE# def filter_nvcc_flags( s ) : #NEWLINE# #INDENT# assert isinstance ( flags , str ) #NEWLINE# flags = [ flag for flag in s . split ( ' ' ) if flag ] #NEWLINE# if any ( [ f for f in flags if ( not f . startswith ( '-' ) ) ] ) : #NEWLINE# #INDENT# raise ValueError ( ( "Theano nvcc.flags support only parameter/value pairs without space between them. e.g.: '--machine 64' is not supported, but '--machine=64' is supported. Please add the '=' symbol. nvcc.flags value is '%s'" % s ) ) #NEWLINE# #UNINDENT# return ' ' . join ( flags )