Ok. I'll change this in SVN.

Nils Wagner wrote:

## ···

On Tue, 29 Jan 2008 15:33:46 -0500 > Michael Droettboom <mdroe@...31...> wrote:

Ok, to save me the trouble of installing Python-2.4 (which doesn't feel like the culprit, but appears to be the only variable other than platform) I seem to recall a discussion on numpy about coercion of scalars to Python int's that may be the culprit here. Can you please add the following line above the line where the exception is raised in path.py, line 201, and then send me the output:

print code, type(code), codes, type(codes)

1 <type 'numpy.uint8'> [1 2 1 2] <type 'numpy.ndarray'>

2 <type 'numpy.uint8'> [1 2 1 2] <type 'numpy.ndarray'>

1 <type 'numpy.uint8'> [1 2 1 2] <type 'numpy.ndarray'>

2 <type 'numpy.uint8'> [1 2 1 2] <type 'numpy.ndarray'>Also, does changing:

num_vertices = NUM_VERTICES[code]

to

num_vertices = NUM_VERTICES[int(code)]

resolve the problem?

Yes.

Cheers,

Nils

--

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA