Utils

Caldera utility functions.

dict_join(a, b[, out, join_fn, default_a, …])

Join two dictionaries.

Indexing

reindex_tensor(a)

Reindex a tensor to lowest index.

unravel_index(index, shape)

param index

Tensor

Utilities for torch.Tensor

scatter_coo(indices, source[, size, expand, …])

Scatter the provided source tensor to the provided indices.

scatter_indices(indices, shape)

Unroll the coo indices using the provided shape.

torch_coo_to_scipy_coo(m)

Convert torch torch.sparse.FloatTensor tensor to.

deterministic_seed(seed[, cudnn_deterministic])

param seed

long_isin(ar1, ar2[, assume_unique, invert])

param assume_unique

same_storage(x, y[, …])

Checks if two tensors share storage.

stable_arg_sort_long(arr)

Stable sort of long tensors.

tensor_is_empty(x)

Return whether the tensor is empty.

torch_scatter_group(x, idx)

Group a tensor by indices.

Functional

Functional programming module.

functional

functional.py.

Networkx Utilities

Extra networkx utilities