Unwrap a Python object into Scilab data
x = pyUnwrap(X)
A Python object
A double or boolean or integer or string matrix.
Unwrap a Python object into a Scilab data. Floats, complexes, integers, booleans and strings can be unwrapped. A one-dimension list is converted a row, a two-dimensional one into a matrix. The Numpy matrices can be unwrapped too.
It is possible to unwrap the returned objects in using the function pyAutounwrap.
a = 1:10; sa = sqrt(a); // We wrap a A = pyWrap(a); // We import the math module pyImport math; // py is a wrapper for __builtin__ module py = pyBuiltin() py_sqrt = pyGetAttr(math,"sqrt"); SA = py.map(py_sqrt, A) // SA and sa should contain the same values and(pyUnwrap(SA) == sa) pyRemove A math py py_sqrt SA | ![]() | ![]() |
Version | Description |
5.4.0 | Python module. |