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

Method randperm

ot/backend.py:782–790  ·  view source on GitHub ↗

r""" Returns a random permutation of integers from 0 to n-1. This function follows the api from :any:`torch.randperm` See: https://docs.pytorch.org/docs/stable/generated/torch.randperm.html

(self, size, type_as=None)

Source from the content-addressed store, hash-verified

780 raise NotImplementedError()
781
782 def randperm(self, size, type_as=None):
783 r"""
784 Returns a random permutation of integers from 0 to n-1.
785
786 This function follows the api from :any:`torch.randperm`
787
788 See: https://docs.pytorch.org/docs/stable/generated/torch.randperm.html
789 """
790 raise NotImplementedError()
791
792 def coo_matrix(self, data, rows, cols, shape=None, type_as=None):
793 r"""

Callers 4

test_empty_backendFunction · 0.95
kernel_nystroemFunction · 0.45
randpermMethod · 0.45
test_random_backendsFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_empty_backendFunction · 0.76
test_random_backendsFunction · 0.36