Top "In-place" questions

Use this tag on questions about algorithms that modify the data in-place, as opposed to making a copy.

In-place modification of Python lists

I am trying to perform in-place modification of a list of list on the level of the primary list. However, …

python list in-place
In-place sort_values in pandas what does it exactly mean?

Maybe a very naive question, but I am stuck in this: pandas.Series has a method sort_values and there …

python sorting pandas in-place
Python "IN PLACE" functions

What's the particular reason that some functions in Python operate "IN PLACE", like [].sort and [].reverse, while some others like [].…

python in-place
Python a &= b meaning?

What does the &= operator mean in Python, and can you give me a working example? I am trying to …

python operators ampersand in-place
link_to with jquery params in rails

I want to make an in-place search in my rails app. I used button_to_remote with prototype, but now …

jquery ruby-on-rails search link-to in-place
Converting an empty string to nil in place?

I'm looking for a way to convert an empty string to nil in place using Ruby. If I end up …

ruby string null in-place
Is there an in-place equivalent to 'map' in python?

I have a list of strings that I need to sanitize. I have a method for sanitizing them, so I …

python dictionary in-place
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation

In a pytorch model training process I get this error: RuntimeError: one of the variables needed for gradient computation has …

python pytorch in-place
What is the best way to modify a text file in-place?

Apologies if something similar has already been asked - I did search around a bit, and I probably missed something, …

python file in-place
Replacing words in text file using a dictionary

I'm trying to open a text file and then read through it replacing certain strings with strings stored in a …

python python-2.7 dictionary in-place