[SciPy-user] scipy 0.4.4 problems with converters.blitz

Stefan van der Walt stefan at sun.ac.za
Mon Jan 30 16:22:16 CST 2006

On Mon, Jan 30, 2006 at 11:08:33AM +0100, Christian Kristukat wrote:
> Good idea! But it seems like I have to cast to a different type. Can you help me
> with that error message?  I've no idea of C++. For me it looks like he's trying
> to convert a 0-dim array (=scalar ?)  to a double, right?
> error: invalid static_cast from type `blitz::Array<double, 0>' to
type `double'

Array<double,0> is still an array -- not a double.  I assume you
obtained it by doing something similar to

blitz::Array<double,1> x(3);
x = 1,2,3;
dist(x(blitz::Range(2,2)), ...)

Try specifying that you need element 0 of that cut, i.e.

dist(x(blitz::Range(2,2))(0), ...)

If that does not help, please post the offending piece of code.


More information about the SciPy-user mailing list