The bug appears to relate to type of the array returned by the 'around'
function from numpy. around preserves the type of arrays that are passed to it,
which in the cases above leads to an int array being fed via *args into a
method expecting a double. There seems to be several approaches to fixing this:
- Pass the args individually as suggested in earlier posts
- Make the source array to around be floating point.
- Provide a floating point destination array for around (it will cast the input
to the correct output type I believe)
- Do some other type manipulations
Option 2 is reasonably straight forward, but would only fix Chaco, not any
other applications using python-enable in this way. A two liner patch made the
examples I tried run, although looking at the code there could well be other
places this issue exists.
--- enthought/chaco/axis.py 2009-03-20 22:52:07.000000000 +0000
+++ /usr/lib/python2.6/dist-packages/enthought/chaco/axis.py 2009-12-10
08:07:54.000000000 +0000
@@ -139,11 +139,11 @@
_major_axis = Array
_title_orientation = Array
_title_angle = Float
- _origin_point = Array
+ _origin_point = Array(dtype=float64)
_inside_vector = Array
_axis_vector = Array
_axis_pixel_vector = Array
- _end_axis_point = Array
+ _end_axis_point = Array(dtype=float64)
ticklabel_cache = List
--
type mismatch causes chaco examples to fail
https://bugs.launchpad.net/bugs/425957
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs