Skip to content

Commit fa25db5

Browse files
committed
fix CWWTtools
1 parent ce2e3dd commit fa25db5

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "pyGroupedTransforms"
7-
version = "0.2.0"
7+
version = "0.3.0"
88
authors = [
99
{ name="Felix Wirth", email="fwi012001@gmail.com" },
1010
]

src/pyGroupedTransforms/CWWTtools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def adjoint(x):
366366
J = np.concatenate((J, J_new))
367367
V = np.concatenate((V, V_new))
368368

369-
ac_co = ac_co + np.sum(2**j)
369+
ac_co = ac_co + np.prod(2**j)
370370

371371
A = coo_matrix((V, (I.astype(int), J.astype(int))), (M, int(max(J) + 1)))
372372
A = A.tocsc()

src/pyGroupedTransforms/GroupedTransform.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@ def worker(i):
378378
return sum(results)
379379
else:
380380
return self.matrix @ other.data
381+
else:
382+
raise ValueError(
383+
"Wrong input data type"
384+
)
381385

382386
def __matmul__(self, other):
383387
return self.__mul__(other)

0 commit comments

Comments
 (0)