title: Python error "cannot perform reduce with flexible type" when finding maximum
body: <p>I'm trying to find the maximal value of a list of lists of numbers.</p>
  
  <p>Using Python 2.7 IDLE, I tried this:</p>
  
  <pre><code>import numpy
  vectors = [[1, 2, 3], [4,5,6]]
  numpyFiles = numpy.array(vectors)
  maxRawFreq = numpyFiles.max()
  </code></pre>
  
  <p>It works, and <code>maxRawFreq = 6</code></p>
  
  <p>I tried using a very similar code, with a much bigger list, and using Pydev (Eclipse), but I get the following error:</p>
  
  <p><code>cannot perform reduce with flexible type</code></p>
  
  <p>What does it mean? (other SO questions about this error gave too specific solutions...).</p>
  
  <p>My code:</p>
  
  <pre><code>import numpy
  with open(inputFile) as f:
    vectors = f.readlines()
  
  vectorLength=len(vectors[0])#number of columns (word vector length)
  
  numpyFiles = numpy.array(vectors)
  
  #both these line gave me the same error:
  #maxRawFreq = numpyFiles.max()
  maxRawFreq = numpy.max(numpyFiles)
  </code></pre>
  
  <p>My <code>inputFile</code> contains numbers, like so:</p>
  
  <pre><code>-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  -1, 0, 0, 3, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,
  +1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
  </code></pre>