Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions grassmann_tensor/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ def contract(
# Merge tensor `a` common edges
arrow_merge_common_edges = (False, True)
shape_merge_common_edges = (a.tensor.shape[0], math.prod(a.tensor.shape[1:]))
even, odd, reorder, sign = self._reorder_indices(a.edges[1:])
even, odd, _, sign = self._reorder_indices(a.edges[1:])
edges_merge_common_edges = typing.cast(
tuple[tuple[int, int], ...],
(a.edges[0], (even, odd)),
Expand All @@ -915,7 +915,6 @@ def contract(
tensor_merge_common_edges = torch.where(
merging_parity, -tensor_merge_common_edges, +tensor_merge_common_edges
)
tensor_merge_common_edges = tensor_merge_common_edges.index_select(1, reorder)

a = dataclasses.replace(
a,
Expand Down
2 changes: 1 addition & 1 deletion tests/svd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def test_svd_int_cutoff_odd_block_empty_select_from_even_only(a: int, b: int, k:

devices = [torch.device("cpu")]
if torch.cuda.is_available():
devices.append(torch.device("cuda"))
devices.append(torch.device("cuda:0"))


@pytest.mark.parametrize(
Expand Down