Codacy correction
This commit is contained in:
committed by
Nicola Demo
parent
ea3d1924e7
commit
dd43c8304c
@@ -168,9 +168,8 @@ class CartesianDomain(DomainInterface):
|
||||
for variable in variables:
|
||||
if variable in self.fixed_.keys():
|
||||
value = self.fixed_[variable]
|
||||
pts_variable = torch.tensor([[value]]).repeat(
|
||||
result.shape[0], 1
|
||||
)
|
||||
pts_variable = torch.tensor([[value]
|
||||
]).repeat(result.shape[0], 1)
|
||||
pts_variable = pts_variable.as_subclass(LabelTensor)
|
||||
pts_variable.labels = [variable]
|
||||
|
||||
@@ -203,9 +202,8 @@ class CartesianDomain(DomainInterface):
|
||||
for variable in variables:
|
||||
if variable in self.fixed_.keys():
|
||||
value = self.fixed_[variable]
|
||||
pts_variable = torch.tensor([[value]]).repeat(
|
||||
result.shape[0], 1
|
||||
)
|
||||
pts_variable = torch.tensor([[value]
|
||||
]).repeat(result.shape[0], 1)
|
||||
pts_variable = pts_variable.as_subclass(LabelTensor)
|
||||
pts_variable.labels = [variable]
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ class DomainInterface(metaclass=ABCMeta):
|
||||
if value not in DomainInterface.available_sampling_modes:
|
||||
raise TypeError(f"mode {value} not valid. Expected at least "
|
||||
"one in "
|
||||
f"{DomainInterface.available_sampling_modes}."
|
||||
)
|
||||
f"{DomainInterface.available_sampling_modes}.")
|
||||
|
||||
@abstractmethod
|
||||
def sample(self):
|
||||
|
||||
Reference in New Issue
Block a user