Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknw committed Jan 16, 2023
1 parent 6f3bd0a commit 7323a4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions sparsetensorviz/notebooks/Example_Rank4-bundled.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@
"def to_tim(st):\n",
" rv = []\n",
" for gp in st.bundled_groups:\n",
" if \"expanded=True\" in gp:\n",
" if \"expanded=\" in gp:\n",
" return\n",
" num = int(gp[:-1].split(\"(\", 1)[1])\n",
" if gp.startswith(\"Coord\"):\n",
Expand Down Expand Up @@ -2632,7 +2632,7 @@
"data": {
"text/markdown": [
"```\n",
"bundled_groups = [Coord(2, expanded=True), Sparse(1), Coord(1)]\n",
"bundled_groups = [Coord(2, expanded=1), Sparse(1), Coord(1)]\n",
"\n",
"tim_structure = N/A\n",
"\n",
Expand Down Expand Up @@ -2937,7 +2937,7 @@
"data": {
"text/markdown": [
"```\n",
"bundled_groups = [Coord(1, expanded=True), Sparse(1), Coord(2)]\n",
"bundled_groups = [Coord(1, expanded=1), Sparse(1), Coord(2)]\n",
"\n",
"tim_structure = N/A\n",
"\n",
Expand Down Expand Up @@ -3241,7 +3241,7 @@
"data": {
"text/markdown": [
"```\n",
"bundled_groups = [Coord(1, expanded=True), Sparse(2), Coord(1)]\n",
"bundled_groups = [Coord(1, expanded=1), Sparse(2), Coord(1)]\n",
"\n",
"tim_structure = N/A\n",
"\n",
Expand Down Expand Up @@ -3611,7 +3611,7 @@
"data": {
"text/markdown": [
"```\n",
"bundled_groups = [Coord(1, expanded=True), Sparse(1), HyperSparse(1), Coord(1)]\n",
"bundled_groups = [Coord(1, expanded=1), Sparse(1), HyperSparse(1), Coord(1)]\n",
"\n",
"tim_structure = N/A\n",
"\n",
Expand Down Expand Up @@ -4403,7 +4403,7 @@
"data": {
"text/markdown": [
"```\n",
"bundled_groups = [Sparse(1), Coord(1, expanded=True), Sparse(1), Coord(1)]\n",
"bundled_groups = [Sparse(1), Coord(1, expanded=1), Sparse(1), Coord(1)]\n",
"\n",
"tim_structure = N/A\n",
"\n",
Expand Down Expand Up @@ -6611,7 +6611,7 @@
"data": {
"text/markdown": [
"```\n",
"bundled_groups = [HyperSparse(1), Coord(1, expanded=True), Sparse(1), Coord(1)]\n",
"bundled_groups = [HyperSparse(1), Coord(1, expanded=1), Sparse(1), Coord(1)]\n",
"\n",
"tim_structure = N/A\n",
"\n",
Expand Down Expand Up @@ -8147,7 +8147,7 @@
"source": [
"# voilà!\n",
"\n",
"_Note that `Coord(n, expanded=True)`, which comes from `S-C` combination, is a silly data structure that duplicates data unnecessarily.\n",
"_Note that `Coord(n, expanded=1)`, which comes from `S-C` combination, is a silly data structure that duplicates data unnecessarily.\n",
"`Coord(n)` is strongly preferred._"
]
}
Expand Down
2 changes: 1 addition & 1 deletion sparsetensorviz/sparsetensorviz/_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CoordSparseExpanded(MatcherBase):
def __new__(cls, ma, s):
numS = num(ma, "S")
numC = num(ma, "C")
return [f"Coord({numS}, expanded=True)", f"Sparse({numC})"]
return [f"Coord({numS}, expanded=1)", f"Sparse({numC})"]


class HyperSparse(MatcherBase):
Expand Down

0 comments on commit 7323a4f

Please sign in to comment.