We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Want to compare grids using grid1 | grid2 | grid3, here a stub with a demo:
grid1 | grid2 | grid3
class Model: def __init__(self, name): self.name = name def __or__(self, other): return ModelComparison([self, other]) class ModelComparison: def __init__(self, models): self.models = models def __or__(self, other): if isinstance(other, Model): self.add([other]) if isinstance(other, self.__class__): self.add(other.models) return self def add(self, models): self.models += models def names(self): return [model.name for model in self.models] def __repr__(self): return f'Model comparison of models: {self.names()}' m1 = Model('m1') m2 = Model('m2') m3 = Model('m3') m4 = Model('m4') m1 | m2 | m3 | m4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Want to compare grids using
grid1 | grid2 | grid3
, here a stub with a demo:The text was updated successfully, but these errors were encountered: