MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __init__

Method __init__

tensorflow/contrib/labeled_tensor/python/ops/core.py:207–225  ·  view source on GitHub ↗

Construct an Axes. Args: axes: A list of Axis objects or (axis_name, axis_value) tuples. Raises: ValueError: If the user provides empty or duplicate axis names.

(self, axes)

Source from the content-addressed store, hash-verified

205
206 @tc.accepts(object, tc.List(AxisLike))
207 def __init__(self, axes):
208 """Construct an Axes.
209
210 Args:
211 axes: A list of Axis objects or (axis_name, axis_value) tuples.
212
213 Raises:
214 ValueError: If the user provides empty or duplicate axis names.
215 """
216 self._axes = collections.OrderedDict()
217
218 for axis_data in axes:
219 axis = as_axis(axis_data)
220
221 name = axis.name
222 if name in self._axes:
223 raise ValueError('Duplicate axis name: %s' % name)
224
225 self._axes[name] = axis
226
227 def __iter__(self):
228 return iter(self._axes)

Callers

nothing calls this directly

Calls 1

as_axisFunction · 0.85

Tested by

no test coverage detected