How to call "__call__()" method of python class from matlab -


i'm working class this:

class select(object):            def __init__(self, interface):         ...      def project(self, id):         ...      def __call__(self, datatype_or_path):         ... 

when try call method (basically functor) matlab like:

select = select(blah); select('blah'); 

i following error:

array formation , parentheses-style indexing objects of class 'py.pyxnat.core.select.select' not allowed.  use objects of class 'py.pyxnat.core.select.select' scalars or use cell array. 

edit:

select.('__call__')('blah') not seem work either

from matlab tech support:

my name sai , writing in reference technical support case #01708094 regarding 'calling python functors through matlab'.

i understand experiencing issues while invoking functor defined in python matlab.

i see using matlab r2014b. please note this known issue in matlab r2014b has been fixed in matlab r2015a , there no known work arounds issue in r2014b. if feasible, recommend upgrade matlab r2015a resolve issue.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -