[SciPy-user] object_arrtype addition error

Travis Oliphant oliphant.travis at ieee.org
Mon Nov 28 22:14:29 CST 2005


Chris Fonnesbeck wrote:

>Under scipy_core, I have a dictionary that contains what I thought
>were floating point numbers, but are actually 'object_arrtype':
>
>(Pdb) aic_quantiles
>Out[3]:
>{2.5: 345.38217627260781,
> 25: 346.73173987124062,
> 50: 347.50728308413125,
> 75: 349.61766516420937,
> 97.5: 361.87424170229531}
>(Pdb) type(aic_quantiles[50])
>Out[3]: <type 'object_arrtype'>
>
>When I try and add a scalar to any of these, I get a TypeError:
>
>(Pdb) aic_quantiles[50] + 4
>*** TypeError: unsupported operand type(s) for +: 'object_arrtype' and 'int'
>(Pdb) aic_quantiles[50] + 4.
>*** TypeError: unsupported operand type(s) for +: 'object_arrtype' and 'float'
>
>Surely this is not intended behaviour? If so, I need some clarification.
>
>  
>
This should now be fixed in SVN.

-Travis



More information about the SciPy-user mailing list