From: Bruce S. <ba...@an...> - 2001-06-09 01:13:55
|
Can anyone give us advice on what changes there were in going from Python 2.0 to Python 2.1 that could lead to the following problem in Visual? The following code running on VPython 2.1 for Windows shows that p.color is a Numeric array, but that it is not possible to assign a Numeric array to p.color. The problem evidently is in the C++ code for the Visual module, but in order to understand how to fix it it would be wonderful if someone happens to know what is changed in Python 2.1 (or Numeric) that would invalidate the Visual handling of assigning a Numeric array to a Visual object attribute. The existence of this bug is what is preventing us from releasing Visual for Python 2.1 Bruce Sherwood from visual import * p = convex() print type(p.color) c = [.1, .2, .3] d = array(c) p.color = d print p.color ---------------------------------------- <type 'array'> Traceback (innermost last) File "Untitled", line 6, in ? p.color = d TypeError: function not supported for these types, and can't coerce to supported types P.S. Attempting to assign p.color = p.color gives the same error. |