Fix inconsistent definition of farr in templates.py
This patch fix the bug that farr
has two different definition on line 369 and line 401 in templates.py
Changes:
- make definition of
farr
on line 401 the same as line 369.
Merge request reports
Activity
requested review from @leo.tsukada and @patrick.godwin
This looks good to me, @chiwai.chan.
@leo.tsukada, out of curiosity, the other definition was recently changed (f3666f4b and 308fd61a) and I was wondering what prompted the change.
@patrick.godwin yeah, previously I got an error like
len(h)!=len(farr)
for the lines like this one. I believe the line originally was meant to say likenumpy.linspace(0, f_max, (f_max+delta_f) / delta_f)
, so I made the equivalent change.@chiwai.chan Sorry for the late response, I am glad you have got a chance to fix this. But looking at this line, I guess you want to set
numpy.linspace(0, f_max, int(f_max / delta_f + 1))
. Otherwise, this doesn't solve the error you were seeing does it?