Skip to content

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

Open

Description

@diegofrias

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)

Activity

  1. changed the title [-]one of the dyn_prog functions have a runtime error ...[/-] [+]one of the dyn_prog functions returns runtime error ...[/+] on Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions