[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer siz
From: |
Colin Macdonald |
Subject: |
[Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly |
Date: |
Sat, 07 Feb 2015 14:55:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 |
URL:
<http://savannah.gnu.org/bugs/?44201>
Summary: "whos" and gui display non-integer sizes inf/nan
poorly
Project: GNU Octave
Submitted by: cbm
Submitted on: Sat 07 Feb 2015 02:55:23 PM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
I attach a patch.
- - - - - - - - - - - - - - - - - - - - - - - -
"whos" and "gui" blindly convert sizes to int as if all objects would have
integer sizes, how presumptuous ;-)
Seriously, examples where this is done:
1. Matlab allows at least size to return "inf". Chebfun (www.chebfun.org)
does this for example. I would like to get chebfun running on Octave soonish.
(Their logic is that a function in treated as a length infinity vector).
2. I'm contemplating returning [nan 3] from size.m for matrices with symbolic
size (e.g., "n x 3") in the "symbolic" pkg.
Both nan and inf sizes seem ok in Octave (no problems noted yet) but "whos"
and the GUI display the sizes wrong:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
a -2147483648x-2147483648 8 nansz
where "a" is "nan by inf" object.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
With my patch, I get:
>> a = nansz(42)
class is: nansz
with data:
42
>> whos
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
a nanxinf 8 nansz
Total is 1 element using 8 bytes
This could be further improved to "NaNxInf" (as Matlab does), and/or perhaps
also by using the unicode for $\times$.
Comments?
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 07 Feb 2015 02:55:23 PM GMT Name: nansz.m Size: 79B By: cbm
<http://savannah.gnu.org/bugs/download.php?file_id=33022>
-------------------------------------------------------
Date: Sat 07 Feb 2015 02:55:23 PM GMT Name: size.m Size: 244B By: cbm
<http://savannah.gnu.org/bugs/download.php?file_id=33023>
-------------------------------------------------------
Date: Sat 07 Feb 2015 02:55:23 PM GMT Name: infnan_size_whos_gui_output.diff
Size: 2kB By: cbm
<http://savannah.gnu.org/bugs/download.php?file_id=33024>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44201>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly,
Colin Macdonald <=
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Colin Macdonald, 2015/02/07
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Dan Sebald, 2015/02/07
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Colin Macdonald, 2015/02/07
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Dan Sebald, 2015/02/09
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, John W. Eaton, 2015/02/09
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Colin Macdonald, 2015/02/09
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Colin Macdonald, 2015/02/09
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Colin Macdonald, 2015/02/10
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Jordi GutiƩrrez Hermoso, 2015/02/13
- [Octave-bug-tracker] [bug #44201] "whos" and gui display non-integer sizes inf/nan poorly, Rik, 2015/02/15