summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polymatrix/expression/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/polymatrix/expression/__init__.py b/polymatrix/expression/__init__.py
index b44aa3e..da1dce6 100644
--- a/polymatrix/expression/__init__.py
+++ b/polymatrix/expression/__init__.py
@@ -109,10 +109,9 @@ def concatenate(expressions: Iterable[Iterable]):
return init_expression(init_concatenate_expr(blocks))
-@convert_args_to_expression
-def block_diag(expressions: tuple[Expression]) -> Expression:
+def block_diag(expressions: Iterable[Expression]) -> Expression:
""" Create a block diagonal matrix. """
- return init_expression(init_block_diag_expr(expressions))
+ return init_expression(init_block_diag_expr(tuple(e.underlying for e in expressions)))
def product(