Skip to content

PR for RuntimeWarning: divide by zero encountered in scalar divide #383

Closed

Description

@auee028

I got an error of zero division error as below:

/home/user/.../anaconda3/envs/.../lib/python3.9/site-packages/pyrep/robots/configuration_paths/arm_configuration_path.py:172: RuntimeWarning:

divide by zero encountered in scalar divide

/home/user/.../anaconda3/envs/.../lib/python3.9/site-packages/pyrep/robots/configuration_paths/arm_configuration_path.py:181: RuntimeWarning:

invalid value encountered in multiply

To avoid such error, it seems necessary to do something e.g. to change line 172 from t = (pos - lengths[i]) / (lengths[i + 1] - lengths[i]) to t = (pos - lengths[i]) / (lengths[i + 1] - lengths[i]) if (lengths[i + 1] - lengths[i]) else 0.

Activity

  1. MurakamiNatsuki commented on Aug 22, 2024

    @MurakamiNatsuki

    Hi! I got same error.
    Did you manage to solve it as in your example? Or is it still unresolved?

  2. auee028 commented on Aug 22, 2024

    @auee028
    Author
  3. MurakamiNatsuki commented on Aug 23, 2024

    @MurakamiNatsuki

    Thank you for your prompt reply!
    I suspected it might be an issue with the version, but it seems that’s not the case.
    If you find out anything else, please let me know. I’ll also do some research on my end.

  4. auee028 commented on Aug 23, 2024

    @auee028
    Author
  5. stale commented on Apr 26, 2025

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  6. added
    staleNo activity. Will be closed soon.
    on Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleNo activity. Will be closed soon.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions