Comments (2)
Never mind, figured it out. Made the mistake of leaving a 1/log(1) in the data, giving inf... Problem resolved.
It is odd that this gives an indexError though.
from gpfit.
Thanks @1ozturkbe. Agreed that this should fail more gracefully. I reduced your code and data to a MWE:
import numpy as np
from gpfit.fit import fit
logL = np.array([
float("-inf"),
-2.083896,
-1.390749,
-1.021651,
-0.762140,
-0.579818,
-0.432494,
-0.316234])
logh = np.array([
float("-inf"),
8.095855,
8.789002,
9.194467,
9.482149,
9.705293,
9.887614,
10.041765])
cstrt, rms_error = fit(logh,logL, 2, "SMA")
This gives an IndexError
; it should fail more gracefully, probably by raising a ValueError
for the -inf
.
Let's leave this open to make sure we fix it.
from gpfit.
Related Issues (20)
- Ali and I are breaking the multi-dimensional fits HOT 12
- Not compatible with pandas >= 0.19.0 HOT 4
- modularized tests through JenkinsGPkit HOT 11
- too small a value error in "min(exp(B*alpha))" while running ISMA fit HOT 11
- 'FitCS' object has no attribute 'left'
- Add GPfit to PyPI HOT 2
- It's time for a new GPfit logo
- run_tests returns error HOT 2
- v0.1 refactor HOT 10
- Use scipy implementation of Levenberg Marquardt
- Make GPfit object oriented HOT 1
- Unit tests fail for pip-installed gpfit HOT 21
- Update how random seeds are set HOT 3
- Save random seed with fit HOT 2
- Pretty output for when verbosity=1 HOT 3
- Remove duplication of _Fit.params and _Fit.parameters HOT 3
- User should be able to specify number of sig figs HOT 2
- Errors should be given in percentage terms HOT 7
- Should a user supply data in its original or log-transformed form HOT 1
- Issue with plot functionality (or tutorial documentation) HOT 3
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 gpfit.