We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 805a227 commit a118319Copy full SHA for a118319
1 file changed
src/std.jl
@@ -545,19 +545,11 @@ function parenthesize_std(arg::BinaryOperation{Mult})
545
return _to_std_string(arg)
546
end
547
548
-# TODO: Remove
549
function is_trace(arg)
550
terms = collect_factors(arg)
551
552
if length(terms) == 1
553
- ids = get_indices(arg)
554
- free_ids = get_free_indices(arg)
555
-
556
- if length(ids) == 2 && isempty(free_ids)
557
- return true
558
- else
559
- return false
560
- end
+ return length(get_indices(first(terms))) == 2 && isempty(get_free_indices(arg))
561
562
563
return all(length.(get_free_indices.(terms)) .== 2) && isempty(get_free_indices(arg))
0 commit comments