Closed roksikonja closed 4 years ago
Hello, thank you for reporting this issue.
Starting v0.7.1 grid2op is using np.float32
for all float types. See v0.7.1 Changelog
We also have been working on improving plotting capabilities, as described in the following notebook: getting_started/7_PlottingCapabilities
We recommend you use the new module grid2op.PlotGrid
.
We missed the generated documentation in the update process, that is now fixed in 0.8.2 thanks to this issue.
Please let us know if you still encounter issues, Best,
Running a dummy example outputs a grid visualization with poor text formatting. After investigating the matter, I figured that the method
BasePlot._get_text_unit
is not formatting the float values, since the conditionisinstance(number, float) or isinstance(number, np.float)
is alwaysFalse
. This happens since my machine usesnp.float32
as a default data type for floats. Thus the issue can be fixed by adding an additional clause to the condition:isinstance(number, float) or isinstance(number, np.float) or isinstance(number, np.float32)
. This efficiently solves the problem.Best, RŠ