r"""Tests element-wise for finiteness in all arguments.
(*args)
| 499 | |
| 500 | |
| 501 | def 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 | |
| 507 | def label_normalization(y, start=0, nx=None): |