(self)
return str(tuple(rs)).replace("'", "")
String representation of shape tuple at runtime.
String representation of shape tuple at runtime.
String representation of shape tuple at runtime .
def runtime_shape_str(self):
    """String representation of shape tuple at runtime."""
    rs = []
    for d in self.shape:
      # dynamically-sized dimension
      if isinstance(d, str):
        n = ""
        if d.startswith("nmocap") and len(d) > len("nmocap"):
          n = "*{}".format(d[6:])
          d = "nmocap"
        if self.parent and d in self.parent.members:
          rs.append("self.{}{}".format(d, n))
        else:
          rs.append("self._model.{}{}".format(d, n))
      # static dimension
      else:
        rs.append(str(d))
    return str(tuple(rs)).replace("'", "")
def runtime_shape_str ( self ) : rs = [ ] for d in self . shape : # dynamically-sized dimension if isinstance ( d , str ) : n = "" if d . startswith ( "nmocap" ) and len ( d ) > len ( "nmocap" ) : n = "*{}" . format ( d [ 6 : ] ) d = "nmocap" if self . parent and d in self . parent . members : rs . append ( "self.{}{}" . format ( d , n ) ) else : rs . append ( "self._model.{}{}" . format ( d , n ) ) # static dimension else : rs . append ( str ( d ) ) return str ( tuple ( rs ) ) . replace ( "'" , "" )