Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one of the dyn_prog functions returns runtime error ... #2

Open
diegofrias opened this issue Apr 2, 2021 · 0 comments
Open

one of the dyn_prog functions returns runtime error ... #2

diegofrias opened this issue Apr 2, 2021 · 0 comments

Comments

@diegofrias
Copy link

diegofrias commented Apr 2, 2021

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 diegofrias changed the title one of the dyn_prog functions have a runtime error ... one of the dyn_prog functions returns runtime error ... Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant