title: how to do dot multiplication of vector and sparse matrix in python
body: <p>how to do <code>dot</code> multiplication between vector and matrix (sparse)?</p>
  <p>It works with vector (ndarray type) and normal matrix (ndarray type).</p>
  <pre><code>import numpy as np
  import pandas as pd
  from scipy import sparse
  
  x1 = np.arange(8).reshape((2, 4)) * 10
  x2 = np.arange(4).reshape((2, 2))
  
  x1
  # array([[ 0, 10, 20, 30],
  #        [40, 50, 60, 70]])
  x2
  # array([[0, 1],
  #        [2, 3]])
  
  
  # works
  x2[1,].dot(x1)
  # array([120, 170, 220, 270])
  </code></pre>
  <p>But doesn't work w/ sparse matrix (becomes elementwise)</p>
  <pre><code>x1 = sparse.csr_matrix(x1)
  x2[1,].dot(x1)
  # array([&lt;2x4 sparse matrix of type '&lt;class 'numpy.int32'&gt;'
  #   with 7 stored elements in Compressed Sparse Row format&gt;,
  #        &lt;2x4 sparse matrix of type '&lt;class 'numpy.int32'&gt;'
  #   with 7 stored elements in Compressed Sparse Row format&gt;], dtype=object)
  </code></pre>
  <p>How can I</p>