# HG changeset patch # User Thierry Bertin-Mahieux # Date 1213216847 14400 # Node ID 14081904d8f3add01628700f9019c8cfc4b8f30d # Parent 5fe6d0c931092d0e9525ee03e4e808ee97b6ba1a doc updated regarding __getitem__ returning LookupList and .subset returning a DataSet diff -r 5fe6d0c93109 -r 14081904d8f3 dataset.py --- a/dataset.py Wed Jun 11 16:28:09 2008 -0400 +++ b/dataset.py Wed Jun 11 16:40:47 2008 -0400 @@ -99,13 +99,24 @@ of examples) can be extracted. These operations are not supported by default in the case of streams. - - dataset[:n] returns a dataset with the n first examples. + - dataset[:n] returns an Example with the n first examples. - - dataset[i1:i2:s] returns a dataset with the examples i1,i1+s,...i2-s. + - dataset[i1:i2:s] returns an Example with the examples i1,i1+s,...i2-s. - dataset[i] returns an Example. - - dataset[[i1,i2,...in]] returns a dataset with examples i1,i2,...in. + - dataset[[i1,i2,...in]] returns a. Example with examples i1,i2,...in. + + A similar command gives you a DataSet instead of Examples : + + - dataset.subset[:n] returns a DataSet with the n first examples. + + - dataset.subset[i1:i2:s] returns a DataSet with the examples i1,i1+s,...i2-s. + + - dataset.subset[i] returns a DataSet. + + - dataset.subset[[i1,i2,...in]] returns a DataSet with examples i1,i2,...in. + - dataset. returns the value of a property associated with the name . The following properties should be supported: