Importing filter taps from file (GRC 3.7.1)

Can someone help me to discover why I am not able to import filter taps
from file?

In the attached example, that I am running on GR 3.7.1, I
try to import filter taps from a file (via variable_0) or just typing
some taps (via variable_1).

In the first case I get the following error:

Traceback (most recent call last):
File “/home/piero/”, line 74, in
tb = top_block()
File “/home/piero/”, line 37, in init
self.fir_filter_xxx_0 = filter.fir_filter_fff(1, (variable_0))
line 1154, in make
return _filter_swig.fir_filter_fff_make(*args, **kwargs)
TypeError: in method ‘fir_filter_fff_make’, argument 2 of type
‘std::vector< float,std::allocator< float > > const &’

I am not able to “decode” the error message.

If I import variable_1 taps everything is OK.

The difference between the two mode seems to be missing commas between

Thank you in advance


I tested your code in GR and I get the same error message. I’m
surprised becouse everithing seems to be right.

Could anybody help?


I found a workaround!!!

I saved the taps as a text file, with entries delimited by a space (by
the way my taps are +1 or -1).

Then I used numpy.genfromtxt(‘filename’,dtype=“float”, delimiter=" ")
directly within the filter dialog or via a variable.

However I am curious to discover why the approach that uses
numpy.fromfile, as indicated in GR manuals, do not work.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs