Menu

#12 Constructing numericLabel Datasets from arrays fails.

open
nobody
None
5
2010-02-04
2010-02-04
luke
No

Version 0.7.0

When constructing datasets from arrays the keyword args are not passed to Labels constructor.
Causes problems in particular when using numericLabels, but may have other effects.

Solution

In file PyML/containers/baseDatasets.py line 300
replace:
self.attachLabels(Labels(L, patternID=patternID))
with:
self.attachLabels(Labels(L, patternID=patternID, **args))

This matches the process used in the constructFromFile method, line 268.

Corrected file attached.

Discussion

  • luke

    luke - 2010-02-04

    Corrected file baseDatasets.py

     
  • luke

    luke - 2010-02-04

    P.S. Bug 2816816 refers to uninitialised attribute in Labels class, this may also be related to this bug (and solved by this fix). More detail is needed.

     

Log in to post a comment.