title: opening files in universal new line mode?
body: <p>I am currently working on a code for a perceptron that plots data in three dimensions. I am running it in terminal and when running the code I recieve this error: </p>
  
  <pre><code>    Traceback (most recent call last):
  File "perceptron2.py", line 70, in &lt;module&gt;
  for row in csv_reader:
  _csv.Error: new-line character seen in unquoted field - do you need to open the 
  file in universal-newline mode?
  </code></pre>
  
  <p>The area around line 70 of my code, where I believe the error is occuring is in the following block of code, in where input data is acquired from x and labels from y</p>
  
  <pre><code>X = np.zeros(shape=(80,2))
  y = np.zeros(shape=(80,1))
  z = np.zeros(shape=(80,0))
  with open('joy.csv') as csv_file:
      csv_reader = csv.reader(csv_file, delimiter=',')
      line_count = 0
      for row in csv_reader:
          X[line_count] = [eval(row[0]), eval(row[1])]
          y[line_count] = [eval(row[2])]
          z[line_count] = [eval(row[3])]
          line_count += 1
          if line_count == 80:
              break
  </code></pre>
  
  <p>Anyway, I was wondering if anybody knew of a solution I could implement to solve my problems. Thanks!</p>