Comments (5)
Also, when I fix this issue and provide a list of Obs
, as suggested by the documentation, I get the error
Exception: Multi mode currently not supported for numerical derivative
This exception is not thrown, if I provide a plain Obs
, but there is no way for the user to guess that. Also, if the function itself returns an array, even if it is 0-dimensional, the method fails.
from pyerrors.
In general, I think that one or two additional examples how to construct derived observables could make it easier for users. The minimal example with the lambda function in the description might not be sufficient for more complex applications.
from pyerrors.
One easy solution to circumvent this issue is to wrap the function in a lambda function:
pe.derived_observable(lambda x, **kwargs: np.exp(x), pe.cov_Obs(1, .1, 'test'), num_grad=True)
we could add this as another example to the documentation.
I haven't looked at the numerical derivative for quite some time, I think it is only used in tests as of now. We could of course think about exposing a better interface for numerical derivatives if you think that this is useful.
from pyerrors.
That is indeed a good solution! I have tested some cases where numerical derivatives, or at least a cross-check of explicitly provided man_grad
derivatives would be useful. I don't know if someone should use this feature in production code, but it could help in cases where special functions enter in iterative procedures and analytical derivatives are not easily known.
from pyerrors.
I will close this issue for now. We can think about an improved interface for numerical derivatives at a later stage.
from pyerrors.
Related Issues (20)
- Automatic windowing method fails for gapped and irregular chains HOT 4
- Issues with _filter_zeroes and Corr HOT 4
- Exception when applying .symmetric() to Corr containing None HOT 1
- Gamma_method() is broken for Obs that are NaN
- Multi-dimensional fits
- Bug coming from difference in search methods in sfcf inputs HOT 2
- `Corr.show()` draws prange in same color as error bars. HOT 1
- No dobs-related functions from the input submodule can be used HOT 1
- GEVP eigenvectors with errors HOT 7
- Warning in pandas tests
- Numpy 1.25 breaks a few linalg functions HOT 3
- Failing python 3.12 pytest workflow
- Duplicate data cause `gamma_method()` to fail with an unhelpful message HOT 3
- plot_history unexpected behaviour for gapped idl HOT 2
- read_hd5 in pyerrors 2.9.0 not fully backwards compatible to <=2.8.2 HOT 1
- Read specific interval with read_ms5_xsf() HOT 2
- Files keyword for multiple reps in read_sfcf HOT 2
- pyerrors does not work with the upcoming numpy 2 release HOT 7
- Corr.__getitem__ unexpected behaviour HOT 4
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 pyerrors.