Skip to content

import numpy as np for lines 44 and 51#1161

Merged
j9ac9k merged 6 commits intopyqtgraph:developfrom
cclauss:patch-1
May 30, 2020
Merged

import numpy as np for lines 44 and 51#1161
j9ac9k merged 6 commits intopyqtgraph:developfrom
cclauss:patch-1

Conversation

@cclauss
Copy link
Copy Markdown
Contributor

@cclauss cclauss commented Apr 9, 2020

  1. Undefined name np in pyqtgraph/PlotData.py
    2. To fix CI, make sure that call_with_timeout() polls at least once.

@j9ac9k @2xB Your reviews please.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Apr 9, 2020

Thanks for the PR @cclauss

The CI doesn't like the change you made to test_exit_crash

>       for i in range(max(timeout // wait_per_poll, 1)):  # Poll at least once
E       TypeError: range() integer end argument expected, got float.

Fired up my own interpretter

>>> max(5.5 // 2, 1)
2.0

Probably should wrap that max statement as an int

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented May 30, 2020

Thanks for this PR @cclauss , sort of amazing we haven't noticed this before.

@j9ac9k j9ac9k merged commit 2a6f3f0 into pyqtgraph:develop May 30, 2020
@cclauss cclauss deleted the patch-1 branch May 30, 2020 15:20
@cclauss
Copy link
Copy Markdown
Contributor Author

cclauss commented May 30, 2020

It can happen that another file has already imported numpy so things work but then if code get refactored, things break. This is safer.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants