nschloe / termplotlib

:chart_with_upwards_trend: Plotting on the command line
GNU General Public License v3.0
675 stars 19 forks source link

Attempted fix for barh integer type check #62

Closed TungE closed 3 years ago

TungE commented 3 years ago

I am running into the same ValueError for what was reported at the top of #27. The barh function has worked for float values except when all included float values are equal to their rounded values (e.g., 1.0, 12.0). I found this integer type check which I believe is the source of the issue. After changing this line and testing it very briefly, it no longer seems to be an issue.

TungE commented 3 years ago

I had missed that numpy arrays will use the numpy.integer type. I added that in and the unit tests pass locally now.

nschloe commented 3 years ago

A better fix is in https://github.com/nschloe/termplotlib/pull/63/files#diff-f44133f5ad6d983214b2d43d4843be6e8ad79f04e92cb7300e09c4dfb3638188R39.