Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latex times for > 3d tensors #26

Merged
merged 1 commit into from
Sep 20, 2021
Merged
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
4 changes: 2 additions & 2 deletions tsensor/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def draw_matrix(self,ax,sub):
fontname=self.dimfontname, fontsize=self.dimfontsize,
rotation=45)
if len(sh)>3:
remaining = "$\cdots$x"+'x'.join([self.nabbrev(sh[i]) for i in range(3,len(sh))])
remaining = r"$\cdots\times$"+r"$\times$".join([self.nabbrev(sh[i]) for i in range(3,len(sh))])
ax.text(mid, self.box_topy - h - self.dim_ypadding, remaining,
verticalalignment='top', horizontalalignment='center',
fontname=self.dimfontname, fontsize=self.dimfontsize)
Expand Down Expand Up @@ -545,4 +545,4 @@ def internal_label(node,color="yellow"):
gr += f'node{id(nd)} -> node{id(sub)} [dir=back, penwidth="0.5", color="#6B6B6B", arrowsize=.3];\n'

gr += "}\n"
return gr
return gr