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

Replace infs with nans to avoid crash when creating a heatmap #442

Merged
merged 4 commits into from
Jan 13, 2022

Conversation

cgarciae
Copy link
Contributor

@cgarciae cgarciae commented Jan 6, 2022

Signed-off-by: Cristian Garcia cgarcia.e88@gmail.com

Overview

Fixes #440 by replacing infs with nans.

Changes

Uses

vis._vis_data = vis._vis_data.replace([np.inf, -np.inf], np.nan)

inside PandasExecutor.py on several places to remove infs.

@codecov
Copy link

codecov bot commented Jan 6, 2022

Codecov Report

Merging #442 (7cab120) into master (91e8e98) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #442      +/-   ##
==========================================
+ Coverage   65.55%   65.62%   +0.06%     
==========================================
  Files          55       55              
  Lines        4419     4422       +3     
==========================================
+ Hits         2897     2902       +5     
+ Misses       1522     1520       -2     
Impacted Files Coverage Δ
lux/executor/PandasExecutor.py 89.84% <100.00%> (+0.09%) ⬆️
lux/vislib/altair/ScatterChart.py 96.96% <0.00%> (+3.03%) ⬆️
lux/vislib/altair/Heatmap.py 96.55% <0.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91e8e98...7cab120. Read the comment docs.

Signed-off-by: Cristian Garcia <cgarcia.e88@gmail.com>
tests/test_pandas.py Outdated Show resolved Hide resolved
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# fmt: off
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this line for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove it, vscode was formatting this file that is supposed to be ignored.

@dorisjlee
Copy link
Member

Thanks @cgarciae! I left a few minor suggestions, otherwise, this looks good to merge soon!

@dorisjlee dorisjlee merged commit 4abee66 into master Jan 13, 2022
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.

ValueError: cannot specify integer bins when input data contains infinity [BUG]
2 participants