Skip to content

Commit 36c076f

Browse files
committed
generic arguments_product
1 parent 46ffcfb commit 36c076f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

NDTensors/src/lib/SymmetrySectors/src/sector_product.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ function arguments_isequal(t::Tuple, nt::NamedTuple)
7474
return false
7575
end
7676

77-
arguments_product(nt::NamedTuple, t::Tuple) = arguments_product(t, nt)
78-
function arguments_product(t::Tuple, nt::NamedTuple)
79-
isempty(nt) && return t
80-
isempty(t) && return nt
81-
throw(ArgumentError("Mixing Tuple and NamedTuple is illegal"))
77+
function arguments_product(s1, s2)
78+
isempty(s1) && return s2
79+
isempty(s2) && return s1
80+
throw(ArgumentError("Mixing implementations is illegal"))
8281
end
8382

8483
arguments_isless(s1, s2) = isless(sym_arguments_insert_unspecified(s1, s2)...)

0 commit comments

Comments
 (0)