engineerjoe440 / ElectricPy

Electrical Engineering Formulas in Python
https://electricpy.readthedocs.io/en/latest/
MIT License
86 stars 16 forks source link

add documentation for tcycle and fix bug in tcycle function #91

Closed iwayankurniawan closed 2 years ago

iwayankurniawan commented 2 years ago

54 Hi I add example for tcycle function because no one working on it,

Also it seems there is a bug in this function, so I remove this condition if len(time) == 1: return time[0] else: return time

The error I got is this, I think because the value of time is a float, so can not be determine using len if len(time) == 1: TypeError: object of type 'numpy.float64' has no len()

Let me know if this solution work Thank you