MCPcopy Create free account
hub / github.com/apache/arrow / randsign

Function randsign

python/pyarrow/tests/util.py:43–50  ·  view source on GitHub ↗

Randomly choose either 1 or -1. Returns ------- sign : int

()

Source from the content-addressed store, hash-verified

41
42
43def randsign():
44 """Randomly choose either 1 or -1.
45
46 Returns
47 -------
48 sign : int
49 """
50 return random.choice((-1, 1))
51
52
53@contextlib.contextmanager

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected