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

Function is_all_finite

ot/utils.py:501–504  ·  view source on GitHub ↗

r"""Tests element-wise for finiteness in all arguments.

(*args)

Source from the content-addressed store, hash-verified

499
500
501def is_all_finite(*args):
502 r"""Tests element-wise for finiteness in all arguments."""
503 nx = get_backend(*args)
504 return all(not nx.any(~nx.isfinite(arg)) for arg in args)
505
506
507def label_normalization(y, start=0, nx=None):

Calls 3

get_backendFunction · 0.85
anyMethod · 0.45
isfiniteMethod · 0.45