You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#860 suggest supporting in-place operations on SparseLabelOp instances. That issue focuses on the addition of an inplace keyword argument to the public API where this can be useful.
This issue suggests to take this one step further and implement similar methods to allow in-place numerical operations such as addition, scalar multiplication, etc.This can be done by implementing the dunder methods like __iadd__ which get called when doing a += b (currently this gets expanded to a = a + b).
The text was updated successfully, but these errors were encountered:
The type of SparseLabelOp will change from Mapping to MutableMapping (or even dict)
Setting copy=False in SparseLabelOp.__init__ won't be supported. Because the argument data can be a Mapping which may be immutable, we will need to copy the data no matter what. So we should just remove the copy argument.
Alternatively, we can keep the copy argument but change the type of data from Mapping to MutableMapping (or dict)
What is the expected enhancement?
#860 suggest supporting in-place operations on
SparseLabelOp
instances. That issue focuses on the addition of aninplace
keyword argument to the public API where this can be useful.This issue suggests to take this one step further and implement similar methods to allow in-place numerical operations such as addition, scalar multiplication, etc.This can be done by implementing the dunder methods like
__iadd__
which get called when doinga += b
(currently this gets expanded toa = a + b
).The text was updated successfully, but these errors were encountered: