Comments (4)
What do you want to use this for? To create a constant time-dependent parameter? That can be done with the following:
from pymor.parameters.base import Parameters
n = 2
mu = Parameters(t=1, f=n).parse({'t': 1.5, 'f': str(n * [1])})
mu # Mu({'f': ExpressionFunction('[1, 1]', variable='t'), 't': array([1.5])})
mu['t'] # array([1.5])
mu['f'] # array([1, 1])
Although, if the time-dependent parameter is constant, it could just be a regular parameter.
from pymor.parameters.base import Parameters
n = 2
mu = Parameters(t=1, f=n).parse({'t': 1.5, 'f': n * [1]})
mu # Mu({'f': array([1, 1]), 't': array([1.5])})
mu['t'] # array([1.5])
mu['f'] # array([1, 1])
It would probably still be good for parse
to give better error messages or even make it work with ConstantFunctions
.
from pymor.
What do you want to use this for? To create a constant time-dependent parameter?
Thanks for the snippets. I am using it here as an input to compute
which only accepts a NumPy array or Function
.
from pymor.
What do you want to use this for? To create a constant time-dependent parameter?
Thanks for the snippets. I am using it here as an input to
compute
which only accepts a NumPy array orFunction
.
I'm confused. Wouldn't it be more straightforward (and efficient) to use input = np.zeros(self.dim_input)
?
from pymor.
I'm confused. Wouldn't it be more straightforward (and efficient) to use
input = np.zeros(self.dim_input)
?
Good point. In this case yes. In impulse_resp
, however, I need a Function
.
from pymor.
Related Issues (20)
- Remove names and space ids?
- `LTIModel.hinf_norm()` always raises `TypeError` with additional argument `return_fpeak`
- How do I import results from commercial CFD calculation software into pyMOR?
- Matplotlib get_cmap deprecation warning
- `TransferFunction` presets
- Storing visualizations as images or videos
- Pull request template
- instantiating `Timer` without arguments raises error HOT 2
- NumPy scalar conversion DeprecationWarning in PAAA
- Slycot may mutate LTIModel HOT 1
- Make solve() able to return newton stages HOT 1
- The function output() cannot be called on a sum/difference of LTIModels HOT 4
- Developer instructions for conda
- Inconsistent warnings about converting to matrix HOT 1
- Support NumPy 2.0 HOT 2
- Minimum Python version in `src/pymor/__init__.py`
- non-SISO data leads to shape error in `PAAAReductor` HOT 1
- Bugs with certain input data for `LoewnerReductor`
- Unnecessary copys in `sry/pymor/vectorarrays/numpy.py` in `NumpyVectorArrayImpl` functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymor.