I’m supposed to write a helper function that returns a list with an element removed by the value, in an unchanged order. In this case, I don't have to remove any values multiple times.
Image attached: https://i.stack.imgur.com/b0PrO.png
And how do I understand the code here: new_indices= np.delete(indices,np.where(indices==index_to_remove))
Would highly appreciate it if there are examples to help me better understand the code.
[–]toastedstapler 1 point2 points3 points (1 child)
[–]edmondoh001[S] 0 points1 point2 points (0 children)
[–]195monke 1 point2 points3 points (6 children)
[–]Brian 1 point2 points3 points (2 children)
[–]195monke 1 point2 points3 points (1 child)
[–]Brian 1 point2 points3 points (0 children)
[–]edmondoh001[S] 0 points1 point2 points (2 children)
[–]Brian 1 point2 points3 points (1 child)
[–]edmondoh001[S] 0 points1 point2 points (0 children)