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

Method arange

ot/backend.py:2001–2005  ·  view source on GitHub ↗
(self, stop, start=0, step=1, type_as=None)

Source from the content-addressed store, hash-verified

1999 return torch.ones(shape, dtype=type_as.dtype, device=type_as.device)
2000
2001 def arange(self, stop, start=0, step=1, type_as=None):
2002 if type_as is None:
2003 return torch.arange(start, stop, step)
2004 else:
2005 return torch.arange(start, stop, step, device=type_as.device)
2006
2007 def full(self, shape, fill_value, type_as=None):
2008 if isinstance(shape, int):

Callers

nothing calls this directly

Calls 1

arangeMethod · 0.45

Tested by

no test coverage detected