MCPcopy Create free account
hub / github.com/PythonOT/POT / flip

Method flip

ot/backend.py:2117–2123  ·  view source on GitHub ↗
(self, a, axis=None)

Source from the content-addressed store, hash-verified

2115 return torch.searchsorted(a, v, right=right)
2116
2117 def flip(self, a, axis=None):
2118 if axis is None:
2119 return torch.flip(a, tuple(i for i in range(len(a.shape))))
2120 if isinstance(axis, int):
2121 return torch.flip(a, (axis,))
2122 else:
2123 return torch.flip(a, dims=axis)
2124
2125 def outer(self, a, b):
2126 return torch.outer(a, b)

Callers

nothing calls this directly

Calls 1

flipMethod · 0.45

Tested by

no test coverage detected