ValueError when setting zmin, zmax for rgb image
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
There seem to be a validation error bug for setting zmin, zmax for rgb images. It appears the validation code expects a tuple or list of size 4 ( as would be the case for rgba) and not size 3 as should be the case for rgb.
im= np.random.randint(256,size=(50,50,3),dtype=np.uint8)
fig = go.Figure(go.Image(z=im,colormodel='rgb',zmin=[10,10,10],zmax=[100,100,100]))
fig.show()
Results in the following error:
File "C:\Users\NA\Anaconda3\lib\site-packages_plotly_utils\basevalidators.py", line 283, in raise_invalid_val
valid_clr_desc=self.description(),
ValueError:
Invalid value of type 'builtins.tuple' received for the 'zmax' property of image
Received value: [100, 100, 100]
The 'zmax' property is an info array that may be specified as:
* a list or tuple of 4 elements where:
(0) The 'zmax[0]' property is a number and may be specified as:
- An int or float
(1) The 'zmax[1]' property is a number and may be specified as:
- An int or float
(2) The 'zmax[2]' property is a number and may be specified as:
- An int or float
(3) The 'zmax[3]' property is a number and may be specified as:
- An int or float
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、長さ3のzmin/zmax値を持つRGB配列で、提供されたNumPyとgo.Imageの例を再現します。ValueErrorを発生させる画像プロパティの検証を追跡し、RGBAの処理と比較します。RGBの範囲が受け入れられ、既存のRGBA検証が引き続き正しく動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- numpy, python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100