Add functionality for evaluating a function on a Grid.
Add functionality for evaluating a function on a Grid
An instance of Grid
may now be used as a Callable
. The __call__()
method of the Grid
class evaluates a given function on the unisolvent nodes of the grid and returns the corresponding function values.
Additionally:
- Additional arguments to the function may be passed in the call to the
Grid
instance either via positional or keyword arguments. - The test suite has been updated to reflect these changes.
- A guide on how to use this feature is added to the documentation.
- The not-yet-implemented method
apply_func()
has been removed in favor of__call__()
. - The docstring of the property
unisolvent_nodes
has been updated as well as the test suite. - The properties
max_exponent
andmax_exponents()
now returnNone
for an empty multi-index set. Previously, accessing these properties for an empty set raises an exception asnp.max
cannot work on an empty array. The test suite has been updated accordingly. - Generating points argument is now copied in the construction of
Grid
to avoid accidental changes from the outside.
This commit should resolve Issue #153 (closed) and part of the refactoring of the Grid
class (Issue #135).