diff --git a/torchrl/data/tensor_specs.py b/torchrl/data/tensor_specs.py index 4396be874bf..ae5b58a06a0 100644 --- a/torchrl/data/tensor_specs.py +++ b/torchrl/data/tensor_specs.py @@ -1370,9 +1370,9 @@ def n(self): return self.space.n def update_mask(self, mask): - """ - Sets a mask to prevent some of the possible outcomes when a sample is - taken. The mask can also be set during initialization of the spec. + """Sets a mask to prevent some of the possible outcomes when a sample is taken. + + The mask can also be set during initialization of the spec. Args: mask (torch.Tensor or None): boolean mask. If None, the mask is @@ -2587,9 +2587,9 @@ def __init__( self.update_mask(mask) def update_mask(self, mask): - """ - Sets a mask to prevent some of the possible outcomes when a sample is - taken. The mask can also be set during initialization of the spec. + """Sets a mask to prevent some of the possible outcomes when a sample is taken. + + The mask can also be set during initialization of the spec. Args: mask (torch.Tensor or None): boolean mask. If None, the mask is @@ -2980,9 +2980,9 @@ def n(self): return self.space.n def update_mask(self, mask): - """ - Sets a mask to prevent some of the possible outcomes when a sample is - taken. The mask can also be set during initialization of the spec. + """Sets a mask to prevent some of the possible outcomes when a sample is taken. + + The mask can also be set during initialization of the spec. Args: mask (torch.Tensor or None): boolean mask. If None, the mask is @@ -3429,9 +3429,9 @@ def __init__( self.remove_singleton = remove_singleton def update_mask(self, mask): - """ - Sets a mask to prevent some of the possible outcomes when a sample is - taken. The mask can also be set during initialization of the spec. + """Sets a mask to prevent some of the possible outcomes when a sample is taken. + + The mask can also be set during initialization of the spec. Args: mask (torch.Tensor or None): boolean mask. If None, the mask is