Coverage for src/pymor/functions/interfaces : 80%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
# -*- coding: utf-8 -*- # This file is part of the pyMOR project (http://www.pymor.org). # Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
'''Interface for |Parameter| dependent analytical functions.
Every function is a map of the form ::
f(μ): Ω ⊆ R^d -> R^(shape_range)
The returned values are |NumPy arrays| of arbitrary (but fixed) shape. While the function could raise an error if it is evaluated for an argument not in Ω, the exact behavior is left undefined.
Functions are vectorized in the sense, that if `x.ndim = k`, then ::
f(x, μ)[i0, i1, ..., i(k-2)] = f(x[i0, i1, ..., i(k-2)], μ),
in particular `f(x, μ).shape == x.shape[:-1] + shape_range`.
Attributes ---------- dim_domain The dimension d > 0. shape_range The shape of the function values. '''
'''Evaluate the function for given argument and |Parameter|.''' pass
'''Shorthand for :meth:`~FunctionInterface.evaluate`.''' return self.evaluate(x, mu) |