arrayfire / arrayfire/arrayfire-python

Interpolation along particular axis

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

描述

Currently, the interpolation function performs the interpolation along the 0th and the 1st axis. However, in my problem of interest, I need to interpolate along all the 4 axes. Could the feature of having interpolation along a particular axis be added on in `af.approx2`. Right now, I'm reordering the arrays such that the axes along which I need to interpolate are moved to the 0th and 1st axes. After which I need to reorder the resulting array to bring it back to the original convention.

This is what I'm currently doing right now:
```python
# vel_y_interpolant is stacked along axis 2
# vel_x_interpolant is stacked along axis 3
f_interp = af.approx2(af.reorder(f, 2, 3, 0, 1),\
af.reorder(vel_y_interpolant, 2, 3, 0, 1),\
af.reorder(vel_x_interpolant, 2, 3, 0, 1),\
af.INTERP.BICUBIC_SPLINE
)

f_interp = af.reorder(f_interp, 2, 3, 0, 1)
```

貢獻指南

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

評估

這個 Issue 還沒有評估資料。

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

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