def setup(self): data_1d = np.zeros(ARTIFICIAL_DIM_SIZE) # These benchmarks are from a user perspective, so using a user-level # subclass of CFVariableMixin to test behaviour. AncillaryVariable is # the simplest so using that. self.cfm_proxy = coords.AncillaryVariable(data_1d) self.cfm_proxy.long_name = "test"
def setup(self): ancillary_variable = coords.AncillaryVariable(data_1d) # Variables needed by the ComponentCommon base class. self.cube_kwargs = { "ancillary_variables_and_dims": [(ancillary_variable, 0)] } self.add_method = cube.Cube.add_ancillary_variable self.add_args = (ancillary_variable, 0) self.setup_common()
def create(self): return coords.AncillaryVariable(data_1d)