From fa8915a990873086040e29908edc8f9beeb5f220 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Sun, 4 Apr 2021 10:54:44 -0500 Subject: [PATCH] bug fix: matrix allocation error --- data/maker/prepare/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/maker/prepare/__init__.py b/data/maker/prepare/__init__.py index e15c63b..ecb47bd 100644 --- a/data/maker/prepare/__init__.py +++ b/data/maker/prepare/__init__.py @@ -237,7 +237,7 @@ class Input : # # @NOTE: For some reason, there is an out of memory error created here, this seems to fix it (go figure) # - _matrix = np.array([np.zeros(cols.size) for i in np.arange(row_count)]) + _matrix = np.array([np.repeat(0,cols.size) for i in range(row_count)]) [np.put(_matrix[i], np.where(cols == rows[i]) ,1)for i in np.arange(row_count) if np.where(cols == rows[i])[0].size > 0] # else: # _matrix = cp.zeros([row_count,cols.size])