next up previous contents
Next: TransposeView Up: Views Previous: RowSupersetView   Contents

ColumnSupersetView

Where the RowSupersetView concatenates along the columns, the ColumnSupersetView concatenates along the rows. There exists the analogous restriction that the datasets being merged must have the same number of rows.

Continuing with the previous example, let's combine the RowSupersetView with another dataset in a ColumnSupersetView.

>>> ds3 = Dataset(MLab.rand(4,1))
>>> ds3.getData()
[[ 0.4922913 ,]
 [ 0.44203174,]
 [ 0.75371045,]
 [ 0.12824887,]]
>>> ss2 = ColumnSupersetView(ss1, ds3)
>>> ss2.getData()
[[ 0.12192474, 0.89563274, 0.4922913 ,]
 [ 0.3412022 , 0.25135848, 0.44203174,]
 [ 0.12337618, 0.9021067 , 0.75371045,]
 [ 0.4221943 , 0.98156619, 0.12824887,]]

As you can see, the SupersetView provides a very convenient way to stitch together multiple, partial datasets and treat them as a contiguous whole. This is especially useful when a dataset has been split into multiple subsets and only 'interesting' subsets, which satisfy some criteria, are of further interest. The relevant subsets may be superset together to synthesize the desired dataset.



Lucas Scharenbroich 2003-08-27