Mercurial > hg > audiodb
diff bindings/python/pyadb.py @ 749:dd4b9fec8d85
added support for timesData
author | mas01mc |
---|---|
date | Wed, 24 Nov 2010 13:50:05 +0000 |
parents | e5f96902afaf |
children | d93292ae7c1b |
line wrap: on
line diff
--- a/bindings/python/pyadb.py Mon Nov 22 17:58:27 2010 +0000 +++ b/bindings/python/pyadb.py Wed Nov 24 13:50:05 2010 +0000 @@ -72,11 +72,13 @@ args["power"]=powerFile elif featData.any(): args["power"]=powerData + if timesData != None: + self.hasTimes=True if self.hasTimes: if featFile: args["times"]=timesFile elif timesData.any(): - pass + args["times"]=timesData if key: args["key"]=str(key) if featFile: @@ -94,6 +96,11 @@ if (len(args["power"].shape) == 1) : args["power"] = args["power"].reshape((args["power"].shape[0],1)) args["power"] = args["power"].flatten() + if(self.hasTimes and timesData != None): + if (len(args["times"].shape) == 1) : + args["times"] = args["times"].reshape((args["times"].shape[0],1)) + args["times"] = args["times"].flatten() + print "args: " + str(args) ok = _pyadb._pyadb_insertFromArray(**args) if not (ok==0):