Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
07a3f195
Commit
07a3f195
authored
Apr 05, 2018
by
Martin Bauer
Browse files
lbmpy notebook cleanup Part2
parent
d3aa7c68
Changes
1
Hide whitespace changes
Inline
Side-by-side
assignment_collection/simplificationstrategy.py
View file @
07a3f195
...
...
@@ -113,7 +113,7 @@ class SimplificationStrategy(object):
def
print_assignment_collection
(
title
,
c
):
text
=
title
if
self
.
restrict_symbols
:
text
+=
"
\n
"
.
join
([
str
(
e
)
for
e
in
c
.
get
(
self
.
restrict_symbols
)])
text
+=
"
\n
"
.
join
([
str
(
e
)
for
e
in
c
.
new_filtered
(
self
.
restrict_symbols
)
.
main_assignments
])
else
:
text
+=
(
" "
*
3
+
(
" "
*
3
).
join
(
str
(
c
).
splitlines
(
True
)))
return
text
...
...
@@ -129,7 +129,8 @@ class SimplificationStrategy(object):
def
print_assignment_collection
(
title
,
c
):
text
=
'<h5 style="padding-bottom:10px">%s</h5> <div style="padding-left:20px;">'
%
(
title
,
)
if
self
.
restrict_symbols
:
text
+=
"
\n
"
.
join
([
"$$"
+
sp
.
latex
(
e
)
+
'$$'
for
e
in
c
.
get
(
self
.
restrict_symbols
)])
text
+=
"
\n
"
.
join
([
"$$"
+
sp
.
latex
(
e
)
+
'$$'
for
e
in
c
.
new_filtered
(
self
.
restrict_symbols
).
main_assignments
])
else
:
# noinspection PyProtectedMember
text
+=
c
.
_repr_html_
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment