[Numpy-discussion] More numpy and Numeric differences
oliphant.travis at ieee.org
Sat Feb 11 14:53:01 CST 2006
Pearu Peterson wrote:
> I have created a wiki page
> that reports my findings on how numpy and Numeric behave on various
> corner cases. Travis O., could you take a look at it?
> Here is the most recent addition:
I fixed the put issue. The problem with clip is actually in choose
(clip is just a specific application of choose).
The problem is in PyArray_ConvertToCommonType. You have an integer
array, an integer scalar, and a floating-point scalar.
I think the rules implemented in PyArray_ConvertToCommonType are not
allowing the scalar to dictate anything. But, this should clearly be
changed to allow scalars of different "kinds" to up-cast the array.
This would be consistent with the umath module.
So, PyArray_ConvertToCommonType needs to be improved. This will have an
impact on several other functions that use this C-API.
More information about the Numpy-discussion