MCPcopy Index your code
hub / github.com/networkx/networkx / randint

Method randint

networkx/utils/misc.py:418–427  ·  view source on GitHub ↗
(self, a, b)

Source from the content-addressed store, hash-verified

416 return self._rng.choice(list(seq), size=(k,), replace=False)
417
418 def randint(self, a, b):
419 import numpy as np
420
421 if b > 9223372036854775807: # from np.iinfo(np.int64).max
422 tmp_rng = PythonRandomViaNumpyBits(self._rng)
423 return tmp_rng.randint(a, b)
424
425 if isinstance(self._rng, np.random.Generator):
426 return self._rng.integers(a, b + 1)
427 return self._rng.randint(a, b + 1)
428
429 # exponential as expovariate with 1/argument,
430 def expovariate(self, scale):

Callers 15

randrangeMethod · 0.80
choiceMethod · 0.80
setup_methodMethod · 0.80
_select_kFunction · 0.80
_select_jd_treesFunction · 0.80
_select_jd_forestsFunction · 0.80
_bicenterFunction · 0.80

Calls 1