Skip to content
Open
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
* Redesigned `dpnp.modf` function to be a part of `ufunc` and `vm` pybind11 extensions [#2654](https://github.com/IntelPython/dpnp/pull/2654)
* Refactored `dpnp.fft` and `dpnp.random` submodules by removing wildcard imports and defining explicit public exports [#2649](https://github.com/IntelPython/dpnp/pull/2649)
* Added support for the `out` keyword to accept a tuple, bringing ufunc signatures into alignment with those in NumPy [#2664](https://github.com/IntelPython/dpnp/pull/2664)
* Unified `dpnp` public API exports by consolidating function exports in `__init__.py` and removing wildcard imports [#2665](https://github.com/IntelPython/dpnp/pull/2665) [#2666](https://github.com/IntelPython/dpnp/pull/2666)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove "--disable=c-extension-no-member" from .pre-commit-config.yaml now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And E501 skipping in .flake8


### Deprecated

Expand Down
87 changes: 81 additions & 6 deletions dpnp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@
from .dpnp_array import dpnp_array as ndarray
from .dpnp_array_api_info import __array_namespace_info__
from .dpnp_flatiter import flatiter as flatiter
from .dpnp_iface_types import *
from .dpnp_iface_utils import *
from .dpnp_iface_utils import __all__ as _ifaceutils__all__
from ._version import get_versions
from . import exceptions as exceptions
from . import fft as fft
Expand All @@ -77,6 +74,81 @@
from . import scipy as scipy


# =============================================================================
# Data types, constants and type-related helpers
# =============================================================================

# -----------------------------------------------------------------------------
# Data types (borrowed from NumPy)
#
# The order of these declarations are borrowed from the NumPy document:
# https://numpy.org/doc/stable/reference/arrays.scalars.html
# -----------------------------------------------------------------------------
from .dpnp_iface_types import (
bool,
bool_,
byte,
cdouble,
complex128,
complex64,
complexfloating,
csingle,
double,
dtype,
float16,
float32,
float64,
floating,
inexact,
int_,
int8,
int16,
int32,
int64,
integer,
intc,
intp,
longlong,
number,
short,
signedinteger,
single,
ubyte,
uint8,
uint16,
uint32,
uint64,
uintc,
uintp,
unsignedinteger,
ushort,
ulonglong,
)

# -----------------------------------------------------------------------------
# Constants (borrowed from NumPy)
# -----------------------------------------------------------------------------
from .dpnp_iface_types import (
e,
euler_gamma,
inf,
nan,
newaxis,
pi,
)

# -----------------------------------------------------------------------------
# Type-related helper functions
# -----------------------------------------------------------------------------
from .dpnp_iface_types import (
common_type,
finfo,
iinfo,
isdtype,
issubdtype,
is_type_supported,
)

# =============================================================================
# Routines
#
Expand Down Expand Up @@ -424,6 +496,11 @@
unwrap,
)

# -----------------------------------------------------------------------------
# Miscellaneous routines
# -----------------------------------------------------------------------------
from .dpnp_iface_utils import byte_bounds

# -----------------------------------------------------------------------------
# Sorting, searching, and counting
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -514,10 +591,8 @@
)


__all__ = _ifaceutils__all__

# add submodules
__all__ += ["exceptions", "fft", "linalg", "random", "scipy"]
__all__ = ["exceptions", "fft", "linalg", "random", "scipy"]


__version__ = get_versions()["version"]
Expand Down
2 changes: 0 additions & 2 deletions dpnp/dpnp_array_api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@

import dpctl.tensor as dpt

__all__ = ["__array_namespace_info__"]


def __array_namespace_info__():
"""
Expand Down
54 changes: 0 additions & 54 deletions dpnp/dpnp_iface_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,60 +47,6 @@
# pylint: disable=no-name-in-module
from .dpnp_utils import get_usm_allocations

__all__ = [
"bool",
"bool_",
"byte",
"cdouble",
"common_type",
"complex128",
"complex64",
"complexfloating",
"csingle",
"double",
"dtype",
"e",
"euler_gamma",
"finfo",
"float16",
"float32",
"float64",
"floating",
"iinfo",
"inexact",
"inf",
"int_",
"int8",
"int16",
"int32",
"int64",
"integer",
"intc",
"intp",
"isdtype",
"issubdtype",
"is_type_supported",
"longlong",
"nan",
"newaxis",
"number",
"pi",
"short",
"signedinteger",
"single",
"ubyte",
"uint8",
"uint16",
"uint32",
"uint64",
"uintc",
"uintp",
"unsignedinteger",
"ushort",
"ulonglong",
]


# pylint: disable=invalid-name
# =============================================================================
# Data types (borrowed from NumPy)
Expand Down
2 changes: 0 additions & 2 deletions dpnp/dpnp_iface_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@

import dpnp

__all__ = ["byte_bounds"]


def byte_bounds(a):
"""
Expand Down
Loading