title: When i try to reshape, it gives me an error saying "TypeError: list indices must be integers or slices, not tuple"
body: <p>Actually, i am trying to convert Matlab code to python and when i try to reshape, it throws me a TypeError saying "TypeError: list indices must be integers or slices, not tuple".</p>
  
  <p><strong>Matlab</strong></p>
  
  <pre><code>[file,path] = uigetfile('*.dwr');
  fid = fopen(strcat(path,'/',file));
  m5 = (fread(fid, '*uint8'));
  m5=double(m5);
  fclose(fid);
  m6=m5(12514:end);
  no_bin_ele=m5(12039:2:12218)+256*m5(12040:2:12218);
  s1=size(m6);
  s2=((no_bin_ele(1)*7+4)*360)*1;
  n1=m6(1:s2);
  j1=reshape(n1(1:end,1),no_bin_ele(1)*7+4,360*1);
  </code></pre>
  
  <p><strong>Python</strong></p>
  
  <pre><code>import numpy as np
  with open('aa.dwr', 'rb') as fp:
  m5 = np.fromstring(fp.read(), dtype='uint8')
  m5 = m5.astype(float)
  m5 = m5.tolist()
  m6 = m5[12514:]
  no_bin_ele = m5[12039:12218:2]+256*m5[12040:12218:2]
  s1 = len(m6)
  s2=((no_bin_ele[1]*7+4)*360)*1
  s2 =int(s2)
  n1=m6[1:s2]
  j1 = np.reshape(n1[1: ,1], no_bin_ele[1]*7+4, 360*1)
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "ppp.py", line 26, in 
        j1 = np.reshape(n1[1: ,1], no_bin_ele[1]*7+4, 360*1)
    TypeError: list indices must be integers or slices, not tuple</p>
  </blockquote>