Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
luweizheng committed Jul 7, 2024
1 parent 9b53667 commit 4a7bd99
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/xorbits/_mars/tensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@
from ..core import ExecutableTuple

from numpy import __version__ as np_ver

if np_ver >= "2.0.0":
from numpy.exceptions import AxisError
else:
Expand Down
2 changes: 2 additions & 0 deletions python/xorbits/_mars/tensor/lib/index_tricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from numpy.core.numeric import ScalarType

from numpy import __version__ as np_ver

if np_ver >= "2.0.0":
from numpy.lib._index_tricks_impl import ndindex
else:
Expand Down Expand Up @@ -351,6 +352,7 @@ def __getitem__(self, key):
# find_common_type is deprecated
if np_ver >= "2.0.0":
from numpy import result_type

final_dtype = result_type(arraytypes, scalartypes)
else:
from numpy.core.numerictypes import find_common_type
Expand Down
1 change: 1 addition & 0 deletions python/xorbits/numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Callable, Dict, Optional

from numpy import __version__ as np_ver

if np_ver >= "2.0.0":
from numpy.exceptions import AxisError
from numpy.lib._index_tricks_impl import ndindex
Expand Down
1 change: 1 addition & 0 deletions python/xorbits/numpy/lib/index_tricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
import numpy
from numpy import __version__ as np_ver

if np_ver >= "2.0.0":
from numpy.lib import _index_tricks_impl as index_tricks
else:
Expand Down

0 comments on commit 4a7bd99

Please sign in to comment.