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

Method squeeze

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

Source from the content-addressed store, hash-verified

2340 ), f"Device discrepancy. First input is on {str(a_device)}, whereas second input is on {str(b_device)}"
2341
2342 def squeeze(self, a, axis=None):
2343 if axis is None:
2344 return torch.squeeze(a)
2345 else:
2346 return torch.squeeze(a, dim=axis)
2347
2348 def unsqueeze(self, a, axis):
2349 return torch.unsqueeze(a, dim=axis)

Callers

nothing calls this directly

Calls 1

squeezeMethod · 0.45

Tested by

no test coverage detected