Applies the callables to the data, and convert the numerics to list or Python numeric types (int/float). Args: data: input data
(self, data: Any, **kwargs: Any)
| 84 | } |
| 85 | |
| 86 | def evaluate(self, data: Any, **kwargs: Any) -> dict: |
| 87 | """ |
| 88 | Applies the callables to the data, and convert the |
| 89 | numerics to list or Python numeric types (int/float). |
| 90 | |
| 91 | Args: |
| 92 | data: input data |
| 93 | """ |
| 94 | ret = super().evaluate(data, **kwargs) |
| 95 | for k, v in self.data_addon.items(): |
| 96 | cache = v[0] |
| 97 | idx = v[1] |
| 98 | if isinstance(v, tuple) and cache in ret: |
| 99 | ret.update({k: ret[cache][idx]}) |
| 100 | |
| 101 | for k, v in ret.items(): |
| 102 | ret[k] = v.tolist() # type: ignore |
| 103 | return ret |
| 104 | |
| 105 | |
| 106 | class SummaryOperations(Operations): |