[Matrix-SIG] Re: Floating point exception when sort is given zero length list

Paul F. Dubois dubois1@llnl.gov
Tue, 15 Dec 1998 14:25:00 -0800


I'm sorry for the confusion. When I said this was fixed I forgot to check
WHEN it was fixed. It was fixed after the last release so naturally you do
not have it. Here is our Perforce entry:

Change 608 by motteler@motteler on 1998/11/17 15:04:01

 (ZCM 11/17/98) Fixed multiarray so that it wouldn't core dump python
 when attempting to argmax/argmin, sort, or argsort an empty sequence.
 Instead it now throws an exception and gives an informative comment.


Affected files ...


//depot/LLNLDistribution/Numerical/Src/multiarraymodule.c#3 edit

-----Original Message-----
From: Travis Oliphant <Oliphant.Travis@mayo.edu>
To: Paul F. Dubois <dubois1@llnl.gov>
Cc: matrix-sig@python.org <matrix-sig@python.org>
Date: Tuesday, December 15, 1998 2:02 PM
Subject: Floating point exception when sort is given zero length list


>
>I received some good feedback on my post of the floating-point exception
>in NumPy.  To clarify my purposes in posting, I did not find this error
>as part of some bug search but while programming.  I find the NumPy
>distribution to be normally quite robust and so was surprised by the
>error.
>
>I was using Oliver Andrich's rpm which I discovered is based on
>LLNLPython4.  I upgraded to LLNLPython6 which is the lastest distribution
>I could find and still found the same behavior.
>
>The fix suggested by Charles Waldman was most helpful.  I applied the
>simple patch and now no longer get the exception, instead sort([])
>returns a respectable empty array.  Thank you very much.
>
>Thanks to all who responded.
>
>Travis O.
>
>
>On Tue, 15 Dec 1998, Paul F. Dubois wrote:
>
>> I believe this is fixed. Please run the most recent NumPy.
>>
>
>