From 23b3c52230b7109cf8696877059262aafad90ca3 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 10 Aug 2022 12:42:11 -0500 Subject: [PATCH] bug fix: decoding matrix --- data/maker/prepare/__init__.py | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/maker/prepare/__init__.py b/data/maker/prepare/__init__.py index 4b0bfd3..c91c773 100644 --- a/data/maker/prepare/__init__.py +++ b/data/maker/prepare/__init__.py @@ -264,7 +264,8 @@ class Input : columns = _args['columns'] _values = np.array( list(self._map.values())) _matrix = pd.DataFrame(_matrix) #if type(_matrix) != pd.DataFrame else _matrix - x = _matrix.apply(lambda row: _values[row.values == 1 ].tolist()[0] if row.values.sum() > 0 else np.repeat(None,row.size), axis=1).tolist() + # x = _matrix.apply(lambda row: _values[row.values == 1 ].tolist()[0] if row.values.sum() > 0 else None, axis=1).tolist() + x = _matrix.apply(lambda row: _values[row.values == 1].tolist()[0] if (row.values == 1).sum() > 0 else None ,axis=1).tolist() return pd.DataFrame(x,columns=columns) diff --git a/setup.py b/setup.py index 0e70341..ba52b61 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -args = {"name":"data-maker","version":"1.5.6", +args = {"name":"data-maker","version":"1.5.8", "author":"Vanderbilt University Medical Center","author_email":"steve.l.nyemba@vumc.org","license":"MIT", "packages":find_packages(),"keywords":["healthcare","data","transport","protocol"]} args["install_requires"] = ['data-transport@git+https://dev.the-phi.com/git/steve/data-transport.git','tensorflow']