Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
* Defined explicit versions range of the Python interpreter which is needed during the build [#2634](https://github.com/IntelPython/dpnp/pull/2634)
* Aligned documentation with NumPy and CuPy style by using short function names [#2633](https://github.com/IntelPython/dpnp/pull/2633)
* Added the missing positional-only and keyword-only parameter markers to bring the ufunc signatures into alignment with NumPy [#2660](https://github.com/IntelPython/dpnp/pull/2660)
* Refactored `dpnp.fft` and `dpnp.random` submodules by removing wildcard imports and defining explicit public exports [#2649](https://github.com/IntelPython/dpnp/pull/2649)

### Deprecated

Expand Down
4 changes: 3 additions & 1 deletion dpnp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,16 @@
from .dpnp_iface_utils import __all__ as _ifaceutils__all__
from ._version import get_versions
from . import exceptions as exceptions
from . import fft as fft
from . import linalg as linalg
from . import random as random
from . import scipy as scipy

__all__ = _iface__all__
__all__ += _ifaceutils__all__

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


__version__ = get_versions()["version"]
Expand Down
3 changes: 2 additions & 1 deletion dpnp/dpnp_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
from dpctl.tensor._numpy_helper import AxisError

import dpnp
import dpnp.memory as dpm

from . import memory as dpm


def _get_unwrapped_index_key(key):
Expand Down
3 changes: 0 additions & 3 deletions dpnp/dpnp_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
import dpnp
from dpnp.dpnp_algo import *
from dpnp.dpnp_array import dpnp_array
from dpnp.fft import *
from dpnp.memory import *
from dpnp.random import *

__all__ = [
"are_same_logical_tensors",
Expand Down
45 changes: 41 additions & 4 deletions dpnp/fft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,44 @@

"""

from dpnp.fft.dpnp_iface_fft import *
from dpnp.fft.dpnp_iface_fft import __all__ as __all__fft

__all__ = __all__fft
from .dpnp_iface_fft import (
fft,
fft2,
fftfreq,
fftn,
fftshift,
hfft,
ifft,
ifft2,
ifftn,
ifftshift,
ihfft,
irfft,
irfft2,
irfftn,
rfft,
rfft2,
rfftfreq,
rfftn,
)

__all__ = [
"fft",
"fft2",
"fftfreq",
"fftn",
"fftshift",
"hfft",
"ifft",
"ifft2",
"ifftn",
"ifftshift",
"ihfft",
"irfft",
"irfft2",
"irfftn",
"rfft",
"rfft2",
"rfftfreq",
"rfftn",
]
21 changes: 0 additions & 21 deletions dpnp/fft/dpnp_iface_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,6 @@

from .dpnp_utils_fft import dpnp_fft, dpnp_fftn, dpnp_fillfreq, swap_direction

__all__ = [
"fft",
"fft2",
"fftfreq",
"fftn",
"fftshift",
"hfft",
"ifft",
"ifft2",
"ifftn",
"ifftshift",
"ihfft",
"irfft",
"irfft2",
"irfftn",
"rfft",
"rfft2",
"rfftfreq",
"rfftn",
]


def fft(a, n=None, axis=-1, norm=None, out=None):
"""
Expand Down
2 changes: 0 additions & 2 deletions dpnp/fft/dpnp_utils_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
_standardize_strides_to_nonzero,
)

__all__ = ["dpnp_fft", "dpnp_fftn", "dpnp_fillfreq", "swap_direction"]


def _check_norm(norm):
if norm not in (None, "ortho", "forward", "backward"):
Expand Down
108 changes: 102 additions & 6 deletions dpnp/random/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,106 @@
# THE POSSIBILITY OF SUCH DAMAGE.
# *****************************************************************************

from .dpnp_iface_random import *
from .dpnp_iface_random import __all__ as __all__random
from .dpnp_random_state import *
from .dpnp_random_state import __all__ as __all__random_state
from .dpnp_iface_random import (
beta,
binomial,
bytes,
chisquare,
choice,
dirichlet,
exponential,
f,
gamma,
geometric,
gumbel,
hypergeometric,
laplace,
logistic,
lognormal,
logseries,
multinomial,
multivariate_normal,
negative_binomial,
noncentral_chisquare,
noncentral_f,
normal,
pareto,
permutation,
poisson,
power,
rand,
randint,
randn,
random,
random_integers,
random_sample,
ranf,
rayleigh,
sample,
seed,
shuffle,
standard_cauchy,
standard_exponential,
standard_gamma,
standard_normal,
standard_t,
triangular,
uniform,
vonmises,
wald,
weibull,
zipf,
)
from .dpnp_random_state import RandomState

__all__ = __all__random
__all__ += __all__random_state
__all__ = [
"beta",
"binomial",
"bytes",
"chisquare",
"choice",
"dirichlet",
"exponential",
"f",
"gamma",
"geometric",
"gumbel",
"hypergeometric",
"laplace",
"logistic",
"lognormal",
"logseries",
"multinomial",
"multivariate_normal",
"negative_binomial",
"normal",
"noncentral_chisquare",
"noncentral_f",
"pareto",
"permutation",
"poisson",
"power",
"rand",
"randint",
"randn",
"random",
"random_integers",
"random_sample",
"ranf",
"rayleigh",
"sample",
"shuffle",
"seed",
"standard_cauchy",
"standard_exponential",
"standard_gamma",
"standard_normal",
"standard_t",
"triangular",
"uniform",
"vonmises",
"wald",
"weibull",
"zipf",
"RandomState",
]
51 changes: 0 additions & 51 deletions dpnp/random/dpnp_iface_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,57 +47,6 @@
from .dpnp_algo_random import *
from .dpnp_random_state import RandomState

__all__ = [
"beta",
"binomial",
"bytes",
"chisquare",
"choice",
"dirichlet",
"exponential",
"f",
"gamma",
"geometric",
"gumbel",
"hypergeometric",
"laplace",
"logistic",
"lognormal",
"logseries",
"multinomial",
"multivariate_normal",
"negative_binomial",
"normal",
"noncentral_chisquare",
"noncentral_f",
"pareto",
"permutation",
"poisson",
"power",
"rand",
"randint",
"randn",
"random",
"random_integers",
"random_sample",
"ranf",
"rayleigh",
"sample",
"shuffle",
"seed",
"standard_cauchy",
"standard_exponential",
"standard_gamma",
"standard_normal",
"standard_t",
"triangular",
"uniform",
"vonmises",
"wald",
"weibull",
"zipf",
]


def _get_random_state(device=None, sycl_queue=None):
global _dpnp_random_states
Expand Down
2 changes: 0 additions & 2 deletions dpnp/random/dpnp_random_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
)
from dpnp.random.dpnp_algo_random import MCG59, MT19937

__all__ = ["RandomState"]


class RandomState:
"""
Expand Down
Loading