ubermag / discretisedfield

Python package for the analysis and visualisation of finite-difference fields.
http://ubermag.github.io
BSD 3-Clause "New" or "Revised" License
19 stars 13 forks source link

fix: RuntimeWarning in lightness plot #497

Closed lang-m closed 1 year ago

lang-m commented 1 year ago

The warning originates from the cast from float to int (inside matplotlib) when there are invalid parts in the field. We did set those to np.nan and get a warning about invalid values in the cast to uint8.

github-actions[bot] commented 1 year ago

PR Analysis

How to use

To invoke the PR-Agent, add a comment using one of the following commands: /review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option. /describe: Modify the PR title and description based on the contents of the PR. /improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback. /ask \<QUESTION>: Pose a question about the PR. /update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value For example: /review --pr_reviewer.extra_instructions="focus on the file: ..." To list the possible configuration parameters, use the /config command.

lang-m commented 1 year ago

/review

github-actions[bot] commented 1 year ago

PR Analysis

How to use

To invoke the PR-Agent, add a comment using one of the following commands: /review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option. /describe: Modify the PR title and description based on the contents of the PR. /improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback. /ask \<QUESTION>: Pose a question about the PR. /update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value For example: /review --pr_reviewer.extra_instructions="focus on the file: ..." To list the possible configuration parameters, use the /config command.

codecov-commenter commented 1 year ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (89068b8) 93.49% compared to head (cedffde) 93.49%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #497 +/- ## ======================================= Coverage 93.49% 93.49% ======================================= Files 28 28 Lines 3027 3027 ======================================= Hits 2830 2830 Misses 197 197 ``` | [Files](https://app.codecov.io/gh/ubermag/discretisedfield/pull/497?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ubermag) | Coverage Ξ” | | |---|---|---| | [discretisedfield/plotting/mpl\_field.py](https://app.codecov.io/gh/ubermag/discretisedfield/pull/497?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ubermag#diff-ZGlzY3JldGlzZWRmaWVsZC9wbG90dGluZy9tcGxfZmllbGQucHk=) | `91.34% <100.00%> (ΓΈ)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lang-m commented 1 year ago

/improve --extended