[Numpy-discussion] unique1d: renaming retindx to return_index

Bill Baxter wbaxter at gmail.com
Mon Sep 18 21:07:05 CDT 2006

Grepping through numpy/**/*.py, the only three functions I could find
with an argument to specify extra return values are:

  linspace(start, stop, num=50, endpoint=True, retstep=False)
  average(a, axis=None weights=None, returned=False)
  unique1d(ar1, retindx=False)

If unique1d is going to change to return_index, then linspace should
probably also change to return_step to maintain consistency.  And
maybe average should change to 'return_count'  or [ick]


On 9/19/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> Hi,
> Would anyone object if I changed the signature of
> unique1d(ar1, retindx=False)
> to
> unique1d(ar1, return_index=False)?
> I find retindx both harder to read and to type than return_index.

More information about the Numpy-discussion mailing list