You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running this particular code where the lambda function sends data to a function to get its full-form from it's abbreviated form.
I used %%time first to know the time taken in the block, but got an error. %%timeit solved it tho. Why does it happen?
Here is a screenshot:
The text was updated successfully, but these errors were encountered:
It happens because of this if statement in time magic function.
if line and cell:
raise UsageError("Can't use statement directly after '%%time'!")
The line variable gets the comment and the cell variable gets the next line expression. I didn't see this check in timeit magic. Timeit just counts that line as cell expression and run it. So is timeit magic doing it right or time magic? Or it can be just an issue with parsing comments?
I was running this particular code where the lambda function sends data to a function to get its full-form from it's abbreviated form.
I used %%time first to know the time taken in the block, but got an error. %%timeit solved it tho. Why does it happen?
Here is a screenshot:
The text was updated successfully, but these errors were encountered: