How to concatenate two matrices in Python?
问题 I have two csr_matrix , uniFeature and biFeature . I want a new matrix Feature = [uniFeature, biFeature] . But if I directly concatenate them this way, there's an error that says the matrix Feature is a list. How can I achieve the matrix concatenation and still get the same type of matrix, i.e. a csr_matrix ? And it doesn't work if I do this after the concatenation: Feature = csr_matrix(Feature) It gives the error: Traceback (most recent call last): File "yelpfilter.py", line 91, in <module>