The data is either empty, a string, or a matrix of numbers. You can read/write it as an array (row-major) or as a collection of rows and columns.
The easiest way to set the data's contents is
>>> node.data = "a string"
>>> node.data = [1, 2, 3] a 3x1 matrix of integers (4-byte signed)
>>> node.data = [1.0, 2, 3] a 3x1 matrix of floating-point (double precision)
You can ignore this stuff unless a node might have data.preload == false,
or [un]loadRows() may have been called.
count
rows
cols
type
(int, float, or string; number of bytes)
size
loaded
loadedRows
preload
data[ index ]
returns
number, string, or None
Access the data as a list.
read/write
setup( type, rows, cols )
resize( newRowcount )
newRowcount
the new number of rows
You can only resize if rows is already nonzero.
(Otherwise, what type/size would the elements have?)
Sorry, can't resize the number of columns.
clear()
loadRows( first, last, doRead )
first
the first row index in the range
last
the last row index in the range
doRead
true: load the data from disk false: just allocate memory
Nodes on disk can keep the data on disk and load portions into RAM as needed.
Nodes that aren't on disk can still pretend.
unloadRows( doWrite )
doWrite
true: write the loaded region to disk false: just free its RAM.
Free up some RAM by paging data out to disk. If you know it hasn't changed, use doWrite = false.
If the node is not on disk, you will not save any RAM, but it will still behave as expected.
row( i )
col( i )