comparison @pyobject/cell.m @ 427:750a86973625

Update doctests for display changes The output of display was recently improved by commit 24546b7021db2ab2553357f691450144c6c5ab50 but the doctests were not updated. * @pyobject/dummy.m, @pyobject/cell.m, @pyobject/display.m: update doctests. * pyargs.m: update doctests.
author Colin Macdonald <cbm@m.fsf.org>
date Wed, 25 Oct 2017 13:16:53 -0700
parents 087e7bc3697f
children 3af3665348a1
comparison
equal deleted inserted replaced
426:8a26a4e649ba 427:750a86973625
26 ## For example, by default Python lists are not automatically 26 ## For example, by default Python lists are not automatically
27 ## converted into native Octave objects: 27 ## converted into native Octave objects:
28 ## @example 28 ## @example
29 ## @group 29 ## @group
30 ## L = pyeval ("[10.0, 20.0, 'hello']") 30 ## L = pyeval ("[10.0, 20.0, 'hello']")
31 ## @result{} L = [pyobject ...] 31 ## @result{} L = [Python object of type list]
32 ## 32 ##
33 ## [10.0, 20.0, 'hello'] 33 ## [10.0, 20.0, 'hello']
34 ## @end group 34 ## @end group
35 ## @end example 35 ## @end example
36 ## 36 ##
37 ## However, we can convert the list to a cell array: 37 ## However, we can convert the list to a cell array:
38 ## @example 38 ## @example
39 ## @group 39 ## @group
40 ## @c TODO: display of cell array in flux: savannah.gnu.org/bugs/?50756
41 ## @c doctest: +XFAIL
40 ## C = cell (L) 42 ## C = cell (L)
41 ## @result{} C = 43 ## @result{} C =
42 ## @{ 44 ## @{
43 ## [1,1] = 10 45 ## [1,1] = 10
44 ## [1,2] = 20 46 ## [1,2] = 20
45 ## = [pyobject ...] 47 ## [1,3] = [Python object of type str]
46 ## 48 ##
47 ## hello 49 ## hello
48 ## @} 50 ## @}
49 ## @end group 51 ## @end group
50 ## @end example 52 ## @end example
51 ## 53 ##
52 ## The conversion is not recursive, in the following sense: 54 ## The conversion is not recursive, in the following sense:
53 ## @example 55 ## @example
54 ## @group 56 ## @group
57 ## @c TODO: display of cell array in flux: savannah.gnu.org/bugs/?50756
58 ## @c doctest: +XFAIL
55 ## L = pyeval ("[10.0, 20.0, [33.0, 44.0], 50.0]"); 59 ## L = pyeval ("[10.0, 20.0, [33.0, 44.0], 50.0]");
56 ## C = cell (L) 60 ## C = cell (L)
57 ## @result{} C = 61 ## @result{} C =
58 ## @{ 62 ## @{
59 ## [1,1] = 10 63 ## [1,1] = 10
60 ## [1,2] = 20 64 ## [1,2] = 20
61 ## = [pyobject ...] 65 ## [1,3] = [Python object of type list]
62 ## 66 ##
63 ## [33.0, 44.0] 67 ## [33.0, 44.0]
64 ## 68 ##
65 ## [1,4] = 50 69 ## [1,4] = 50
66 ## @} 70 ## @}