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

Method rand

ot/backend.py:2693–2698  ·  view source on GitHub ↗
(self, *size, type_as=None)

Source from the content-addressed store, hash-verified

2691 self.rng_.seed(seed)
2692
2693 def rand(self, *size, type_as=None):
2694 if type_as is None:
2695 return self.rng_.rand(*size)
2696 else:
2697 with cp.cuda.Device(type_as.device):
2698 return self.rng_.rand(*size, dtype=type_as.dtype)
2699
2700 def randn(self, *size, type_as=None):
2701 if type_as is None:

Callers

nothing calls this directly

Calls 1

randMethod · 0.45

Tested by

no test coverage detected