Add support for the inplace multiplication operator for instances of MultiIndexSet
Following Issue #119 (closed) and MR !80 (merged), instances of MultiIndexSet
may be multiplied via the *
operator.
For completeness of behaviors associated with the instances of the MultiIndexSet
class,
the inplace multiplication operator (*=
via the method __imul__()
) shall also be implemented such that:
>>> import minterpy as mp
>>> import numpy as np
>>> mi_1 = mp.MultiIndexSet.from_degree(2, 2, 1)
>>> mi_1
MultiIndexSet
[[0 0]
[1 0]
[2 0]
[0 1]
[1 1]
[0 2]]
>>> mi_2 = mp.MultiIndexSet.from_degree(2, 1, 1)
>>> mi_2
MultiIndexSet
[[0 0]
[1 0]
[0 1]]
>>> mi_1 *= mi_2 # equivalent to mi_1 = mi_1 * mi_2
>>> mi_1
MultiIndexSet
[[0 0]
[1 0]
[2 0]
[0 1]
[1 1]
[0 2]]
>>> mi_1.poly_degree
2
This issue is related to the refactoring of MultiIndexSet
(Issue #99 (closed)).