MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / random_vector

Function random_vector

utils/utils_poses/ATE/transformations.py:1887–1899  ·  view source on GitHub ↗

Return array of random doubles in the half-open interval [0.0, 1.0). >>> v = random_vector(10000) >>> numpy.all(v >= 0.0) and numpy.all(v < 1.0) True >>> v0 = random_vector(10) >>> v1 = random_vector(10) >>> numpy.any(v0 == v1) False

(size)

Source from the content-addressed store, hash-verified

1885
1886
1887def random_vector(size):
1888 """Return array of random doubles in the half-open interval [0.0, 1.0).
1889
1890 >>> v = random_vector(10000)
1891 >>> numpy.all(v >= 0.0) and numpy.all(v < 1.0)
1892 True
1893 >>> v0 = random_vector(10)
1894 >>> v1 = random_vector(10)
1895 >>> numpy.any(v0 == v1)
1896 False
1897
1898 """
1899 return numpy.random.random(size)
1900
1901
1902def inverse_matrix(matrix):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected