[Numpy-discussion] unique1d returning indices

Robert Cimrman cimrman3@ntc.zcu...
Wed Aug 13 09:32:28 CDT 2008

Robert Cimrman wrote:
> Stéfan van der Walt wrote:
>> 2008/8/11 Robert Cimrman <cimrman3@ntc.zcu.cz>:
>>>>> Note also that the order of outputs has changed (previously unique1d()
>>>>> returned (i, b) for return_index=True).
>>>> Does this not constitute an API change?
>>> It does. Are there many users of unique1d( a, return_index=True ) out there?
>>> The new way is consistent with matlab, and IMHO more logical - the
>>> additional return values are appended to the returned tuple rather than
>>> prepended. It was my mistake to introduce the previous order (do not
>>> recall the motivation anymore :]).
>> The new way is definitely more consistent -- I think one could almost
>> call its current behaviour a bug.  Unless there are objections, let's
>> follow the standard route: put a deprecation warning in place for one
>> release and remove it in the next.
> Yeah, that's why I think not many people used the extra return anyway.
> I will do as you say unless somebody steps in.

... but not before August 25, as I am about to leave on holidays and 
have not managed to do it yet. I do not want to mess with the SVN now as 
I would not be able to follow it.

If you think the patch is ok, and have time, then go ahead :)


More information about the Numpy-discussion mailing list