title: TypeError: 'numpy.float64' object does not support item assignment
body: <pre><code>def classify(self, texts):
          vectors = self.dictionary.feature_vectors(texts)
          predictions = self.svm.decision_function(vectors)
          predictions = np.transpose(predictions)[0]
          predictions = predictions / 2 + 0.5
          predictions[predictions &gt; 1] = 1
          predictions[predictions &lt; 0] = 0
          return predictions
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>TypeError: 'numpy.float64' object does not support item assignment
  </code></pre>
  
  <p>occurs on the following line:</p>
  
  <pre><code>        predictions[predictions &gt; 1] = 1
  </code></pre>
  
  <p>Does anyone has an idea of solving this problem? Thanks! </p>