Skip to content

Commit b6f4cf8

Browse files
committed
try to fix all?
1 parent 1856ec7 commit b6f4cf8

File tree

2 files changed

+14
-41
lines changed

2 files changed

+14
-41
lines changed

array_api_compat/dask/array/_aliases.py

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,7 @@
77

88
import numpy as np
99
from numpy import (
10-
# Constants
11-
e,
12-
inf,
13-
nan,
14-
pi,
15-
newaxis,
1610
# Dtypes
17-
bool_ as bool,
18-
float32,
19-
float64,
20-
int8,
21-
int16,
22-
int32,
23-
int64,
24-
uint8,
25-
uint16,
26-
uint32,
27-
uint64,
28-
complex64,
29-
complex128,
3011
iinfo,
3112
finfo,
3213
can_cast,
@@ -173,12 +154,9 @@ def asarray(
173154

174155
common_aliases = [alias for alias in _aliases.__all__ if alias not in _da_unsupported]
175156

176-
__all__ = common_aliases + ['asarray', 'bool', 'acos',
177-
'acosh', 'asin', 'asinh', 'atan', 'atan2',
178-
'atanh', 'bitwise_left_shift', 'bitwise_invert',
179-
'bitwise_right_shift', 'concat', 'pow',
180-
'e', 'inf', 'nan', 'pi', 'newaxis', 'float32', 'float64', 'int8',
181-
'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64',
182-
'complex64', 'complex128', 'iinfo', 'finfo', 'can_cast', 'result_type']
157+
__all__ = common_aliases + ['asarray', 'acos',
158+
'acosh', 'asin', 'asinh', 'atan', 'atan2',
159+
'atanh', 'bitwise_left_shift', 'bitwise_invert',
160+
'bitwise_right_shift', 'concat', 'pow', 'iinfo', 'finfo', 'can_cast', 'result_type']
183161

184-
_all_ignore = ['get_xp', 'da', 'partial', 'common_aliases', 'np']
162+
del get_xp, da, common_aliases, np

array_api_compat/dask/array/fft.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
from dask.array.fft import * # noqa: F403
2-
from numpy.fft import __all__ as fft_all
2+
# cupy.fft doesn't have __all__. If it is added, replace this with
3+
#
4+
# from cupy.fft import __all__ as linalg_all
5+
_n = {}
6+
exec('from dask.array.fft import *', _n)
7+
del _n['__builtins__']
8+
fft_all = list(_n)
9+
del _n
310

411
from ...common import _fft
512
from ..._internal import get_xp
613

714
import dask.array as da
815

9-
# fft = get_xp(da)(_fft.fft)
10-
# ifft = get_xp(da)(_fft.ifft)
11-
# fftn = get_xp(da)(_fft.fftn)
12-
# ifftn = get_xp(da)(_fft.ifftn)
13-
# rfft = get_xp(da)(_fft.rfft)
14-
# irfft = get_xp(da)(_fft.irfft)
15-
# rfftn = get_xp(da)(_fft.rfftn)
16-
# irfftn = get_xp(da)(_fft.irfftn)
17-
# hfft = get_xp(da)(_fft.hfft)
18-
# ihfft = get_xp(da)(_fft.ihfft)
1916
fftfreq = get_xp(da)(_fft.fftfreq)
2017
rfftfreq = get_xp(da)(_fft.rfftfreq)
21-
# fftshift = get_xp(da)(_fft.fftshift)
22-
# ifftshift = get_xp(da)(_fft.ifftshift)
2318

24-
__all__ = fft_all + _fft.__all__
19+
__all__ = [elem for elem in fft_all if elem != "annotations"] + ["fftfreq", "rfftfreq"]
2520

2621
del get_xp
2722
del da

0 commit comments

Comments
 (0)