[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek fo
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility |
Date: |
Thu, 23 Sep 2021 11:42:44 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #8, bug #61199 (project octave):
This page
https://www.mathworks.com/help/matlab/ref/nchoosek.html
documents nchoosek as accepting numeric, logical, or char for the 'v'
argument. Are there other overloaded versions of nchoosek for other types, or
is it just that nchoosek works for other types even though the documentation
doesn't mention them because, as you say, it is essentially just an indexing
operation?
I didn't think to check the cases like
nchoosek ("A", 1)
because I didn't see anything other than the use of "zeros" in the code that I
expected would convert away from the original type.
The if/elseif thing was also because I couldn't think of a way to get the
proper result in any other way.
I would say that generating the exact output dimensions that Matlab does is
important to avoid breaking code that was written for Matlab and expects that
behavior.
I can fix these issues unless you are already working on it.
BTW, the numeric changeset number is local and can vary between repos.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61199>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61199] Input validation for nchoosek, anonymous, 2021/09/21
- [Octave-bug-tracker] [bug #61199] Input validation for nchoosek, anonymous, 2021/09/21
- [Octave-bug-tracker] [bug #61199] Input validation for nchoosek, anonymous, 2021/09/21
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Rik, 2021/09/22
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, John W. Eaton, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, anonymous, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, anonymous, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Rik, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility,
John W. Eaton <=
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Rik, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, John W. Eaton, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Nicholas Jankowski, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Rik, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Nicholas Jankowski, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, John W. Eaton, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Rik, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Nicholas Jankowski, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, Nicholas Jankowski, 2021/09/23
- [Octave-bug-tracker] [bug #61199] Allow 'char' input sets to nchoosek for Matlab compatibility, John W. Eaton, 2021/09/23