Numerical precision issue in rotate_vector

オープン
#417 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
matplotlib, python

調査の方向性

issue で参照されている rotate_vector の実装の周辺にある lib/mpl_toolkits/basemap/init.py から始めます。32 ビット浮動小数点入力で風向棒のアーティファクトを再現し、64 ビット入力および言及されているより大きなインクリメントと比較して、期待される回転動作を変更せずに結晶状のパターンが除去されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Hi,

I ran into a numerical precision issue when using the rotate_vector function with 32bit floats as input data. In this case, the lat/lon increments used to determine the relative rotation between map projection and the lat/lon grid is chosen too small. The result was a cristalline structure in the plotted wind barbs which patches of barbs pointing in the exact same direction.

https://github.com/matplotlib/basemap/blob/decfa95124dab76499734145d03b002b9db27477/lib/mpl_toolkits/basemap/__init__.py#L3118

Converting the input to 64bit floats solves the issue for me, as did an increase of the increment to 1.0e-4.

Best regards,
Clemens

主要言語
Python
スター
817
フォーク
395
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

matplotlib/basemap のほかの issue

matplotlib/basemap の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。