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

Method ones

ot/backend.py:313–321  ·  view source on GitHub ↗

r""" Creates a tensor full of ones. This function follows the api from :any:`numpy.ones` See: https://numpy.org/doc/stable/reference/generated/numpy.ones.html

(self, shape, type_as=None)

Source from the content-addressed store, hash-verified

311 raise NotImplementedError()
312
313 def ones(self, shape, type_as=None):
314 r"""
315 Creates a tensor full of ones.
316
317 This function follows the api from :any:`numpy.ones`
318
319 See: https://numpy.org/doc/stable/reference/generated/numpy.ones.html
320 """
321 raise NotImplementedError()
322
323 def arange(self, stop, start=0, step=1, type_as=None):
324 r"""

Callers 15

test_empty_backendFunction · 0.95
_init_lr_sinkhornFunction · 0.45
_LR_DysktraFunction · 0.45
sinkhorn_low_rank_kernelFunction · 0.45
lp_solverFunction · 0.45
unifFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_empty_backendFunction · 0.76
test_linear_partFunction · 0.36
test_alphaFunction · 0.36
test_smooth_ot_dualFunction · 0.36
test_smooth_ot_semi_dualFunction · 0.36
test_fdaFunction · 0.36
test_wdaFunction · 0.36