Skip to content

Fix Issue #76: More transparent setting the default for lp-degree

Damar Wicaksono requested to merge dev-76 into dev
  • The default lp-degree parameter in the from_degree() constructor of MultiIndexSet is now more transparently set; it uses a variable defined in the global setting module (i.e., minterpy.global_settings.DEFAULT_LP_DEG)
  • The lp-degree parameter must now be a strictly positive value; verification procedure is carried out.
  • The test suite has been extended to check if invalid lp-degree values indeed raise an error.

This MR should resolve Issue #76 (closed).

In relation to Issue #37 (closed):

  • I decided to remove the default lp-degree in the default constructor (__init__()). The parameter is now mandatory; I think when a user creates a multi-index set from a given set of exponents, they must decide from the outset the lp-degree in which the polynomial belongs to. This should minimize later confusion.
  • The default remains in place, however, for the from_degree() constructor; I think this should be okay and just mildly "impose" internal preference that lp-degree 2.0 most probably is the better choice.
  • Due to the removal of the default value, this MR is potentially a breaking change.
Edited by Damar Wicaksono

Merge request reports

Loading