LinearSpaceElement.assign
- LinearSpaceElement.assign(other, avoid_deep_copy: bool = False)[source]
Assign the values of
othertoself, likeself[:] = other.If
avoid_deep_copyis True, an attempt is made to reuse the storage ofotherforself. This is in general unsafe (later modifications toselfwould impact alsoother, vice versa), but faster and useful particularly whenotheris ephemeral (rvalue, in C++ terminology).Spaces with immutable elements (i.e.,
in_place=NOT_SUPPORTEDinsupported_num_operation_paradigms) may opt for performing only a shallow copy even ifavoid_deep_copyis False. On the other hand, if some type conversion is necessary onotherthen this will usually prompt a copy even ifavoid_deep_copyis True.