title: How to concatenate two matrices in Python?
body: <p>I have two <code>csr_matrix</code>, <code>uniFeature</code> and <code>biFeature</code>. </p>
  
  <p>I want a new matrix <code>Feature = [uniFeature, biFeature]</code>. But if I directly concatenate them this way, there's an error that says the matrix <code>Feature</code> is a list. How can I achieve the matrix concatenation and still get the same type of matrix, i.e. a <code>csr_matrix</code>?</p>
  
  <p>And it doesn't work if I do this after the concatenation: <code>Feature = csr_matrix(Feature)</code>
  It gives the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "yelpfilter.py", line 91, in &lt;module&gt;
      Feature = csr_matrix(Feature)
    File "c:\python27\lib\site-packages\scipy\sparse\compressed.py", line 66, in __init__
      self._set_self( self.__class__(coo_matrix(arg1, dtype=dtype)) )
    File "c:\python27\lib\site-packages\scipy\sparse\coo.py", line 185, in __init__
      self.row, self.col = M.nonzero()
  TypeError: __nonzero__ should return bool or int, returned numpy.bool_
  </code></pre>