next up previous contents index
Next: The SicVar class Up: How SIC variables are Previous: How SIC variables are   Contents   Index

Comments on the strategy

Concerning variables handling from both SIC and Python, the first priority was to manage the same data in memory from the two processes, e.g. a modification of a variable in one process should be instantaneously visible in the other with no particular resynchronization.

Another consideration is that Python does not natively handle multi-dimensionnal arrays. This feature can be easily added, but we need the Numeric package or one of its derivates (including NumPy).

It appeared quite naturally that the solution was to use the PyArray_FromDimsAndData() function of the Numeric C-API: it can construct a Numeric.array from the memory address of an array, its dimensions and its datatype. NumPy also implements this function14 and is used by default. It returns a numpy.ndarray.

With this feature the strategy can be summarized as follow:


next up previous contents index
Next: The SicVar class Up: How SIC variables are Previous: How SIC variables are   Contents   Index
Gildas manager 2014-07-01