conflict with matplotlib.pyplot
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
研究方向
使用 matplotlib.pyplot、ArrayFire、算術運算和 data.join 重現提供的 Python 3.6 範例。檢查 arrayfire/data.py 中的 join、arrayfire/util.py 中的 safe_call,以及回報的路徑 src/backend/cuda/jit.cpp,以確定為什麼 import 順序會改變 JIT 失敗;當重現程式不再出錯且不需要透過調整 import 順序來繞過時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
These codes will trigger an error in just in time compiler
import matplotlib; matplotlib.use('Agg')
import matplotlib.pyplot as plt
import arrayfire as af
a = af.data.range( 640, 1280, dim=0 )
b = af.data.range( 640, 1280, dim=0 ) - 1
af.data.join(0,a,b,)
and the error output is
Traceback (most recent call last):
File "test.py", line 8, in <module>
af.data.join(0,a,b,)
File "/home/herbert/anaconda3/lib/python3.6/site-packages/arrayfire/data.py", line 320, in join
safe_call(backend.get().af_join(c_pointer(out.arr), dim, first.arr, second.arr))
File "/home/herbert/anaconda3/lib/python3.6/site-packages/arrayfire/util.py", line 79, in safe_call
raise RuntimeError(to_str(err_str))
RuntimeError: In function std::vector<char> cuda::compileToPTX(const char*, std::string)
In file src/backend/cuda/jit.cpp:
However, without any major change, the following two will not,
# change the import order between pyplot and arrayfire
import matplotlib; matplotlib.use('Agg')
import arrayfire as af
import matplotlib.pyplot as plt
a = af.data.range( 640, 1280, dim=0 )
b = af.data.range( 640, 1280, dim=0 ) - 1
af.data.join(0,a,b,)
or
# do not perform the arithmetic operation on one of the array
import matplotlib; matplotlib.use('Agg')
import matplotlib.pyplot as plt
import arrayfire as af
a = af.data.range( 640, 1280, dim=0 )
b = af.data.range( 640, 1280, dim=0 )
af.data.join(0,a,b,)
Here is my python environment obtained by running python in a terminal.
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
- 主要語言
- Python
- 星號
- 422
- 分支
- 63
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
arrayfire/arrayfire-python 的其他 Issue
-
難度 5/5 一週以上 新手友好度 25/100
arrayfire/arrayfire-python#271 ·
-
難度 5/5 一週以上 新手友好度 25/100
arrayfire/arrayfire-python#270 ·
-
難度 4/5 3-5 天 新手友好度 35/100
arrayfire/arrayfire-python#269 ·
-
難度 4/5 3-5 天 新手友好度 38/100
arrayfire/arrayfire-python#268 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 48/100
arrayfire/arrayfire-python#267 · 1 則留言 · 1 個 reaction ·
查看 arrayfire/arrayfire-python 的全部 Issue
相似的 Issue
-
Add: hunch 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 68/100
DiamondLightSource/dodal#2211 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
openml/openml-python#1749 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
sipyourdrink-ltd/bernstein#6191 ·