- tensorstore.IndexTransform.to_json(self) Any
Returns the
JSON representation
of the transform.Example
>>> transform = ts.IndexTransform( ... input_inclusive_min=[1, 2, -1], ... implicit_lower_bounds=[1, 0, 0], ... input_shape=[3, 2, 2], ... implicit_upper_bounds=[0, 1, 0], ... input_labels=['x', 'y', 'z'], ... output=[ ... ts.OutputIndexMap(offset=7, stride=13, input_dimension=1), ... ts.OutputIndexMap(offset=8), ... ts.OutputIndexMap( ... offset=1, ... stride=-2, ... index_array=[[[1, 2]]], ... index_range=ts.Dim(inclusive_min=-3, exclusive_max=10), ... ), ... ], ... ) >>> transform.to_json() {'input_exclusive_max': [4, [4], 1], 'input_inclusive_min': [[1], 2, -1], 'input_labels': ['x', 'y', 'z'], 'output': [{'input_dimension': 1, 'offset': 7, 'stride': 13}, {'offset': 8}, {'index_array': [[[1, 2]]], 'offset': 1, 'stride': -2}]}