(self, name, indices)
Retrieve the value of a scalar variable or an array element.
Retrieve the value of a scalar variable or an array element.
Retrieve the value of a scalar variable or an array element .
def view_or_create_variable(self, name, indices):
        """Retrieve the value of a scalar variable or an array element."""
        name = self.complete_name(name)
        if indices == []:
            return self.scalars.get(name)
        else:
            # array is allocated if retrieved and nonexistant
            return self.arrays.get(name, indices)
def view_or_create_variable ( self , name , indices ) : name = self . complete_name ( name ) if indices == [ ] : return self . scalars . get ( name ) else : # array is allocated if retrieved and nonexistant return self . arrays . get ( name , indices )