<< pyAttachModule Python Interaction Mechanism in Scilab pyBuiltin >>

Python Interaction Mechanism in Scilab >> Python Interaction Mechanism in Scilab > pyAutounwrap

pyAutounwrap

Enable/disable autounwrapping

Calling Sequence

[isAutounwrap = ] pyAutounwrap([mustAutounwrap])

Arguments

mustAutounwrap

A boolean.

isAutounwrap

A boolean.

Description

Python functions can return objects which are unwrappable like a number, a numpy matrix, a string, ... So if autounwrap is enabled, then the returned objects will be automatically unwrap.

With no argument, this function returns the current state.

Examples

pyImport math
a = math.sqrt(144);
// a is Python number wrapped in an External Object (_EObj)
typeof(a)
// we can unwrap a
A = pyUnwrap(a);
// A is a Scilab double
typeof(A)

// Now we enable auto-unwrapping
pyAutounwrap(%t)
b = math.sqrt(144)
typeof(b)

pyAutounwrap(%f)
pyRemove math a

See Also

History

VersionDescription
5.4.0 Python module.

Report an issue
<< pyAttachModule Python Interaction Mechanism in Scilab pyBuiltin >>