Comments (6)
@gboehl Thanks for your interest.
The xto.LINEAR, xto.CONSTANT and other options are objects which are just designed so as to hold different types so multiple dispatch can occur. Initial idea was to define them as different jitted classes which are then automatically of a different type (see https://github.com/EconForge/interpolation.py/blob/master/interpolation/splines/option_types.py).
But, as I just learnt, jitclasses don't seem to be unboxed correctly in njitted context, numba/numba#2501 . I have pushed a temporary workaround where xto.LINEAR is just a random tuple value. The implementation is ugly but it seems to work. Could you try master a few minutes from now ?
from interpolation.py.
Thanks for the quick fix. It seems that you closed your PR instead of merging it. Anyways, I checked out albob/fix_xto
and now using the xto.LINEAR
option does not throw errors. Results seem reasonable.
Many thanks!
from interpolation.py.
from interpolation.py.
Sorry, this is not a fix as it seems to be messing with the shape of the output of the interpolation. I'll have closer look next week.
from interpolation.py.
Strange, I would have assume output shape would be independent from the interpolation method. I don't have any obvious anomaly on my laptop. If you want to look I would suggest to start with splines/eval_splines.py . This is were the time dispatch is implemented. It is a bit heavy because of the need to overload function. Dispatch rules determine the source code of the actual spline interpolation logic. You can just look at the output of lines 102 and 127 to see exactly what is being generated (maybe we should have a debug option somewhere instead of commented print statements...)
from interpolation.py.
I can't reproduce this on my workstation with the latest versions of the related packages, so I assume that the error was somehow related to my python environment. Thanks a lot for the quick reaction!
(closing)
from interpolation.py.
Related Issues (20)
- Is the dependency on tempita necessary? HOT 7
- `eval_splines` gives error `TypeError: 'module' object is not callable` HOT 2
- "interp" not working with python 3.11 HOT 2
- Errors with multidimensional outputs HOT 4
- eval_spline() doesn't recognize argument `k=` HOT 5
- literal type error when eval_spline() called without some keyword arguments HOT 4
- New version HOT 5
- Numba warnings HOT 8
- eval_cubic fails when array to interpolate on is non-writable
- After 2.2.0 eval_linear needs C-order and dtype FLOAT64 HOT 3
- guvectorized wrapping of eval_linear() appears broken HOT 2
- DOC: reorganize
- 1D interpolation with eval_linear HOT 5
- Documentation link broken HOT 1
- Import jitclass error HOT 1
- interpolating wind data on the satellilte track (in same lon lat time)
- Documentation for derivatives HOT 9
- Error when running example code in the documentation HOT 3
- `curses` requirement? HOT 6
- Python 3.10 support HOT 2
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 interpolation.py.