(self, names: tuple or list or set or 'Shape')
return tuple(mask)
Returns a binary sequence corresponding to the names of this Shape.
        A value of 1 means that a dimension of this Shape is contained in `names`.

        Args:
          names: instance of dimension
          names: tuple or list or set: 

        Returns:
          binary sequence
Returns a binary sequence corresponding to the names of this Shape.
        A value of 1 means that a dimension of this Shape is contained in `names`.
Returns a binary sequence corresponding to the names of this Shape . A value of 1 means that a dimension of this Shape is contained in names .
def mask(self, names: tuple or list or set or 'Shape'):
        """
        Returns a binary sequence corresponding to the names of this Shape.
        A value of 1 means that a dimension of this Shape is contained in `names`.

        Args:
          names: instance of dimension
          names: tuple or list or set: 

        Returns:
          binary sequence

        """
        if isinstance(names, str):
            names = [names]
        elif isinstance(names, Shape):
            names = names.names
        mask = [1 if name in names else 0 for name in self.names]
        return tuple(mask)
def mask ( self , names : tuple or list or set or 'Shape' ) : if isinstance ( names , str ) : names = [ names ] elif isinstance ( names , Shape ) : names = names . names mask = [ 1 if name in names else 0 for name in self . names ] return tuple ( mask )