Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix as_source_array/as_range_array for BlockRowOperator/BlockColumnOperator #627

Merged
merged 1 commit into from
Mar 12, 2019

Conversation

sdrave
Copy link
Member

@sdrave sdrave commented Mar 11, 2019

Fixes #624.

@sdrave sdrave added this to the 2019.2 milestone Mar 11, 2019
@sdrave sdrave requested a review from pmli March 11, 2019 12:53
src/pymor/operators/block.py Outdated Show resolved Hide resolved
@sdrave
Copy link
Member Author

sdrave commented Mar 12, 2019

@pmli, could you verify that the code is now working. (We don't have a test for this ATM ..)

@pmli
Copy link
Member

pmli commented Mar 12, 2019

It seems to be working

>>> from pymor.basic import *
>>> from pymor.operators.block import BlockRowOperator
>>> import numpy as np
>>> A = NumpyMatrixOperator(np.eye(2))
>>> B = BlockRowOperator([A, A])
>>> B.as_source_array()
<pymor.vectorarrays.block.BlockVectorArray object at 0x7fa1a195a9e8>
>>> B.as_range_array()
NumpyVectorArray([[1. 0.]
 [0. 1.]
 [1. 0.]
 [0. 1.]], NumpyVectorSpace(2))

@sdrave sdrave merged commit f449d1d into master Mar 12, 2019
@sdrave sdrave deleted the fix_624 branch March 12, 2019 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants