arrayfire / arrayfire/arrayfire-python
Bugs in graphics functions
- 主要語言
- Python
- 星號
- 422
- 分支
- 63
- PR 合併指標
- 30 天內沒有已合併 PR
描述
This my code:
`
X = af.image.load_image(F[0],is_color=True)
win = af.Window(1280, 768, "imshow")
win.image(X)
`
It is throwing following error:
>
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in ()
----> 1 win.image(X)
/home/narsi/anaconda3/lib/python3.5/site-packages/arrayfire-3.5.0-py3.5.egg/arrayfire/graphics.py in image(self, img, title)
139 """
140 _cell = _Cell(self._r, self._c, title, self._cmap)
--> 141 safe_call(backend.get().af_draw_image(self._wnd, img.arr, c_pointer(_cell)))
142
143 def scatter(self, X, Y, Z=None, points=None, marker=MARKER.POINT, title=None):
/home/narsi/anaconda3/lib/python3.5/site-packages/arrayfire-3.5.0-py3.5.egg/arrayfire/util.py in safe_call(af_error)
77 err_len = c_dim_t(0)
78 backend.get().af_get_last_error(c_pointer(err_str), c_pointer(err_len))
---> 79 raise RuntimeError(to_str(err_str))
80
81 def get_version():
/home/narsi/anaconda3/lib/python3.5/site-packages/arrayfire-3.5.0-py3.5.egg/arrayfire/util.py in to_str(c_str)
70
71 def to_str(c_str):
---> 72 return str(c_str.value.decode('utf-8'))
73
74 def safe_call(af_error):
AttributeError: 'NoneType' object has no attribute 'decode'
>
Getting same error with fractal example too.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
使用影像範例和分形範例重現故障,然後檢查 arrayfire/graphics.py 中 Window.image 呼叫附近的程式碼,以及 arrayfire/util.py 中 to_str 和 safe_call 附近的程式碼。追蹤圖形操作傳回的後端錯誤;當兩個範例都能在沒有所回報的 AttributeError 的情況下執行並顯示其輸出時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- computer-graphics
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100