Skip to content

Commit 4cd6e96

Browse files
committed
add showarr debug printing to utils.jl
1 parent 0dd9318 commit 4cd6e96

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/solve.jl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,11 @@ function A_b(eqs, vars)
5757
A, b
5858
end
5959

60-
macro pa(x)
61-
n = string(x)
62-
quote
63-
println($n, " = ")
64-
Base.print_array(stdout, $(esc(x)))
65-
println()
66-
end
67-
end
6860
function solve_for(eqs, vars)
69-
@pa eqs
70-
@pa vars
7161

7262
A, b = A_b(eqs, vars)
7363
A = SymbolicUtils.simplify.(to_symbolic.(A), polynorm=true)
7464
b = SymbolicUtils.simplify.(to_symbolic.(b), polynorm=true)
75-
@pa A
76-
@pa b
7765
map(to_mtk, SymbolicUtils.simplify.(ldiv(sym_lu(A), b)))
7866
end
7967

src/utils.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,15 @@ function substituter(pairs)
134134
expr -> to_mtk(SymbolicUtils.substitute(expr, dict))
135135
end
136136

137+
macro showarr(x)
138+
n = string(x)
139+
quote
140+
y = $(esc(x))
141+
println($n, " = ", summary(y))
142+
Base.print_array(stdout, y)
143+
println()
144+
y
145+
end
146+
end
147+
137148
@deprecate substitute_expr!(expr,s) substitute(expr,s)

0 commit comments

Comments
 (0)