looping_python icon indicating copy to clipboard operation
looping_python copied to clipboard

one of the dyn_prog functions returns runtime error ...

Open diegofrias opened this issue 4 years ago • 0 comments

testing the 14 functions, we found one (solve_numpy_func_buffer) that returns an the error message below:

13 : numpy-b


ValueError Traceback (most recent call last) in 478 --> 479 solution_value, solution_weight, taken = solver(capacity, items, weights, values) 480 481 if verbose:

in solve_numpy_func_buffer(capacity, items, weights, values) 358 this_value = values[item] 359 grid[item+1, :this_weight] = grid[item, :this_weight] --> 360 temp[:capacity+1-this_weight] = grid[item, :-this_weight] + this_value 361 grid[item + 1, this_weight:] = np.where(temp[:-this_weight] > grid[item, this_weight:], temp[:-this_weight], grid[item, this_weight:]) 362

ValueError: could not broadcast input array from shape (0) into shape (96997)

diegofrias avatar Apr 02 '21 13:04 diegofrias