mirror of
https://github.com/andreinechaev/nvcc4jupyter.git
synced 2026-06-13 18:50:47 +05:30
Convert TimeitResult object to human readable string in v2.py
This commit is contained in:
committed by
Andrei Nechaev
parent
6f2cc6f13c
commit
98c9faf45c
@@ -37,6 +37,7 @@ class NVCCPluginV2(Magics):
|
||||
stmt = f"subprocess.check_output(['{self.out}'], stderr=subprocess.STDOUT)"
|
||||
output = self.shell.run_cell_magic(
|
||||
magic_name="timeit", line="-q -o import subprocess", cell=stmt)
|
||||
output = str(output) # convert TimeitResult object to human readable string
|
||||
else:
|
||||
output = subprocess.check_output(
|
||||
[self.out], stderr=subprocess.STDOUT)
|
||||
|
||||
Reference in New Issue
Block a user