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

Death to this ÞR (Matrix Row Reduce) #1175

Merged
merged 2 commits into from
Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions documents/knowledge/elements.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions documents/knowledge/elements.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions documents/knowledge/elements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5436,14 +5436,6 @@
- "[[[1,2,3],[4,5,6],[7,8,9],[10,11,12]]] : [1,5,9]"
- "[[[]]] : []"

- element: "ÞR"
name: Matrix Row Reduce
description: Reduce rows of a matrix by a function.
arity: 2
overloads:
lst-fun: reduce rows of a with b
vectorise: false

- element: "ÞC"
name: Matrix Column Reduce
description: Reduce columns of a matrix by a function.
Expand Down
5 changes: 0 additions & 5 deletions static/parsed_yaml.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions vyxal/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -1712,15 +1712,6 @@ def foldl_columns(lhs, rhs, ctx):
return [foldl(rhs, col, ctx=ctx) for col in lhs]


def foldl_rows(lhs, rhs, ctx):
"""Element ÞR
(lst, fun) -> reduce the rows of a by function b
"""
lhs, rhs = (lhs, rhs) if vy_type(lhs, simple=True) is list else (rhs, lhs)

return [foldl(rhs, row, ctx=ctx) for row in iterable(lhs, ctx=ctx)]


def function_call(lhs, ctx):
"""Element †
(fun) -> lhs()
Expand Down Expand Up @@ -6604,7 +6595,6 @@ def connected_uniquify(lhs, ctx: Context):
"Þ!": process_element(factorials, 0),
"Þ℅": process_element(shuffle, 1),
"ÞC": process_element(foldl_columns, 2),
"ÞR": process_element(foldl_rows, 2),
"Þṁ": process_element(mold_special, 2),
"ÞM": process_element(maximal_indices, 1),
"Þ∞": process_element(infinite_positives, 0),
Expand Down