MCPcopy Create free account
hub / github.com/RolnickLab/climart / __init__

Method __init__

climart/data_transform/transforms.py:76–78  ·  view source on GitHub ↗
(self, exp_type: str)

Source from the content-addressed store, hash-verified

74 """ Flattens a dict with array's as values into a 1D vector (or 2D with batch dimension)"""
75
76 def __init__(self, exp_type: str):
77 super().__init__(exp_type)
78 self._out_dim = sum(self.input_dim.values())
79
80 def transform(self, X: Dict[str, np.ndarray]) -> np.ndarray:
81 return np.concatenate([X[key].flatten() for key in INPUT_TYPES], axis=0)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected