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
scipy.sparse.bmat fails if all submatrices have same number of rows #8190
Comments
That error is from your own code, before the execution reaches
scipy.sparse.bmat
|
yes, sorry, was a typo while reducing the reproducer. Now the code is as intended, after edit |
Workaround: pass the input as an object array
>> blocks = np.zeros([2, 2], dtype='object')
>> blocks[0,0] = np.ones((2,3))
...
>> scipy.sparse.bmat(blocks)
|
Reproduced with scipy 1.0.0 and numpy 1.13.3. It seems that |
bmat could be ok just doing `n = len(blocks); m = len(blocks[0])`, maybe
as a fallback...
|
I worked around it by appending a row of matrices with zero rows each to "blocks". |
I'm not familiar with how |
scipy.sparse.bmat fails if all submatrices have same number of rows
Reproducing code example:
Error message:
Scipy/Numpy/Python version information:
The text was updated successfully, but these errors were encountered: