py-simple-audio icon indicating copy to clipboard operation
py-simple-audio copied to clipboard

[docs] Coerce linspace to int

Open brad-alexander opened this issue 2 years ago • 0 comments

Resolves:

Traceback (most recent call last):
  File "<snip>\play.py", line 2, in <module>
    import numpy as np
play.py' 
Traceback (most recent call last):
  File "<snip>\play.py", line 13, in <module>
    t = np.linspace(0, T, T * sample_rate, False)
  File "<__array_function__ internals>", line 200, in linspace
  File "<snip>\Python310\lib\site-packages\numpy\core\function_base.py", line 121, in linspace
    num = operator.index(num)
TypeError: 'float' object cannot be interpreted as an integer

numpy==1.24.1 simpleaudio==1.0.4 Windows 10 19044.2364

brad-alexander avatar Dec 28 '22 01:12 brad-alexander