Skip to content

Commit

Permalink
Use divmod.
Browse files Browse the repository at this point in the history
Co-authored-by: jakirkham <[email protected]>
  • Loading branch information
bdice and jakirkham authored Dec 11, 2024
1 parent 07118bd commit 8080bc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/notebook_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def _get_cuda_version_string():
status, version = runtime.getLocalRuntimeVersion()
if status != runtime.cudaError_t.cudaSuccess:
raise RuntimeError("Could not get CUDA runtime version.")
major = version // 1000
minor = (version % 1000) // 10
major, minor = divmod(version, 1000)
minor //= 10
return f"{major}.{minor}"


Expand Down

0 comments on commit 8080bc8

Please sign in to comment.