@@ -67,24 +67,28 @@ def get_max_threads_count(self):
67
67
68
68
69
69
_hardware_counts = _cpu_max_threads_count ()
70
-
70
+
71
71
72
72
__all__ = ['fft' , 'ifft' , 'fft2' , 'ifft2' , 'fftn' , 'ifftn' ,
73
73
'rfft' , 'irfft' , 'rfft2' , 'irfft2' , 'rfftn' , 'irfftn' ,
74
74
'hfft' , 'ihfft' , 'hfft2' , 'ihfft2' , 'hfftn' , 'ihfftn' ,
75
75
'dct' , 'idct' , 'dst' , 'idst' , 'dctn' , 'idctn' , 'dstn' , 'idstn' ,
76
76
'fftshift' , 'ifftshift' , 'fftfreq' , 'rfftfreq' , 'get_workers' ,
77
- 'set_workers' , 'next_fast_len' ]
77
+ 'set_workers' , 'next_fast_len' , 'DftiBackend' ]
78
78
79
- __ua_domain__ = 'numpy.scipy.fft'
80
- __implemented = dict ()
81
79
82
- def __ua_function__ (method , args , kwargs ):
83
- """Fetch registered UA function."""
84
- fn = __implemented .get (method , None )
85
- if fn is None :
86
- return NotImplemented
87
- return fn (* args , ** kwargs )
80
+ class DftiBackend :
81
+ __ua_domain__ = "numpy.scipy.fft"
82
+ @staticmethod
83
+ def __ua_function__ (method , args , kwargs ):
84
+ """Fetch registered UA function."""
85
+ fn = __implemented .get (method , None )
86
+ if fn is None :
87
+ return NotImplemented
88
+ return fn (* args , ** kwargs )
89
+
90
+
91
+ __implemented = dict ()
88
92
89
93
90
94
def _implements (scipy_func ):
0 commit comments