dfm / dfm/corner.py

Crash with float-type bins

Open
#111 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
576
Forks
234
PR merge metrics
No merged PRs in 30d

Description

In Python 2.7, NumPy 1.14.0, and corner 1.0.2, crashes with the error "TypeError: bins must be an integer, a string, or an array". This is probably related to https://github.com/numpy/numpy/issues/8072 -- because bins are defined in corner.py as floats.

Obvious fix would be to cast the bins to type int before drawing the histograms.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported crash with Python 2.7, NumPy 1.14.0, and corner 1.0.2, then inspect corner.py where bins are defined and passed to histogram drawing. Done means the same histogram path accepts the bins and no longer raises the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data-visualization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.