changeset 254:a3660e7f8dc9

Make methods output shape consistent with fieldnames * @pyobject/dummy.m: Update doctests. * @pyobject/methods.m: Make output a column cell array.
author Colin Macdonald <cbm@m.fsf.org>
date Thu, 28 Jul 2016 10:50:17 -0700
parents c8da556b6793
children 9eaed3b11829
files @pyobject/dummy.m @pyobject/methods.m
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/@pyobject/dummy.m	Wed Jul 27 20:30:35 2016 -0700
+++ b/@pyobject/dummy.m	Thu Jul 28 10:50:17 2016 -0700
@@ -32,12 +32,17 @@
 ##   @result{} ans =
 ##     @{
 ##       [1,1] = bit_length
-##       [1,2] = conjugate
-##       [1,3] = denominator
-##       [1,4] = imag
-##       [1,5] = numerator
-##       [1,6] = real
-##      @}
+##       [2,1] = conjugate
+##     @}
+##
+## sort (fieldnames (g))
+##   @result{} ans =
+##     @{
+##       [1,1] = denominator
+##       [2,1] = imag
+##       [3,1] = numerator
+##       [4,1] = real
+##     @}
 ##
 ## g.numerator
 ##   @result{} ans =  6
--- a/@pyobject/methods.m	Wed Jul 27 20:30:35 2016 -0700
+++ b/@pyobject/methods.m	Thu Jul 28 10:50:17 2016 -0700
@@ -38,7 +38,7 @@
 ##   @result{} x =
 ##     @{
 ##       [1,1] = ...
-##       [1,2] = ...
+##       [2,1] = ...
 ##        ...  = chdir
 ##        ...  = getenv
 ##        ...
@@ -91,7 +91,7 @@
     endif
     disp (list_in_columns (mtds_list));
   else
-    mtds = mtds_list;
+    mtds = mtds_list(:);
   endif
 
 endfunction