mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 10:55:57 +08:00
Updated formatting
This commit is contained in:
1 parent
66d23199ff
commit
27b8d94f84
1 file changed
+2
-2
+2
-2
@@ -21,9 +21,9 @@ import json
|
||||
from pydoc import locate
|
||||
from typing import Any, Dict
|
||||
|
||||
from math import floor, log
|
||||
import torch
|
||||
from omegaconf import DictConfig
|
||||
from math import floor, log
|
||||
|
||||
|
||||
class DotDict(dict):
|
||||
@@ -98,4 +98,4 @@ def human_format(num):
|
||||
units = ["", "K", "M", "B", "T", "P"]
|
||||
k = 1000.0
|
||||
magnitude = int(floor(log(num, k)))
|
||||
return "%.2f %s" % (num / k**magnitude, units[magnitude])
|
||||
return f"{(num / k**magnitude):.2f} {units[magnitude]}"
|
||||
Reference in new issue
Block a user