title: Using "from __future__ import division" in my program, but it isn't loaded with my program
body: <p>I wrote the following program in Python 2 to do Newton's method computations for my math problem set, and while it works perfectly, for reasons unbeknownst to me, when I initially load it in ipython with <code>%run -i NewtonsMethodMultivariate.py</code>, the Python 3 division is not imported. I know this because after I load my Python program, entering <code>x**(3/4)</code> gives "1". After manually importing the new division, then <code>x**(3/4)</code> remains <code>x**(3/4)</code>, as expected. Why is this?</p>
  
  <pre><code># coding: utf-8
  from __future__ import division
  from sympy import symbols, Matrix, zeros
  
  x, y = symbols('x y')
  X = Matrix([[x],[y]])
  tol = 1e-3
  
  def roots(h,a):
    def F(s):
      return h.subs({x: s[0,0], y: s[1,0]})
    def D(s):
      return h.jacobian(X).subs({x: s[0,0], y: s[1,0]})
    if F(a) == zeros((2,1)):
      return a
    else:
      while (F(a)).norm() &gt; tol:
        a = a - ((D(a))**(-1))*F(a)
        print a.evalf(10)
  </code></pre>
  
  <p>I would use Python 3 to avoid this issue, but my Linux distribution only ships SymPy for Python 2. Thanks to the help anyone can provide.</p>
  
  <p>Also, in case anyone was wondering, I haven't yet generalized this script for nxn Jacobians,  and only had to deal with 2x2 in my problem set. <s>Additionally, I'm slicing the 2x2 zero matrix instead of using the command <code>zeros(2,1)</code> because SymPy 0.7.1, installed on my machine, complains that "zeros() takes exactly one argument", though the <a href="http://docs.sympy.org/dev/modules/matrices.html" rel="noreferrer">wiki</a> suggests otherwise. Maybe this command is only for the git version.</s> (Thanks eryksun for correcting my notation, which fixed the issue with the zeros function.)</p>