Skip to content

TypeError in genTime function (utils.py) #5

@miguelmsemprun

Description

@miguelmsemprun

Hi,
I continue using your program and I have detected a problem with the linspace function. It expects int type parameters but gets float because the "seconds" parameter passed is len(conductance) / srate. The error is:
File "C:\Users\migue\PythonProjects\testlib-master.venv\lib\site-packages\ledapy\utils.py", line 247, in genTimeVector
return genTime(len(conductance) / srate, srate)
File "C:\Users\migue\PythonProjects\testlib-master.venv\lib\site-packages\ledapy\utils.py", line 239, in genTime
return np.linspace(0, seconds, seconds * srate)
File "<array_function internals>", line 5, in linspace
File "C:\Users\migue\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\core\function_base.py", line 119, in linspace
raise TypeError(
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions