Add the square brackets around the dimension for comparison with pint
(self)
| 98 | return Dimensions(name=new_name, **dimensionality) |
| 99 | |
| 100 | def as_dict(self) -> Dict[str, float]: |
| 101 | """Add the square brackets around the dimension for comparison with pint""" |
| 102 | dimensionality = {} |
| 103 | for dimension in self.dimensions: |
| 104 | value = getattr(self, dimension) |
| 105 | if value is not None: |
| 106 | dimensionality[f"[{dimension}]"] = value |
| 107 | return dimensionality |
| 108 | |
| 109 | |
| 110 | # Create instances of Dimensions that correspond to all the combinations of dimensions |
no outgoing calls
no test coverage detected