Closed leftaroundabout closed 2 months ago
ProductSpaceOperator works fine when applied to vectors or othewise evaluated, but when treated as a matrix of operators the index-accessor operator gives incorrect results:
ProductSpaceOperator
odl/odl/discr/discr_utils.py:286: DocTestFailure ______________________________ [doctest] odl.operator.pspace_ops.ProductSpaceOperator.__getitem__ _______________________________ 466 -------- 467 >>> r3 = odl.rn(3) 468 >>> pspace = odl.ProductSpace(r3, r3) 469 >>> I = odl.IdentityOperator(r3) 470 >>> prod_op = ProductSpaceOperator([[0, I], 471 ... [0, 0]], 472 ... domain=pspace, range=pspace) 473 >>> prod_op[0, 0] 474 0 475 >>> prod_op[0, 1] Expected: IdentityOperator(rn(3)) Got: 0
This is likely related to the recent change in implementation to a custom sparse matrix (https://github.com/odlgroup/odl/pull/1642).
Fixed by #1651.
ProductSpaceOperator
works fine when applied to vectors or othewise evaluated, but when treated as a matrix of operators the index-accessor operator gives incorrect results:This is likely related to the recent change in implementation to a custom sparse matrix (https://github.com/odlgroup/odl/pull/1642).