bug fix: matrix allocation error

This commit is contained in:
Steve Nyemba 2021-04-04 10:54:44 -05:00
parent 6bbe767714
commit fa8915a990
1 changed files with 1 additions and 1 deletions

View File

@ -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])