Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debugger] float variable equal to math.inf displayed as NaN #15273

Closed
pierre-haessig opened this issue Oct 17, 2023 · 4 comments · Fixed by #15487
Closed

[Debugger] float variable equal to math.inf displayed as NaN #15273

pierre-haessig opened this issue Oct 17, 2023 · 4 comments · Fixed by #15487
Assignees

Comments

@pierre-haessig
Copy link

Description

In JupyterLab Debugger, when debugging a code with a float variable having infinity value (i.e. from math.inf, numpy.inf or float('inf')), the variable is displayed as NaN in the Variables panel, see screenshot:

screenshot JLab_debugger_inf_NaN

Reproduce

Create new notebook in JupyterLab using a Python kernel ("classical" kernel, not xeus-python which I didn't tested.

Add cell with code:

import math
a = math.inf
b = -a
print(a)

Run the cell and enable JupyterLab debugger → see the Variables panel.

Expected behavior

Variables having a +inf or -inf value should be displayed as such.

Context

  • Operating System and version: Linux Ubuntu 22.04
  • Browser and version: tested with
    • Firefox 118.0.2 (64 bits)
    • Chromium Version 118.0.5993.70 (Build officiel) snap (64 bits)
  • JupyterLab version: 4.0.6
@welcome
Copy link

welcome bot commented Oct 17, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Oct 17, 2023
@JasonWeill JasonWeill added pkg:debugger and removed status:Needs Triage Applied to new issues that need triage labels Oct 17, 2023
@andrewfulton9
Copy link
Contributor

I was able to reproduce this as well.

@pierre-haessig
Copy link
Author

is it easy to fix? I have no experience with JLab's codebase. Is it a problem in Javascript?

@ashna1jain
Copy link
Contributor

ashna1jain commented Dec 4, 2023

Hey can someone assign this issue to me? I have fixed this. @pierre-haessig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants