Coder Social home page Coder Social logo

Strange sparsity results about carla HOT 8 CLOSED

aredelmeier avatar aredelmeier commented on June 5, 2024
Strange sparsity results

from carla.

Comments (8)

JohanvandenHeuvel avatar JohanvandenHeuvel commented on June 5, 2024 1

Yeah that sounds good.

from carla.

JohanvandenHeuvel avatar JohanvandenHeuvel commented on June 5, 2024

Hi, that should be fixed indeed. I think something like this would work (I didn't test it):

numpy.invert(numpy.isclose(delta, numpy.zeros_like(delta))) instead of delta != 0

That should fix numerical problems like that. Let me know if that works.

from carla.

aredelmeier avatar aredelmeier commented on June 5, 2024

Hi!

That's better but not sure it works perfectly yet. Notice that 1e-08 is still considered non-zero:

image

Annabelle

from carla.

JohanvandenHeuvel avatar JohanvandenHeuvel commented on June 5, 2024

Thanks for checking! There is a tolerance parameter for numpy.isclose (https://numpy.org/doc/stable/reference/generated/numpy.isclose.html). I don't know how high the tolerance should be set.

from carla.

aredelmeier avatar aredelmeier commented on June 5, 2024

Setting atol=1e-5 might be a good place to start?

from carla.

JohanvandenHeuvel avatar JohanvandenHeuvel commented on June 5, 2024

Hello,

If you want you can submit a pull request for that fix. Should be just one line (and maybe a comment), and that way everything is setup in case you would like to contribute something else as well. You might need some tools, found here.

So you just create a new branch of main, implement the fix, push the new branch to GitHub, and make a pull request for the new branch.

But I understand if you are busy with other things.

from carla.

aredelmeier avatar aredelmeier commented on June 5, 2024

Hi!
Sure, I can submit a pull request. Due to deadlines at the end of the week, it won't be until next week. Hope that's fine!
Annabelle

from carla.

JohanvandenHeuvel avatar JohanvandenHeuvel commented on June 5, 2024

That's no problem at all!

from carla.

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.