Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pyop/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ def forwardFunction(x):

## Apply each operator to corresponding subvector and concatenate
## the results.
sub_outvecs = (b(v) for (b, v) in six.moves.zip(blocks,
vec_components))
sub_outvecs = [b(v) for (b, v) in six.moves.zip(blocks,
vec_components)]

## Concatenate the output sub-vectors together.
return npvstack(sub_outvecs)
Expand All @@ -206,8 +206,8 @@ def adjointFunction(x):

## Apply each operator to corresponding subvector and concatenate
## the results.
sub_outvecs = (b.T(v) for (b, v) in six.moves.zip(blocks,
vec_components))
sub_outvecs = [b.T(v) for (b, v) in six.moves.zip(blocks,
vec_components)]

## Concatenate the output sub-vectors together.
return npvstack(sub_outvecs)
Expand Down Expand Up @@ -252,7 +252,7 @@ def opFunction(x):

## Apply each operator (forward or adjoint) to the input vector to
## get output vector sub-components.
sub_outvecs = (b(x) for b in vert_blocks)
sub_outvecs = [b(x) for b in vert_blocks]
## Concatenate the output sub-vectors together.
return npvstack(sub_outvecs)

Expand Down
2 changes: 1 addition & 1 deletion pyop/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def toMatrix(O, sparse = False):
# Scipy #
###########

def toScipyLinearOperator(O, dtype = np.float):
def toScipyLinearOperator(O, dtype = np.float64):
''' Converts a LinearOperator into a scipy.sparse.linalg.LinearOperator

Scipy comes with come handy functions for calculating properties of a
Expand Down
2 changes: 1 addition & 1 deletion pyop/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def matvec(f):

@matmat
def wrapper(x):
return np.column_stack(f(c) for c in x.T)
return np.column_stack([f(c) for c in x.T])

return __wrapIfPy3(wrapper, f)

Expand Down
2 changes: 1 addition & 1 deletion tests/convert_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ def testToScipyLinearOperator():

np.testing.assert_allclose(A_op(input_mat), A_sci(input_mat))
np.testing.assert_allclose(A_op.T(input_mat),
A_sci.rmatvec(input_mat))
A_sci.rmatmat(input_mat))