octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51329] nth_element / median function fail wit


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #51329] nth_element / median function fail with disable_range(true) (or with --traditional)
Date: Thu, 29 Jun 2017 16:04:11 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #27, bug #51329 (project octave):

I think we're starting to get a little off-topic here.

I think that this bug is worth fixing, I think the latest patch in comment #18
looks good. I haven't yet applied it and tested it myself, but it seems
reasonable at a glance.

This bug does not only affect people using --traditional, it just happens to
manifest that way for users of --traditional calling the median function.

The easiest way to demonstrate this bug without --traditional is with


>> nth_element ([1:10], 1:10)
ans =

    1    2    3    4    5    6    7    8    9   10

>> nth_element ([1:10], [1:10])
error: nth_element: n must be a scalar or a contiguous range


The error is not very clear to the user why the first is acceptable but the
second is not a "contiguous range" for some reason.

This patch is relatively non-invasive, not too complicated, and should fix
that without making the normal case any worse.

Do you want this patch to be attributed to you (full name and email address)?
Are you the originator, can I use the name and email address in the bug fields
above?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51329>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]