[Numpy-discussion] Numeric 24.0
Travis Oliphant
oliphant at ee.byu.edu
Fri Apr 22 03:51:14 EDT 2005
Alexander Schmolck wrote:
>Travis Oliphant <oliphant at ee.byu.edu> writes:
>
>
>
>>I've released Numeric 24.0 as a beta (2nd version) release. Right now it's
>>just a tar file.
>>
>>Please find any bugs. I'll wait a week or two and release a final version
>>unless I hear reports of problems.
>>
>>
>
>
>I suspect some other problems I haven't tried to track down yet are due to
>this:
>
> >>> a = num.array([[1],[2],[3]])
> >>> ~(a==a)
> array([[-2],
> [-2],
> [-2]])
>
>
What is wrong with this? ~ is bit-wise not and gives the correct
answer, here.
>
>Object array comparisons still produce haphazard behaviour:
>
> >>> a = num.array(["ab", "cd", "efg"], 'O')
> >>> a == 'ab'
> 0
>
>
You are mixing Object arrays and character arrays here and expecting too
much. String arrays in Numeric and their relationship with object
arrays have never been too useful. You need to be explicit about how
'ab' is going to be interpreted and do
a == array('ab','O') to get what you were probably expecting.
>Finally -- not necessarily a bug, but a change of behaviour that seems undocumented (I'm
>pretty sure this used to give a float array as return value):
>
> >>> num.zeros((2.0,))
> *** TypeError: an integer is required
>
>
>
>'as
>
>
I don't think this worked as you think it did (I looked at Numeric 21.3).
num.zeros(2.0) works but it shouldn't. This is a bug that I'll fix.
Shapes should be integers, not floats. If this was not checked before
than that was a bug. It looks like it's always been checked
differently for single-element tuples and scalars
So, in short, I see only one small bug here. Thanks for testing things
out.
-Travis
More information about the NumPy-Discussion
mailing list