mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-24 18:14:16 +08:00
Compatibility for numpy 2.0 (#3265)
* compat for numpy 2.0 * lint changes
This commit is contained in:
1 parent
9b3cbc79bf
commit
d6df39b70d
93 files changed
+104
-74
No files matched your search
@@ -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
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
"""Common Colors"""
|
||||
|
||||
from typing import Union
|
||||
|
||||
import torch
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
"""functionality to handle multiprocessing syncing and communicating"""
|
||||
|
||||
import torch.distributed as dist
|
||||
|
||||
LOCAL_PROCESS_GROUP = None
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"""
|
||||
Decorator definitions
|
||||
"""
|
||||
|
||||
from typing import Callable, List
|
||||
|
||||
from nerfstudio.utils import comms
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"""
|
||||
Evaluation utils
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
Miscellaneous helper code.
|
||||
"""
|
||||
|
||||
|
||||
import platform
|
||||
import typing
|
||||
import warnings
|
||||
|
||||
@@ -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]]:
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"""
|
||||
Generic Writer class
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
|
||||
Reference in new issue
Block a user