Does Numpy share temporary arrays in expressions like x + = 2 * y?

When evaluating type expressions

x += 2 * y

Does it Numpyfirst allocate a new temporary array for storage 2*y, add it to x, and then delete it, or can it perform all this operation in place?

+4
source share
1 answer

Yup, which creates a temporary array.

NumPy , , Numexpr, , , . .

+2

Source: https://habr.com/ru/post/1648574/


All Articles