Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderKalistratov committed Dec 3, 2024
1 parent 80fd7c5 commit 46c79d6
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 17 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,15 @@ jobs:
python -c "import dpnp; print(dpnp.__version__)"
- name: Run tests
env:
DPNP_TEST_ALL_TYPES: 1
if: env.RERUN_TESTS_ON_FAILURE != 'true'
run: |
export DPNP_TEST_ALL_TYPES=1
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
- name: Run tests
env:
DPNP_TEST_ALL_TYPES: 1
if: env.RERUN_TESTS_ON_FAILURE == 'true'
id: run_tests_linux
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
Expand All @@ -191,7 +194,6 @@ jobs:
. $CONDA/etc/profile.d/mamba.sh
mamba activate ${{ env.TEST_ENV_NAME }}
export DPNP_TEST_ALL_TYPES=1
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
test_windows:
Expand Down Expand Up @@ -311,12 +313,15 @@ jobs:
python -c "import dpnp; print(dpnp.__version__)"
- name: Run tests
env:
DPNP_TEST_ALL_TYPES: 1
if: env.RERUN_TESTS_ON_FAILURE != 'true'
run: |
set DPNP_TEST_ALL_TYPES=1
pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
- name: Run tests
env:
DPNP_TEST_ALL_TYPES: 1
if: env.RERUN_TESTS_ON_FAILURE == 'true'
id: run_tests_win
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
Expand All @@ -325,7 +330,6 @@ jobs:
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
retry_on: any
command: |
set DPNP_TEST_ALL_TYPES=1
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
upload:
Expand Down
17 changes: 16 additions & 1 deletion doc/reference/dtypes_table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,37 @@ Table below shows a list of all supported data types (dtypes) and constants of t
- Constants
* -
- :obj:`bool <numpy.bool_>`
- :obj:`int8 <numpy.int8>`
- :obj:`int16 <numpy.int16>`
- :obj:`int32 <numpy.int32>`
- :obj:`int64 <numpy.int64>`
- :obj:`uint8 <numpy.uint8>`
- :obj:`uint16 <numpy.uint16>`
- :obj:`uint32 <numpy.uint32>`
- :obj:`uint64 <numpy.uint64>`
- :obj:`float32 <numpy.float32>`
- :obj:`float64 <numpy.float64>`
- :obj:`complex64 <numpy.complex64>`
- :obj:`complex128 <numpy.complex128>`
-
- :obj:`bool_ <numpy.bool_>`
- :obj:`byte <numpy.byte>`
- :obj:`cdouble <numpy.cdouble>`
- :obj:`csingle <numpy.csingle>`
- :obj:`double <numpy.double>`
- :obj:`float16 <numpy.float16>`
- :obj:`int <numpy.int>`
- :obj:`int_ <numpy.int_>`
- :obj:`intc <numpy.intc>`
- :obj:`intp <numpy.intp>`
- :obj:`long <numpy.long>`
- :obj:`longlong <numpy.longlong>`
- :obj:`single <numpy.single>`
- :obj:`ubyte <numpy.ubyte>`
- :obj:`uintc <numpy.uintc>`
- :obj:`uintp <numpy.uintp>`
- :obj:`ushort <numpy.ushort>`
- :obj:`ulong <numpy.ulong>`
- :obj:`ulonglong <numpy.ulonglong>`
-
- :obj:`e <numpy.e>`
- :obj:`euler_gamma <numpy.euler_gamma>`
Expand Down
38 changes: 28 additions & 10 deletions dpnp/dpnp_iface_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
__all__ = [
"bool",
"bool_",
"byte",
"cdouble",
"complex128",
"complex64",
Expand All @@ -57,27 +58,35 @@
"iinfo",
"inexact",
"inf",
"int",
"int_",
"int8",
"int16",
"int32",
"int64",
"uint8",
"uint16",
"uint32",
"uint64",
"integer",
"intc",
"intp",
"issubdtype",
"is_type_supported",
"long",
"longlong",
"nan",
"newaxis",
"number",
"pi",
"short",
"signedinteger",
"single",
"ubyte",
"uint8",
"uint16",
"uint32",
"uint64",
"uintc",
"uintp",
"ushort",
"ulong",
"ulonglong",
]


Expand All @@ -87,6 +96,7 @@
# =============================================================================
bool = numpy.bool_
bool_ = numpy.bool_
byte = numpy.byte
cdouble = numpy.cdouble
complex128 = numpy.complex128
complex64 = numpy.complex64
Expand All @@ -99,22 +109,30 @@
float64 = numpy.float64
floating = numpy.floating
inexact = numpy.inexact
int = numpy.int_
int_ = numpy.int_
int8 = numpy.int8
int16 = numpy.int16
int32 = numpy.int32
int64 = numpy.int64
uint8 = numpy.uint8
uint16 = numpy.uint16
uint32 = numpy.uint32
uint64 = numpy.uint64
integer = numpy.integer
intc = numpy.intc
intp = numpy.intp
long = numpy.long
longlong = numpy.longlong
number = numpy.number
short = numpy.short
signedinteger = numpy.signedinteger
single = numpy.single
ubyte = numpy.ubyte
uint8 = numpy.uint8
uint16 = numpy.uint16
uint32 = numpy.uint32
uint64 = numpy.uint64
uintc = numpy.uintc
uintp = numpy.uintp
ushort = numpy.ushort
ulong = numpy.ulong
ulonglong = numpy.ulonglong


# =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion dpnp/tests/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import os

all_types = int(os.getenv("DPNP_TEST_ALL_TYPES", 0))
all_types = int(os.getenv("DPNP_TEST_ALL_TYPES", 0))
2 changes: 1 addition & 1 deletion dpnp/tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from numpy.testing import assert_allclose, assert_array_equal

import dpnp
from tests import config
from dpnp.tests import config


def assert_dtype_allclose(
Expand Down

0 comments on commit 46c79d6

Please sign in to comment.