bug fix: matrix allocation error

dev
Steve L. Nyemba 4 years ago
parent 6bbe767714
commit fa8915a990

@ -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) # @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] [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: # else:
# _matrix = cp.zeros([row_count,cols.size]) # _matrix = cp.zeros([row_count,cols.size])

Loading…
Cancel
Save