Skip to content

Commit 1078dd0

Browse files
ajfloodpavanky
authored andcommitted
approx1 off_grid Error
In the singal.py, for arrayfire.approx1, I found that the off_grid format should be float not double. Therefore I changed it and it now works as expected. Sorry if this is not proper procedure for fixing bugs, this is my first time reporting bugs on using github.
1 parent 0b29c3a commit 1078dd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arrayfire/signal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def approx1(signal, pos0, method=INTERP.LINEAR, off_grid=0.0):
4949
"""
5050
output = Array()
5151
safe_call(backend.get().af_approx1(c_pointer(output.arr), signal.arr, pos0.arr,
52-
method.value, c_double_t(off_grid)))
52+
method.value, c_float_t(off_grid)))
5353
return output
5454

5555
def approx2(signal, pos0, pos1, method=INTERP.LINEAR, off_grid=0.0):
@@ -91,7 +91,7 @@ def approx2(signal, pos0, pos1, method=INTERP.LINEAR, off_grid=0.0):
9191
"""
9292
output = Array()
9393
safe_call(backend.get().af_approx2(c_pointer(output.arr), signal.arr,
94-
pos0.arr, pos1.arr, method.value, c_double_t(off_grid)))
94+
pos0.arr, pos1.arr, method.value, c_float_t(off_grid)))
9595
return output
9696

9797
def fft(signal, dim0 = None , scale = None):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy