#NEWLINE# def tuple_from_shape( self , expr ) : #NEWLINE# #INDENT# shape = self . visit_expr ( expr ) #NEWLINE# if ( shape . __class__ is Shape ) : #NEWLINE# #INDENT# return Tuple ( tuple ( shape . dims ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( expr . __class__ is Const ) : #NEWLINE# #INDENT# return Tuple ( ( shape . value , ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return Tuple ( ( ( any_scalar , ) * expr . type . rank ) )