python-deltasigma icon indicating copy to clipboard operation
python-deltasigma copied to clipboard

Nimp got float number and fails during index calculation of imp[Nimp - 11:Nimp] in powerGain()

Open ldpgh opened this issue 5 years ago • 1 comments

File "....\lib\site-packages\deltasigma_predictSNR.py", line 245, in powerGain if np.sum(abs(imp[Nimp - 11:Nimp])) < 1e-08 and Nimp > 50: TypeError: slice indices must be integers or None or have an index method

Nimp gets float number at fail during index calculation of imp[Nimp - 11:Nimp] in powerGain()

Nimp=77.0 ... but an integer is required.

File "....\lib\site-packages\deltasigma_predictSNR.py", line 246, in powerGain should be Nimp = int(np.round(Nimp/1.3)) ^^

ldpgh avatar Aug 20 '19 09:08 ldpgh

Python version ...

python Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] : Type "help", "copyright", "credits" or "license" for more information.

ldpgh avatar Aug 20 '19 09:08 ldpgh