Mercurial > hg > audiodb
comparison bindings/python/pyadb.py @ 720:2fad8cfdb2d8
number of dims and number of vectors were backward stylistic standard.
author | map01bf |
---|---|
date | Fri, 25 Jun 2010 19:49:30 +0000 |
parents | e3f1cf653c30 |
children | 70542745f473 |
comparison
equal
deleted
inserted
replaced
719:e3f1cf653c30 | 720:2fad8cfdb2d8 |
---|---|
82 else: | 82 else: |
83 self._updateDBAttributes() | 83 self._updateDBAttributes() |
84 return | 84 return |
85 elif (featData != None): | 85 elif (featData != None): |
86 if (len(args["features"].shape) == 1) : args["features"] = args["features"].reshape((args["features"].shape[0],1)) | 86 if (len(args["features"].shape) == 1) : args["features"] = args["features"].reshape((args["features"].shape[0],1)) |
87 args["nDim"], args["nVect"] = args["features"].shape | 87 args["nVect"], args["nDim"] = args["features"].shape |
88 args["features"] = args["features"].flatten() | 88 args["features"] = args["features"].flatten() |
89 print "args: " + str(args) | 89 print "args: " + str(args) |
90 ok = _pyadb._pyadb_insertFromArray(**args) | 90 ok = _pyadb._pyadb_insertFromArray(**args) |
91 if not (ok==0): | 91 if not (ok==0): |
92 raise RuntimeError("Direct data insertion failed for an unknown reason. err code = %i"%ok) | 92 raise RuntimeError("Direct data insertion failed for an unknown reason. err code = %i"%ok) |