(self, old_size, squeeze=False)
return shape
Generates a shape tuple from parser results.

    Args:
      old_size: Either a `pyparsing.ParseResults`, or a valid int or string
       input to `self.resolve_size` (see method docstring for further details).
      squeeze: If True, any dimensions that are statically defined as 1 will be
        removed from the shape tuple.

    Returns:
      A shape tuple containing ints for dimensions that are statically defined,
      and string size identifiers for dimensions that can only be determined at
      runtime.
Generates a shape tuple from parser results.
Generates a shape tuple from parser results .
def get_shape_tuple(self, old_size, squeeze=False):
    """Generates a shape tuple from parser results.

    Args:
      old_size: Either a `pyparsing.ParseResults`, or a valid int or string
       input to `self.resolve_size` (see method docstring for further details).
      squeeze: If True, any dimensions that are statically defined as 1 will be
        removed from the shape tuple.

    Returns:
      A shape tuple containing ints for dimensions that are statically defined,
      and string size identifiers for dimensions that can only be determined at
      runtime.
    """
    if isinstance(old_size, pyparsing.ParseResults):
      # For multi-dimensional arrays, convert each dimension separately
      shape = tuple(self.resolve_size(dim) for dim in old_size)
    else:
      shape = (self.resolve_size(old_size),)
    if squeeze:
      shape = tuple(d for d in shape if d != 1)  # Remove singleton dimensions
    return shape
def get_shape_tuple ( self , old_size , squeeze = False ) : if isinstance ( old_size , pyparsing . ParseResults ) : # For multi-dimensional arrays, convert each dimension separately shape = tuple ( self . resolve_size ( dim ) for dim in old_size ) else : shape = ( self . resolve_size ( old_size ) , ) if squeeze : shape = tuple ( d for d in shape if d != 1 ) # Remove singleton dimensions return shape