Ignore:
Timestamp:
03/22/12 14:14:00 (2 years ago)
Author:
anze <anze.staric@…>
Branch:
default
Message:

Fixed handling of unknown values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/projection/linear.py

    r10613 r10644  
    12571257            dataset = data.Table(self.input_domain, dataset) 
    12581258 
    1259         X, = dataset.to_numpy("a") 
     1259        X, = dataset.to_numpy_MA("a") 
    12601260        Xm, U = self.mean, self.projection 
    12611261        n, m = X.shape 
     
    12701270 
    12711271        self.A = numpy.dot(Xd, U.T) 
    1272  
    1273         # TODO: Delete when orange will support creating data.Table from masked array. 
    1274         self.A = self.A.filled(0.) if isinstance(self.A, numpy.ma.core.MaskedArray) else self.A 
    1275         # append class variable 
    12761272 
    12771273        class_, classes = dataset.to_numpy("c")[0], dataset.to_numpy("m")[0] 
     
    13551351        if not len(dataset) or not len(dataset.domain.features): 
    13561352            raise ValueError("Empty dataset") 
    1357         X = dataset.to_numpy("a")[0] 
     1353        X = dataset.to_numpy_MA("a")[0] 
    13581354 
    13591355        Xm = numpy.mean(X, axis=0) 
Note: See TracChangeset for help on using the changeset viewer.