     }
     
     public var array: [[Double]] {
-        let list = self.flat
+        let flat = self.flat
         var array = [[Double]]()
         for var i = 0; i < self.rows; i++ {
             let begin = i * self.cols
             let end = begin + self.cols - 1
-            let item = Array(list[begin...end])
+            let item = Array(flat[begin...end])
             array.append(item)
         }
         return array

        return RMatrix(la: la)
    }
    
    public func invert() -> RMatrix {
        var flat = self.flat
        for var i = 0; i < self.rows * self.cols; i++ {

        
        set(value) {
            var buffer = self.flat
            let index = col + row * self.cols
            assert(index >= 0 && index < self.cols * self.rows)
            buffer[index] = value
            self.la = toLaObject(buffer, rows: self.rows, cols: self.cols)
        }
    }
    
    subscript (rowOrColumn: Int) -> RMatrix {
        get {
            if self.isRowVector {
                let col = checkCol(rowOrColumn)
                let array: [Double] = [0.0]
                array[0] = self[0, col]
                return RMatrix(array: array, rows: 1, cols: 1)
            }
            else if self.isColVector {
                let row = checkRow(rowOrColumn)
                let array: [Double] = [0.0]
                array[0] = self[row, 0]
                return RMatrix(array: array, rows: 1, cols: 1)
            }
            else {
                let row = checkRow(rowOrColumn)
                let slice = la_matrix_slice(   self.la,
                                            la_index_t(row),
                                            0,
                                            1,
                                            1,
                                            1,
                                            la_count_t(self.cols))
                return RMatrix(la: slice)
            }        
        }
    }
    
