(self, **kwargs)
return type(self)(
        shape=kwargs.pop('shape', self.shape),
        dtype=kwargs.pop('dtype', self.dtype),
    )
Creates a copy of the object with some parameters replaced.
Creates a copy of the object with some parameters replaced.
Creates a copy of the object with some parameters replaced .
def replace(self, **kwargs):
    """Creates a copy of the object with some parameters replaced."""
    return type(self)(
        shape=kwargs.pop('shape', self.shape),
        dtype=kwargs.pop('dtype', self.dtype),
    )
def replace ( self , * * kwargs ) : return type ( self ) ( shape = kwargs . pop ( 'shape' , self . shape ) , dtype = kwargs . pop ( 'dtype' , self . dtype ) , )