# HG changeset patch # User Frederic Bastien # Date 1209494444 14400 # Node ID e3ac93e27e162b857fa289fa6d6cbaf6f693e9e8 # Parent 59757365a057e9bfb6acefa3e3a695f1ad7a86be# Parent 718befdc867137209e968542e70490c4dcb2f5a7 Automated merge with ssh://p-omega1@lgcm.iro.umontreal.ca/tlearn diff -r 718befdc8671 -r e3ac93e27e16 dataset.py --- a/dataset.py Tue Apr 29 14:34:40 2008 -0400 +++ b/dataset.py Tue Apr 29 14:40:44 2008 -0400 @@ -30,7 +30,7 @@ * for example in dataset([field1, field2,field3, ...]): * for val1,val2,val3 in dataset([field1, field2,field3]): * for minibatch in dataset.minibatches([field1, field2, ...],minibatch_size=N): - * for mini1,mini2,mini3 in dataset.minibatches([field1, field2, ...],minibatch_size=N): + * for mini1,mini2,mini3 in dataset.minibatches([field1, field2, field3], minibatch_size=N): * for example in dataset: print example['x'] * for x,y,z in dataset: @@ -46,8 +46,8 @@ To iterate over fields, one can do * for field in dataset.fields(): for field_value in field: # iterate over the values associated to that field for all the dataset examples - * for fields in dataset(field1,field2,...).fields() to select a subset of fields - * for fields in dataset.fields(field1,field2,...) to select a subset of fields + * for field in dataset(field1,field2,...).fields() to select a subset of fields + * for field in dataset.fields(field1,field2,...) to select a subset of fields and each of these fields is iterable over the examples: * for field_examples in dataset.fields(): for example_value in field_examples: diff -r 718befdc8671 -r e3ac93e27e16 test_dataset.py --- a/test_dataset.py Tue Apr 29 14:34:40 2008 -0400 +++ b/test_dataset.py Tue Apr 29 14:40:44 2008 -0400 @@ -1,4 +1,4 @@ - +#!/bin/env python from dataset import * from math import * import numpy