[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48088] document that issquare, iscolumn, isem
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #48088] document that issquare, iscolumn, isempty, etc operate on cell arrays |
Date: |
Thu, 11 Nov 2021 23:22:46 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Update of bug #48088 (project octave):
Status: Confirmed => Patch Submitted
_______________________________________________________
Follow-up Comment #7:
i think the term object is generic enough to address the issue in the bug. but
i notice it's not consistent across all functions mentioned.
in Octave 6.4.0:
issquare:
Return true if X is a 2-D square array.
A square array is a 2-D object for which 'size (X)' returns
'[N, N]' where N is a non-negative integer.
isrow (same with iscolumn):
Return true if X is a row vector.
A row vector is a 2-D array for which 'size (X)' returns '[1, N]'
with non-negative N.
isempty:
Return true if A is an empty matrix (any one of its dimensions is
zero).
ismatrix:
Return true if X is a 2-D array.
A matrix is an object with two dimensions ('ndims (X) == 2') for
which 'size (X)' returns '[M, N]' with non-negative M and N.
isvector:
Return true if X is a vector.
A vector is a 2-D array where one of the dimensions is equal to 1
(either 1xN or Nx1). As a consequence of this definition, a 1x1
array (a scalar) is also a vector.
isscalar:
Return true if X is a scalar.
A scalar is an object with two dimensions for which 'size (X)'
returns '[1, 1]'.
isnull, isdiag, issymettric, istril, and istriu are specific to matrices, so
no changes there. I don't see any others in the is* list.
Attached is a patch that makes the docstring changes for isrow, iscolumn,
isempty, and isvector to use the 'object' terminology (all in data.cc).
The revised docstrings:
isrow (and column):
Return true if X is a row vector.
A row vector is a 2-D object for which 'size (X)' returns '[1, N]'
with non-negative N.
isempty:
Return true if A is an empty object (any one of its dimensions is
zero).
isvector:
Return true if X is a vector.
A vector is a 2-D object where one of the dimensions is equal to 1
(either 1xN or Nx1). As a consequence of this definition, a 1x1
object (a scalar) is also a vector.
Please add a comment if there are other functions i missed.
(file #52255)
_______________________________________________________
Additional Item Attachment:
File name: issquare_on_object_docfix_bug48088.diff Size:2 KB
<https://file.savannah.gnu.org/file/issquare_on_object_docfix_bug48088.diff?file_id=52255>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?48088>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #48088] document that issquare, iscolumn, isempty, etc operate on cell arrays,
Nicholas Jankowski <=