Mercurial > pytave
comparison @pyobject/subsasgn.m @ 411:3613ffbd52b2
Overhaul implicit conversion of arguments and return values
* oct-py-types.cc, oct-py-types.h (pytave::py_implicitly_convert_argument,
pytave::py_implicitly_convert_return_value): New functions.
* __py_struct_from_dict__.cc, oct-py-eval.cc, pycall.cc, pyeval.cc, pyexec.cc:
Use them instead of legacy conversion functions. Add necessary #includes,
remove #includes of legacy header files.
* @pyobject/subsasgn.m, @pyobject/subsref.m: Change %!tests that depend on
NumPy implicit conversion into %!xtests.
* octave_to_python.cc, octave_to_python.h, python_to_octave.cc,
python_to_octave.h: Delete, no longer used.
* Makefile.am (COMMON_SOURCE_FILES, PYTAVE_HEADER_FILES): Remove the files.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 03 May 2017 16:30:45 -0700 |
parents | 540b36e797c8 |
children |
comparison
equal
deleted
inserted
replaced
410:95c6ad0be828 | 411:3613ffbd52b2 |
---|---|
112 %! d{5} = 12; | 112 %! d{5} = 12; |
113 %! assert (d{"5"}, 10) | 113 %! assert (d{"5"}, 10) |
114 %! assert (d{5.5}, 11) | 114 %! assert (d{5.5}, 11) |
115 %! assert (d{5}, 12) | 115 %! assert (d{5}, 12) |
116 | 116 |
117 %!test | 117 ## Test that depends on implicit creation of NumPy arrays, do we want this? |
118 %!xtest | |
118 %! % 2D array indexing | 119 %! % 2D array indexing |
119 %! A = pyobject ([1.1 2 3; 4 5 6]); | 120 %! A = pyobject ([1.1 2 3; 4 5 6]); |
120 %! A{1, 1} = 10; | 121 %! A{1, 1} = 10; |
121 %! A{1, 3} = 30; | 122 %! A{1, 3} = 30; |
122 %! A{2, 1} = 40; | 123 %! A{2, 1} = 40; |