Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def filter_keep_operands(self, keep: list[bool]) -> EquivariantPolynomial:
Use this method when you want to compute only a subset of the polynomial outputs
and have control over which inputs to keep. For keeping all inputs (even if
not used), use filter_keep_outputs. For automatically removing unused operands,
use filter_drop_unsued_operands.
use filter_drop_unused_operands.

Args:
keep (list of bool): List indicating which operands to keep.
Expand Down Expand Up @@ -515,7 +515,7 @@ def filter_keep_outputs(self, keep: list[bool]) -> EquivariantPolynomial:
assert len(keep) == self.num_outputs
return self.filter_keep_operands([True] * self.num_inputs + keep)

def filter_drop_unsued_operands(self) -> EquivariantPolynomial:
def filter_drop_unused_operands(self) -> EquivariantPolynomial:
"""Remove all unused operands from the polynomial.

Returns:
Expand All @@ -534,7 +534,7 @@ def filter_drop_unsued_operands(self) -> EquivariantPolynomial:
if used_flag
]

filtered_polynomial = self.polynomial.filter_drop_unsued_operands()
filtered_polynomial = self.polynomial.filter_drop_unused_operands()

return EquivariantPolynomial(
filtered_inputs, filtered_outputs, filtered_polynomial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ def filter_keep_operands(self, keep: list[bool]) -> SegmentedPolynomial:
Use this method when you want to compute only a subset of the polynomial outputs
and have control over which inputs to keep. For keeping all inputs (even if
not used), use filter_keep_outputs. For automatically removing unused operands,
use filter_drop_unsued_operands.
use filter_drop_unused_operands.

Args:
keep (list of bool): List indicating which operands to keep.
Expand Down Expand Up @@ -951,7 +951,7 @@ def filter_keep_outputs(self, keep: list[bool]) -> SegmentedPolynomial:
assert len(keep) == self.num_outputs
return self.filter_keep_operands([True] * self.num_inputs + keep)

def filter_drop_unsued_operands(self) -> SegmentedPolynomial:
def filter_drop_unused_operands(self) -> SegmentedPolynomial:
"""Remove all unused operands from the polynomial.

Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_remove_unused_buffers():

assert poly.used_operands() == [True, False, True, True]

cleaned = poly.filter_drop_unsued_operands()
cleaned = poly.filter_drop_unused_operands()
assert cleaned.num_inputs == 2 and cleaned.num_outputs == 1
assert cleaned.used_operands() == [True, True, True]

Expand Down