diff --git a/src/tensortrax/__about__.py b/src/tensortrax/__about__.py index 43ea437..10a4943 100644 --- a/src/tensortrax/__about__.py +++ b/src/tensortrax/__about__.py @@ -2,4 +2,4 @@ tensorTRAX: Math on (Hyper-Dual) Tensors with Trailing Axes. """ -__version__ = "0.23.0" +__version__ = "0.24.0" diff --git a/src/tensortrax/math/special/_special_tensor.py b/src/tensortrax/math/special/_special_tensor.py index 72108ea..b8bbc25 100644 --- a/src/tensortrax/math/special/_special_tensor.py +++ b/src/tensortrax/math/special/_special_tensor.py @@ -80,8 +80,11 @@ def from_triu_2d(A): def try_stack(arrays, fallback=None): - "Try to unpack and stack the list of tensors and return the fallback otherwise." + """Try to unpack and stack the list of tensors/arrays and return the fallback array + otherwise.""" try: - return stack([A.x for ary in arrays for A in ary]) + return stack( + [A.x if isinstance(A, Tensor) else A for ary in arrays for A in ary] + ) except ValueError: return fallback