techjollof / scitools

Automatically exported from code.google.com/p/scitools
Other
0 stars 0 forks source link

2D Streamlines #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
The following code:

import scitools.easyviz as ev
import numpy as np

umin = -3
umax = 3
vmin = -3
vmax = 3

res = 10

(U,V) = np.meshgrid(np.linspace(umin,umax,res,endpoint=True),
                    np.linspace(vmin,vmax,res,endpoint=True))

sx,sy = np.meshgrid([.5],[.5])
znul = np.zeros((len(U),len(V)))
ev.streamline(U,V,-V,U,sx,sy)

What is the expected output? What do you see instead?
Expect a plot but get the following error message:
  File "C:\Python26\lib\site-packages\scitools\easyviz\common.py", line 3716, in streamline
    h = Streams(*args, **kwargs)
  File "C:\Python26\lib\site-packages\scitools\easyviz\common.py", line 832, in __init__
    self._parseargs(*args)
  File "C:\Python26\lib\site-packages\scitools\easyviz\common.py", line 925, in _parseargs
    self._set_data(x, y, z, u, v, w, sx, sy, sz)
UnboundLocalError: local variable 'sz' referenced before assignment

What version of the product are you using? On what operating system?
Windows Vista x64 scitools.__version__ is '0.7'

Please provide any additional information below.

Original issue reported on code.google.com by Gustavo....@gmail.com on 31 Oct 2010 at 7:01

GoogleCodeExporter commented 9 years ago
This bug was fixed in changeset 539 in the development repository.

Original comment by johannes...@gmail.com on 1 Nov 2010 at 8:40