#NEWLINE# def _convert_array( xs , array_module ) : #NEWLINE# #INDENT# if ( array_module == 'all_numpy' ) : #NEWLINE# #INDENT# return xs #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( array_module == 'all_cupy' ) : #NEWLINE# #INDENT# return cupy . asarray ( xs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return [ ( cupy . asarray ( x ) if numpy . random . random_integers ( 0 , 1 ) else x ) for x in xs ]