587b6b555d26908309e62611abe8d84a30035d03,pymc/database/sqlite.py,Trace,_initialize,#Trace#Any#Any#,40

Before Change



        // Determine size
        try:
            self._size = np.size(self._getfunc())
            self._shape = np.shape(self._getfunc())
        except TypeError:
            self._size = 1
            self.shape = None

        query = "create table %s (recid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, trace  int(5), %s FLOAT)" % (self.name, " FLOAT, ".join(["v%s" % (x+1) for x in range(self._size)]))
        self.db.cur.execute(query)

    def tally(self, chain):
        Adds current value to trace.

After Change


        except TypeError:
            self._shape = None
            
        self._vstr = ", ".join(var_str(self._shape))

        // If the table already exists, exit now.
        if chain != 0:
            return

        // Create the variable name strings.
        vstr = ", ".join(v + " FLOAT" for v in var_str(self._shape))
        
        query = "create table %s (recid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, trace  int(5), %s )" % (self.name, vstr)
        
        self.db.cur.execute(query)

        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 29

Instances


Project Name: pymc-devs/pymc3
Commit Name: 587b6b555d26908309e62611abe8d84a30035d03
Time: 2009-09-30
Author: david@huard.(none)
File Name: pymc/database/sqlite.py
Class Name: Trace
Method Name: _initialize


Project Name: pymc-devs/pymc3
Commit Name: 3c914107ea7589dd9dc727ae5914a934ce1b5ea1
Time: 2009-10-02
Author: david@huard.(none)
File Name: pymc/database/sqlite.py
Class Name: Trace
Method Name: _initialize


Project Name: pymc-devs/pymc3
Commit Name: 587b6b555d26908309e62611abe8d84a30035d03
Time: 2009-09-30
Author: david@huard.(none)
File Name: pymc/database/sqlite.py
Class Name: Trace
Method Name: _initialize


Project Name: pymc-devs/pymc3
Commit Name: f5d6842b017014afd756ab5441dbc154658c1515
Time: 2010-01-10
Author: fonnesbeck@smoltz-wireless.otago.ac.nz
File Name: pymc/database/mysql.py
Class Name: Trace
Method Name: _initialize