| Example 1: |
The following Python example shows how to extract a particular column or row from the central data matrix "dl.dstore" and assign it to a vector. The vector x becomes a copy of column 13, the vector y becomes a copy of the row 4 (please note that array indexing in Python is 0-based, while in DataLab and in DLabPascal it is 1-based; thus the 13th column has the index 12 in Python):
import datalab as dl
from datalab import *
x = dl.dstore[:,12] # extract column 13
y = dl.dstore[3,:] # extract row 4
print (x)
print (y)
|