Compatibility for numpy 2.0 (#3265)

* compat for numpy 2.0

* lint changes
This commit is contained in:
Justin Kerr authored and GitHub committed 2024-06-28 08:07:10 +09:00
1 parent 9b3cbc79bf
commit d6df39b70d
93 files changed
+104 -74

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
""" Helper functions for visualizing outputs """
"""Helper functions for visualizing outputs"""
from dataclasses import dataclass
from typing import Literal, Optional
+1
View File
@@ -13,6 +13,7 @@
# limitations under the License.
"""Common Colors"""
from typing import Union
import torch
+1
View File
@@ -13,6 +13,7 @@
# limitations under the License.
"""functionality to handle multiprocessing syncing and communicating"""
import torch.distributed as dist
LOCAL_PROCESS_GROUP = None
+1
View File
@@ -15,6 +15,7 @@
"""
Decorator definitions
"""
from typing import Callable, List
from nerfstudio.utils import comms
+1
View File
@@ -15,6 +15,7 @@
"""
Evaluation utils
"""
from __future__ import annotations
import os
+1 -1
View File
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
""" Math Helper Functions """
"""Math Helper Functions"""
import itertools
import math
-1
View File
@@ -16,7 +16,6 @@
Miscellaneous helper code.
"""
import platform
import typing
import warnings
+3 -4
View File
@@ -15,6 +15,7 @@
"""
Profiler base class and functionality
"""
from __future__ import annotations
import functools
@@ -41,13 +42,11 @@ CallableT = TypeVar("CallableT", bound=Callable)
@overload
def time_function(name_or_func: CallableT) -> CallableT:
...
def time_function(name_or_func: CallableT) -> CallableT: ...
@overload
def time_function(name_or_func: str) -> ContextManager[Any]:
...
def time_function(name_or_func: str) -> ContextManager[Any]: ...
def time_function(name_or_func: Union[CallableT, str]) -> Union[CallableT, ContextManager[Any]]:
+1
View File
@@ -15,6 +15,7 @@
"""
Generic Writer class
"""
from __future__ import annotations
import enum