title: Correcting TypeError: object of type 'float' has no len()
body: <p>Hi I am new to python and I am trying to numerically integrate a differential equation d/dt(θi) =ωi +summation of j( Kij sin(θj −θi)), i=1,...,N.</p>
  <p>Kuramoto model:</p>
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  import matplotlib.pyplot as plt
  from scipy.integrate import odeint
  
  
  
  def kuramoto(theta,t):
          N = len(t)
          w = np.array([0.1,0.2,0.3,0.4])
          K = np.random.rand(N,N)
      
          for i in range (0,N-1):
              sum =  K[i][i+1]*np.sin(theta[i+1]-theta[i])
              sum = sum + K[i][i-1]*np.sin(theta[i-1]-theta[i])
              theta_dot = w[i] + (1/N)*sum
              return theta_dot
  
  t = np.linspace(0,40,40)
  theta0 = [(0.2,0.4,0.3,1.2)]
  for theta0 in [(0.2,0.4,0.3,1.2)]:
      y_true = odeint(kuramoto,theta0,t)
      plt.plot(t,y_true,'r-')
  
  </code></pre>
  <p>However, I keep getting an error <code>TypeError: object of type 'float' has no len()</code>.  Can someone please help me correct this error?</p>