Skip to content

Commit

Permalink
isort
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermeleobas committed Jul 26, 2023
1 parent 447e2e3 commit 36b9b24
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 33 deletions.
8 changes: 5 additions & 3 deletions rbc/stdlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import textwrap
import functools
import numpy as np
import textwrap
from enum import Enum

import numpy as np
from numba.core import extending
from numba.np.numpy_support import as_dtype, from_dtype

from rbc import errors, typesystem
from rbc.heavydb import Array, ArrayPointer
from rbc import typesystem, errors

ARRAY_API_ADDRESS = ("https://data-apis.org/array-api/latest/API_specification/"
"generated/array_api.{0}.html#array_api.{0}")
Expand Down
1 change: 0 additions & 1 deletion rbc/stdlib/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
import numpy as np


__all__ = [
'e', 'inf', 'nan', 'pi'
]
Expand Down
9 changes: 5 additions & 4 deletions rbc/stdlib/creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
https://data-apis.org/array-api/latest/API_specification/creation_functions.html
"""

from rbc import typesystem, errors
from rbc.heavydb import Array, ArrayPointer
from rbc.stdlib import Expose, API
from numba.core import extending, types, cgutils
from numba import TypingError
from numba.core import cgutils, extending, types
from numba.core.typing import asnumbatype

from rbc import errors, typesystem
from rbc.heavydb import Array, ArrayPointer
from rbc.stdlib import API, Expose

__all__ = [
'full', 'full_like', 'empty_like', 'empty', 'zeros', 'zeros_like',
'ones', 'ones_like', 'cumsum', 'arange', 'asarray',
Expand Down
6 changes: 4 additions & 2 deletions rbc/stdlib/data_type_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
https://data-apis.org/array-api/latest/API_specification/data_type_functions.html
"""
import numpy as np
from typing import NamedTuple
from numba.core import types, extending

import numpy as np
from numba.core import extending, types
from numba.np.numpy_support import as_dtype, from_dtype

from rbc.errors import NumbaTypeError
from rbc.heavydb import ArrayPointer
from rbc.stdlib import Expose
Expand Down
13 changes: 4 additions & 9 deletions rbc/stdlib/elementwise_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
https://data-apis.org/array-api/latest/API_specification/elementwise_functions.html.
"""

from rbc.stdlib import (
Expose,
BinaryUfuncExpose,
UnaryUfuncExpose,
API,
determine_input_type,
)
import numpy as np
from rbc import typesystem
from rbc.heavydb import ArrayPointer, Array
from numba.core import types

from rbc import typesystem
from rbc.heavydb import Array, ArrayPointer
from rbc.stdlib import (API, BinaryUfuncExpose, Expose, UnaryUfuncExpose,
determine_input_type)

__all__ = [
'add', 'subtract', 'multiply', 'divide', 'logaddexp', 'logaddexp2',
Expand Down
7 changes: 4 additions & 3 deletions rbc/stdlib/manipulation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
https://data-apis.org/array-api/latest/API_specification/manipulation_functions.html
"""
from rbc.stdlib import Expose
from rbc.heavydb import ArrayPointer
from rbc.errors import NumbaTypeError
from numba import literal_unroll

from rbc.errors import NumbaTypeError
from rbc.heavydb import ArrayPointer
from rbc.stdlib import Expose

__all__ = [
"concat",
"expand_dims",
Expand Down
2 changes: 1 addition & 1 deletion rbc/stdlib/searching_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
https://data-apis.org/array-api/latest/API_specification/searching_functions.html
"""
from rbc.stdlib import Expose
from rbc.heavydb import Array, ArrayPointer, type_can_asarray
from rbc.stdlib import Expose

__all__ = ["argmax", "argmin", "nonzero", "where"]

Expand Down
5 changes: 3 additions & 2 deletions rbc/stdlib/set_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
https://data-apis.org/array-api/latest/API_specification/set_functions.html
"""
from rbc.stdlib import Expose
from rbc.heavydb import Array, ArrayPointer
from numba.core import types

from rbc.heavydb import Array, ArrayPointer
from rbc.stdlib import Expose

__all__ = ["unique_all", "unique_counts", "unique_inverse", "unique_values"]

expose = Expose(globals(), "set_functions")
Expand Down
10 changes: 5 additions & 5 deletions rbc/stdlib/statistical_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
https://data-apis.org/array-api/latest/API_specification/statistical_functions.html
"""
from rbc.externals.stdio import printf
import numpy as np
from numba.core import errors, extending, types
from numba.np import numpy_support

from rbc import typesystem
from rbc.externals.stdio import printf
from rbc.heavydb import ArrayPointer
from rbc.stdlib import Expose
from numba.core import extending, types, errors
from numba.np import numpy_support
import numpy as np


__all__ = [
'min', 'max', 'mean', 'prod', 'sum', 'std', 'var'
Expand Down
2 changes: 1 addition & 1 deletion rbc/stdlib/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
https://data-apis.org/array-api/latest/API_specification/utility_functions.html
"""
from rbc.stdlib import Expose
from rbc.heavydb import ArrayPointer
from rbc.stdlib import Expose

__all__ = ["all", "any"]

Expand Down
2 changes: 0 additions & 2 deletions rbc/tests/heavydb/test_array_api_unsupported.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ def heavydb():
"expand_dims", "flip", "permute_dims", "reshape", "roll", "squeeze", "stack",
# sorting_functions
"argsort", "sort",
# searching_functions
"where",
# elementwise_functions
'float_power', 'divmod', 'cbrt', 'isnat',
# set_functions
Expand Down

0 comments on commit 36b9b24

Please sign in to comment.