GithubHelp home page GithubHelp logo

Comments (6)

albop avatar albop commented on September 2, 2024

@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.

gboehl avatar gboehl commented on September 2, 2024

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.

albop avatar albop commented on September 2, 2024

from interpolation.py.

gboehl avatar gboehl commented on September 2, 2024

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.

albop avatar albop commented on September 2, 2024

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.

gboehl avatar gboehl commented on September 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.