Download data/dvrk_python_v1/dvrk_planning/tests/test_conversion.py from introvoyz042/MedRCT: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/datasets/introvoyz042/MedRCT/resolve/main/data/dvrk_python_v1/dvrk_planning/tests/test_conversion.py
- Command line
-
hf download hf://datasets/introvoyz042/MedRCT/data/dvrk_python_v1/dvrk_planning/tests/test_conversion.py
-
curl -L -o test_conversion.py https://huggingface.co/datasets/introvoyz042/MedRCT/resolve/main/data/dvrk_python_v1/dvrk_planning/tests/test_conversion.py
382 Bytes
| from timer import Timer | |
| import numpy as np | |
| from dvrk_planning.utilities import convert_mat_to_frame | |
| mat = np.mat([[1, 0, 0, 0.123], | |
| [0, 1, 0, 0.3], | |
| [0, 0, 1, 12], | |
| [0, 0, 0, 1]], dtype=float) | |
| print(mat) | |
| t = Timer() | |
| for i in range(10): | |
| t.start() | |
| frame = convert_mat_to_frame(mat) | |
| t.stop() | |
| print(t.str_elapsed_time()) | |