[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55249] function ones does not always return a
From: |
Anders Lennartsson |
Subject: |
[Octave-bug-tracker] [bug #55249] function ones does not always return a valid matrix |
Date: |
Thu, 20 Dec 2018 03:18:34 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 |
Follow-up Comment #2, bug #55249 (project octave):
Thanks for the quick response.
After reading the manual, no what I reported is not a bug.
Although after some investigation, it would be useful if such ranges by
default were printed in a way as to indicate that they are ranges instead of
being printed as expanded row vectors. There are no visible indications of a
difference between the following:
octave:15> ones(1,4)
ans =
1 1 1 1
octave:16> [1 1 1 1]
ans =
1 1 1 1
Moreover, why does not zeros(1,n) return a range? It may be less useful but
the inconsistency this creates seems a bit dull at first glance. For example,
zeros(1,4)+1 is identical to [ones(1,4)]
and ones(1,4)-1 is not identical to zeros(1,4) although visibly
indistinguishable.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55249>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/