misleading error message when using ```hstack```
See original GitHub issuea = np.random.rand(10, 2)
b = np.random.rand(10, 2)
b = csc_matrix(b)
np.hstack((a, b))
ValueError: all the input arrays must have same number of dimensions
I think it should raise like ‘cannot stack sparse matrix’?
Thanks,
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Error when using vstack / hstack vs. concatenate · Issue #91
Hi guys, I am seeing errors when using vstack / hstack vs. using concatenate to assemble matrices. The below code block reproduces this....
Read more >Errors when trying to use hstack in python
I would like to know what is the cause of my errors when I try to use hstack. I have tried many different...
Read more >HSTACK function
Horizontally appends three arrays in sequence so that the results are one array of three rows and six columns with a #N/A error...
Read more >Xcode shows error on wrong line | Apple Developer Forums
I have this code in my SwiftUI view struct. HStack{ Text("Direction") Spacer() Picker("Direction", selection: $selectorIndex) { ForEach(0 .
Read more >pandas.concat — pandas 1.5.2 documentation
How to handle indexes on other axis (or axes). ignore_indexbool, default False. If True, do not use the index values along the concatenation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@saullocastro My point is that the error message is not correct
Right, making
dtype=object
forced if you want an object array… Or maybe anallow_object
argument, I am not sure if we even hashed out the details quite. But yes, I think any thought out proposal will be merged quickly 😉.