title: Solving complex ODE in python with scipy
body: <p>I'm trying to solve a system of complex ODE with scipy running the code below, but I get the error:</p>
  
  <pre><code>  line 9, in f
    f0 = -1j*g/2*np.conj(y[1])*y[2]
  
    TypeError: can't multiply sequence by non-int of type 'complex'
  </code></pre>
  
  <p>This is the script I'm using:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  import numpy as np
  import matplotlib.pyplot as plt
  from scipy.integrate import complex_ode
  
  def f(y, t):
      g=1.+0j,
      f0 = -1j*g/2*np.conj(y[1])*y[2]
      f1 = np.conj(+1j*g/2*np.conj(y[2])*y[0])
      f2 = -1j*g/2*y[0]*y[1]
      return [f0, f1, f2]
  
  
  t0=0;
  y0=np.array([100,1,1], dtype=np.complex128)
  
  r = complex_ode(f)
  r.set_initial_value(y0, t0)
  
  t1 = 10
  dt = 1
  
  sol = np.array([], dtype = np.complex256)
  t   = np.array([], dtype = np.complex256)
  
  while r.successful() and r.t &lt; t1:
      t=np.append(t,r.t+dt)
      sol=np.append(sol, r.integrate(r.t+dt))
  
  A1 = sol[:, 0]
  A2 = sol[:, 1]
  A3 = sol[:, 2]
  
  plt.figure()
  plt.plot(t, abs(A1), label='A1')
  plt.plot(t, abs(A2), label='A2')
  plt.plot(t, abs(A3), label='A3')
  plt.xlabel('t')
  plt.ylabel('A')
  plt.title('A-t')
  plt.legend(loc=0)
  </code></pre>
  
  <p>How can I fix this? It seems that the function <code>f</code> alone is working, but when it's called by the integrator it results in an error.</p>