<< pyImport Python Interaction Mechanism in Scilab pyKill >>

Python Interaction Mechanism in Scilab >> Python Interaction Mechanism in Scilab > pyInvoke

pyInvoke

Invoke a Python callable object.

Calling Sequence

X = pyInvoke(callable [, arg_1 [, arg_2 ...]])

Arguments

callable

A Python object.

arg_i

A Python object or a Scilab wrappable data.

X

A Python object.

Description

Invoke the callable object with the given arguments.

Examples

pyUseNumpy(%t);
pyImport numpy math

r = rand(10, 10);
sr = sqrt(r);
R = pyWrap(r);

py_sqrt = pyGetAttr(math, "sqrt");
np_sqrt = numpy.vectorize(py_sqrt);

SR = pyUnwrapRem(pyInvoke(np_sqrt, R));

// We should have true ...
and(sr == SR)

pyRemove numpy math R py_sqrt n_sqrt
pyUseNumpy(%f)

History

VersionDescription
5.4.0 Python module.

Report an issue
<< pyImport Python Interaction Mechanism in Scilab pyKill >>