Creates a new Axes object without the given axis.
(self, axis_name)
| 255 | |
| 256 | @tc.accepts(object, string_types) |
| 257 | def remove(self, axis_name): |
| 258 | """Creates a new Axes object without the given axis.""" |
| 259 | if axis_name not in self: |
| 260 | raise KeyError(axis_name) |
| 261 | remaining_axes = [axis for axis in self.values() if axis.name != axis_name] |
| 262 | return Axes(remaining_axes) |
| 263 | |
| 264 | |
| 265 | class LabeledTensor(object): |