Fixex #39 by creating the weight vector after the examples are created (and using the size of the index).