arrayfire / arrayfire/arrayfire-python

medfilt1 calculates median for dim1 only, then copies this to all other dims

未關閉
#231 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
422
分支
63
PR 合併指標
30 天內沒有已合併 PR

描述

In arrayfire previously, I've used medfilt1 to apply a median filter to multiple dimensions. However, in the python binding the output from dim1 is copied to all other dims.

For example:
import arrayfire as af
data = af.randn(10, 10)
filt_data = af.medfilt1(data, 3)

filt_data.to_ndarray()
array([[ 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 ,
0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 ],
[ 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 ,
0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 ],
[ 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 ,
0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 , 0.3926208 ],
[-0.2309244 , -0.2309244 , -0.2309244 , -0.2309244 , -0.2309244 ,
-0.2309244 , -0.2309244 , -0.2309244 , -0.2309244 , -0.2309244 ],
[ 0.43086785, 0.43086785, 0.43086785, 0.43086785, 0.43086785,
0.43086785, 0.43086785, 0.43086785, 0.43086785, 0.43086785],
[-0.24984777, -0.24984777, -0.24984777, -0.24984777, -0.24984777,
-0.24984777, -0.24984777, -0.24984777, -0.24984777, -0.24984777],
[ 0.43086785, 0.43086785, 0.43086785, 0.43086785, 0.43086785,
0.43086785, 0.43086785, 0.43086785, 0.43086785, 0.43086785],
[-0.82585084, -0.82585084, -0.82585084, -0.82585084, -0.82585084,
-0.82585084, -0.82585084, -0.82585084, -0.82585084, -0.82585084],
[ 0.26141813, 0.26141813, 0.26141813, 0.26141813, 0.26141813,
0.26141813, 0.26141813, 0.26141813, 0.26141813, 0.26141813],
[ 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. ]],
dtype=float32)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。