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
2 changes: 1 addition & 1 deletion graphblas/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ def register_new(cls, name, func, *, parameterized=False, is_udt=False, lazy=Fal
def _initialize(cls):
if cls._initialized:
return
super()._initialize()
super()._initialize(include_in_ops=False)
# Update type information to include UINT64 for positional ops
for name in ("tril", "triu", "diag", "offdiag", "colle", "colgt", "rowle", "rowgt"):
op = getattr(indexunary, name)
Expand Down
12 changes: 5 additions & 7 deletions graphblas/tests/test_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,11 @@ def test_op_namespace():
# Make sure all have been initialized so `vars` below works
for key in list(op._delayed): # pragma: no cover
getattr(op, key)
known_aliases = {"index", "indexle", "indexgt"}
opnames = {
key
for key, val in vars(op).items()
if isinstance(val, (operator.OpBase, operator.ParameterizedUdf))
} | known_aliases
}
unarynames = {
key
for key, val in vars(unary).items()
Expand Down Expand Up @@ -725,11 +724,10 @@ def test_op_namespace():
assert not binarynames - opnames, binarynames - opnames
assert not monoidnames - opnames, monoidnames - opnames
assert not semiringnames - opnames, semiringnames - opnames
assert not indexunarynames - opnames, indexunarynames - opnames
assert not selectnames - opnames, selectnames - opnames
assert not opnames - (
unarynames | binarynames | monoidnames | semiringnames | indexunarynames | selectnames
)
assert not opnames - (unarynames | binarynames | monoidnames | semiringnames)
# These are not part of the `op` namespace
assert indexunarynames - opnames == indexunarynames, indexunarynames - opnames
assert selectnames - opnames == selectnames, selectnames - opnames


@pytest.mark.slow
Expand Down