We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] ImportError: cannot import name 'elliprc' from 'mars.tensor.special.ellip_func_integrals' 
<!--
Thank you for your contribution!

Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->

**Describe the bug**
A clear and concise description of what the bug is.

```python
Traceback:
/usr/local/python3/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
mars/tensor/special/tests/test_special.py:57: in <module>
    from ..ellip_func_integrals import (
E   ImportError: cannot import name 'elliprc' from 'mars.tensor.special.ellip_func_integrals' (/home/jenkins/agent/aci/mars/tensor/special/ellip_func_integrals.py)
```


```python
Traceback:
/usr/local/python3/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
mars/tensor/special/tests/test_special.py:18: in <module>
    from scipy.special import (
E   ImportError: cannot import name 'elliprd' from 'scipy.special' (/home/admin/py3/lib/python3.7/site-packages/scipy/special/__init__.py)
```

**To Reproduce**
To help us reproducing this bug, please provide information below:
1. Your Python version 3.7.7
2. The version of Mars you use Latest master
3. Versions of crucial packages, such as numpy, scipy and pandas `scipy==1.5.0`
4. Full stack of the error.
5. Minimized code to reproduce the error.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mars/tensor/special/ellip_func_integrals.py`
Content:
```
1 # Copyright 1999-2021 Alibaba Group Holding Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 import scipy.special as spspecial
16 
17 from ..arithmetic.utils import arithmetic_operand
18 from ..utils import infer_dtype, implement_scipy
19 from .core import (
20     _register_special_op,
21     TensorSpecialBinOp,
22     TensorSpecialUnaryOp,
23     TensorSpecialMultiOp,
24 )
25 
26 
27 @_register_special_op
28 @arithmetic_operand(sparse_mode="unary")
29 class TensorEllipk(TensorSpecialUnaryOp):
30     _func_name = "ellipk"
31 
32 
33 @_register_special_op
34 @arithmetic_operand(sparse_mode="unary")
35 class TensorEllipkm1(TensorSpecialUnaryOp):
36     _func_name = "ellipkm1"
37 
38 
39 @_register_special_op
40 @arithmetic_operand(sparse_mode="binary_and")
41 class TensorEllipkinc(TensorSpecialBinOp):
42     _func_name = "ellipkinc"
43 
44 
45 @_register_special_op
46 @arithmetic_operand(sparse_mode="unary")
47 class TensorEllipe(TensorSpecialUnaryOp):
48     _func_name = "ellipe"
49 
50 
51 @_register_special_op
52 @arithmetic_operand(sparse_mode="binary_and")
53 class TensorEllipeinc(TensorSpecialBinOp):
54     _func_name = "ellipeinc"
55 
56 
57 @_register_special_op
58 @arithmetic_operand(sparse_mode="binary_and")
59 class TensorElliprc(TensorSpecialBinOp):
60     _func_name = "elliprc"
61 
62 
63 @_register_special_op
64 class TensorElliprd(TensorSpecialMultiOp):
65     _ARG_COUNT = 3
66     _func_name = "elliprd"
67 
68 
69 @_register_special_op
70 class TensorElliprf(TensorSpecialMultiOp):
71     _ARG_COUNT = 3
72     _func_name = "elliprf"
73 
74 
75 @_register_special_op
76 class TensorElliprg(TensorSpecialMultiOp):
77     _ARG_COUNT = 3
78     _func_name = "elliprg"
79 
80 
81 @_register_special_op
82 class TensorElliprj(TensorSpecialMultiOp):
83     _ARG_COUNT = 4
84     _func_name = "elliprj"
85 
86 
87 @implement_scipy(spspecial.ellipk)
88 @infer_dtype(spspecial.ellipk)
89 def ellipk(x, **kwargs):
90     op = TensorEllipk(**kwargs)
91     return op(x)
92 
93 
94 @implement_scipy(spspecial.ellipkm1)
95 @infer_dtype(spspecial.ellipkm1)
96 def ellipkm1(x, **kwargs):
97     op = TensorEllipkm1(**kwargs)
98     return op(x)
99 
100 
101 @implement_scipy(spspecial.ellipkinc)
102 @infer_dtype(spspecial.ellipkinc)
103 def ellipkinc(phi, m, **kwargs):
104     op = TensorEllipkinc(**kwargs)
105     return op(phi, m)
106 
107 
108 @implement_scipy(spspecial.ellipe)
109 @infer_dtype(spspecial.ellipe)
110 def ellipe(x, **kwargs):
111     op = TensorEllipe(**kwargs)
112     return op(x)
113 
114 
115 @implement_scipy(spspecial.ellipeinc)
116 @infer_dtype(spspecial.ellipeinc)
117 def ellipeinc(phi, m, **kwargs):
118     op = TensorEllipeinc(**kwargs)
119     return op(phi, m)
120 
121 
122 try:
123 
124     @implement_scipy(spspecial.elliprc)
125     @infer_dtype(spspecial.elliprc)
126     def elliprc(x, y, **kwargs):
127         op = TensorElliprc(**kwargs)
128         return op(x, y)
129 
130     @implement_scipy(spspecial.elliprd)
131     @infer_dtype(spspecial.elliprd)
132     def elliprd(x, y, z, **kwargs):
133         op = TensorElliprd(**kwargs)
134         return op(x, y, z)
135 
136     @implement_scipy(spspecial.elliprf)
137     @infer_dtype(spspecial.elliprf)
138     def elliprf(x, y, z, **kwargs):
139         op = TensorElliprf(**kwargs)
140         return op(x, y, z)
141 
142     @implement_scipy(spspecial.elliprg)
143     @infer_dtype(spspecial.elliprg)
144     def elliprg(x, y, z, **kwargs):
145         op = TensorElliprg(**kwargs)
146         return op(x, y, z)
147 
148     @implement_scipy(spspecial.elliprj)
149     @infer_dtype(spspecial.elliprj)
150     def elliprj(x, y, z, p, **kwargs):
151         op = TensorElliprj(**kwargs)
152         return op(x, y, z, p)
153 
154 except AttributeError:
155     # These functions are not implemented before scipy v1.8 so
156     # spsecial.func may cause AttributeError
157     pass
158
```

Path: `mars/tensor/special/__init__.py`
Content:
```
1 # Copyright 1999-2021 Alibaba Group Holding Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 try:
16     import scipy
17 
18     from .err_fresnel import (
19         erf,
20         TensorErf,
21         erfc,
22         TensorErfc,
23         erfcx,
24         TensorErfcx,
25         erfi,
26         TensorErfi,
27         erfinv,
28         TensorErfinv,
29         erfcinv,
30         TensorErfcinv,
31     )
32     from .gamma_funcs import (
33         gamma,
34         TensorGamma,
35         gammaln,
36         TensorGammaln,
37         loggamma,
38         TensorLogGamma,
39         gammasgn,
40         TensorGammaSgn,
41         gammainc,
42         TensorGammaInc,
43         gammaincinv,
44         TensorGammaIncInv,
45         gammaincc,
46         TensorGammaIncc,
47         gammainccinv,
48         TensorGammaInccInv,
49         beta,
50         TensorBeta,
51         betaln,
52         TensorBetaLn,
53         betainc,
54         TensorBetaInc,
55         betaincinv,
56         TensorBetaIncInv,
57         psi,
58         TensorPsi,
59         rgamma,
60         TensorRGamma,
61         polygamma,
62         TensorPolyGamma,
63         multigammaln,
64         TensorMultiGammaLn,
65         digamma,
66         TensorDiGamma,
67         poch,
68         TensorPoch,
69     )
70     from .info_theory import (
71         entr,
72         TensorEntr,
73         rel_entr,
74         TensorRelEntr,
75         kl_div,
76         TensorKlDiv,
77     )
78     from .convenience import (
79         xlogy,
80         TensorXLogY,
81     )
82     from .bessel import (
83         jv,
84         TensorJV,
85         jve,
86         TensorJVE,
87         yn,
88         TensorYN,
89         yv,
90         TensorYV,
91         yve,
92         TensorYVE,
93         kn,
94         TensorKN,
95         kv,
96         TensorKV,
97         kve,
98         TensorKVE,
99         iv,
100         TensorIV,
101         ive,
102         TensorIVE,
103         hankel1,
104         TensorHankel1,
105         hankel1e,
106         TensorHankel1e,
107         hankel2,
108         TensorHankel2,
109         hankel2e,
110         TensorHankel2e,
111     )
112     from .hypergeometric_funcs import (
113         hyp2f1,
114         TensorHYP2F1,
115         hyp1f1,
116         TensorHYP1F1,
117         hyperu,
118         TensorHYPERU,
119         hyp0f1,
120         TensorHYP0F1,
121     )
122     from .ellip_harm import (
123         ellip_harm,
124         TensorEllipHarm,
125         ellip_harm_2,
126         TensorEllipHarm2,
127         ellip_normal,
128         TensorEllipNormal,
129     )
130     from .ellip_func_integrals import (
131         ellipk,
132         TensorEllipk,
133         ellipkm1,
134         TensorEllipkm1,
135         ellipkinc,
136         TensorEllipkinc,
137         ellipe,
138         TensorEllipe,
139         ellipeinc,
140         TensorEllipeinc,
141         elliprc,
142         TensorElliprc,
143         elliprd,
144         TensorElliprd,
145         elliprf,
146         TensorElliprf,
147         elliprg,
148         TensorElliprg,
149         elliprj,
150         TensorElliprj,
151     )
152 except ImportError:  # pragma: no cover
153     pass
154
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mars/tensor/special/__init__.py b/mars/tensor/special/__init__.py
--- a/mars/tensor/special/__init__.py
+++ b/mars/tensor/special/__init__.py
@@ -151,3 +151,7 @@
     )
 except ImportError:  # pragma: no cover
     pass
+
+_names_to_del = [_name for _name, _val in globals().items() if _val is None]
+[globals().pop(_name) for _name in _names_to_del]
+del _names_to_del
diff --git a/mars/tensor/special/ellip_func_integrals.py b/mars/tensor/special/ellip_func_integrals.py
--- a/mars/tensor/special/ellip_func_integrals.py
+++ b/mars/tensor/special/ellip_func_integrals.py
@@ -154,4 +154,4 @@
 except AttributeError:
     # These functions are not implemented before scipy v1.8 so
     # spsecial.func may cause AttributeError
-    pass
+    elliprc = elliprd = elliprf = elliprg = elliprj = None

{"golden_diff": "diff --git a/mars/tensor/special/__init__.py b/mars/tensor/special/__init__.py\n--- a/mars/tensor/special/__init__.py\n+++ b/mars/tensor/special/__init__.py\n@@ -151,3 +151,7 @@\n     )\n except ImportError:  # pragma: no cover\n     pass\n+\n+_names_to_del = [_name for _name, _val in globals().items() if _val is None]\n+[globals().pop(_name) for _name in _names_to_del]\n+del _names_to_del\ndiff --git a/mars/tensor/special/ellip_func_integrals.py b/mars/tensor/special/ellip_func_integrals.py\n--- a/mars/tensor/special/ellip_func_integrals.py\n+++ b/mars/tensor/special/ellip_func_integrals.py\n@@ -154,4 +154,4 @@\n except AttributeError:\n     # These functions are not implemented before scipy v1.8 so\n     # spsecial.func may cause AttributeError\n-    pass\n+    elliprc = elliprd = elliprf = elliprg = elliprj = None\n", "issue": "[BUG] ImportError: cannot import name 'elliprc' from 'mars.tensor.special.ellip_func_integrals' \n<!--\r\nThank you for your contribution!\r\n\r\nPlease review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.\r\n-->\r\n\r\n**Describe the bug**\r\nA clear and concise description of what the bug is.\r\n\r\n```python\r\nTraceback:\r\n/usr/local/python3/lib/python3.7/importlib/__init__.py:127: in import_module\r\n    return _bootstrap._gcd_import(name[level:], package, level)\r\nmars/tensor/special/tests/test_special.py:57: in <module>\r\n    from ..ellip_func_integrals import (\r\nE   ImportError: cannot import name 'elliprc' from 'mars.tensor.special.ellip_func_integrals' (/home/jenkins/agent/aci/mars/tensor/special/ellip_func_integrals.py)\r\n```\r\n\r\n\r\n```python\r\nTraceback:\r\n/usr/local/python3/lib/python3.7/importlib/__init__.py:127: in import_module\r\n    return _bootstrap._gcd_import(name[level:], package, level)\r\nmars/tensor/special/tests/test_special.py:18: in <module>\r\n    from scipy.special import (\r\nE   ImportError: cannot import name 'elliprd' from 'scipy.special' (/home/admin/py3/lib/python3.7/site-packages/scipy/special/__init__.py)\r\n```\r\n\r\n**To Reproduce**\r\nTo help us reproducing this bug, please provide information below:\r\n1. Your Python version 3.7.7\r\n2. The version of Mars you use Latest master\r\n3. Versions of crucial packages, such as numpy, scipy and pandas `scipy==1.5.0`\r\n4. Full stack of the error.\r\n5. Minimized code to reproduce the error.\r\n\r\n**Expected behavior**\r\nA clear and concise description of what you expected to happen.\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n\n", "before_files": [{"content": "# Copyright 1999-2021 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport scipy.special as spspecial\n\nfrom ..arithmetic.utils import arithmetic_operand\nfrom ..utils import infer_dtype, implement_scipy\nfrom .core import (\n    _register_special_op,\n    TensorSpecialBinOp,\n    TensorSpecialUnaryOp,\n    TensorSpecialMultiOp,\n)\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"unary\")\nclass TensorEllipk(TensorSpecialUnaryOp):\n    _func_name = \"ellipk\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"unary\")\nclass TensorEllipkm1(TensorSpecialUnaryOp):\n    _func_name = \"ellipkm1\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"binary_and\")\nclass TensorEllipkinc(TensorSpecialBinOp):\n    _func_name = \"ellipkinc\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"unary\")\nclass TensorEllipe(TensorSpecialUnaryOp):\n    _func_name = \"ellipe\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"binary_and\")\nclass TensorEllipeinc(TensorSpecialBinOp):\n    _func_name = \"ellipeinc\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"binary_and\")\nclass TensorElliprc(TensorSpecialBinOp):\n    _func_name = \"elliprc\"\n\n\n@_register_special_op\nclass TensorElliprd(TensorSpecialMultiOp):\n    _ARG_COUNT = 3\n    _func_name = \"elliprd\"\n\n\n@_register_special_op\nclass TensorElliprf(TensorSpecialMultiOp):\n    _ARG_COUNT = 3\n    _func_name = \"elliprf\"\n\n\n@_register_special_op\nclass TensorElliprg(TensorSpecialMultiOp):\n    _ARG_COUNT = 3\n    _func_name = \"elliprg\"\n\n\n@_register_special_op\nclass TensorElliprj(TensorSpecialMultiOp):\n    _ARG_COUNT = 4\n    _func_name = \"elliprj\"\n\n\n@implement_scipy(spspecial.ellipk)\n@infer_dtype(spspecial.ellipk)\ndef ellipk(x, **kwargs):\n    op = TensorEllipk(**kwargs)\n    return op(x)\n\n\n@implement_scipy(spspecial.ellipkm1)\n@infer_dtype(spspecial.ellipkm1)\ndef ellipkm1(x, **kwargs):\n    op = TensorEllipkm1(**kwargs)\n    return op(x)\n\n\n@implement_scipy(spspecial.ellipkinc)\n@infer_dtype(spspecial.ellipkinc)\ndef ellipkinc(phi, m, **kwargs):\n    op = TensorEllipkinc(**kwargs)\n    return op(phi, m)\n\n\n@implement_scipy(spspecial.ellipe)\n@infer_dtype(spspecial.ellipe)\ndef ellipe(x, **kwargs):\n    op = TensorEllipe(**kwargs)\n    return op(x)\n\n\n@implement_scipy(spspecial.ellipeinc)\n@infer_dtype(spspecial.ellipeinc)\ndef ellipeinc(phi, m, **kwargs):\n    op = TensorEllipeinc(**kwargs)\n    return op(phi, m)\n\n\ntry:\n\n    @implement_scipy(spspecial.elliprc)\n    @infer_dtype(spspecial.elliprc)\n    def elliprc(x, y, **kwargs):\n        op = TensorElliprc(**kwargs)\n        return op(x, y)\n\n    @implement_scipy(spspecial.elliprd)\n    @infer_dtype(spspecial.elliprd)\n    def elliprd(x, y, z, **kwargs):\n        op = TensorElliprd(**kwargs)\n        return op(x, y, z)\n\n    @implement_scipy(spspecial.elliprf)\n    @infer_dtype(spspecial.elliprf)\n    def elliprf(x, y, z, **kwargs):\n        op = TensorElliprf(**kwargs)\n        return op(x, y, z)\n\n    @implement_scipy(spspecial.elliprg)\n    @infer_dtype(spspecial.elliprg)\n    def elliprg(x, y, z, **kwargs):\n        op = TensorElliprg(**kwargs)\n        return op(x, y, z)\n\n    @implement_scipy(spspecial.elliprj)\n    @infer_dtype(spspecial.elliprj)\n    def elliprj(x, y, z, p, **kwargs):\n        op = TensorElliprj(**kwargs)\n        return op(x, y, z, p)\n\nexcept AttributeError:\n    # These functions are not implemented before scipy v1.8 so\n    # spsecial.func may cause AttributeError\n    pass\n", "path": "mars/tensor/special/ellip_func_integrals.py"}, {"content": "# Copyright 1999-2021 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ntry:\n    import scipy\n\n    from .err_fresnel import (\n        erf,\n        TensorErf,\n        erfc,\n        TensorErfc,\n        erfcx,\n        TensorErfcx,\n        erfi,\n        TensorErfi,\n        erfinv,\n        TensorErfinv,\n        erfcinv,\n        TensorErfcinv,\n    )\n    from .gamma_funcs import (\n        gamma,\n        TensorGamma,\n        gammaln,\n        TensorGammaln,\n        loggamma,\n        TensorLogGamma,\n        gammasgn,\n        TensorGammaSgn,\n        gammainc,\n        TensorGammaInc,\n        gammaincinv,\n        TensorGammaIncInv,\n        gammaincc,\n        TensorGammaIncc,\n        gammainccinv,\n        TensorGammaInccInv,\n        beta,\n        TensorBeta,\n        betaln,\n        TensorBetaLn,\n        betainc,\n        TensorBetaInc,\n        betaincinv,\n        TensorBetaIncInv,\n        psi,\n        TensorPsi,\n        rgamma,\n        TensorRGamma,\n        polygamma,\n        TensorPolyGamma,\n        multigammaln,\n        TensorMultiGammaLn,\n        digamma,\n        TensorDiGamma,\n        poch,\n        TensorPoch,\n    )\n    from .info_theory import (\n        entr,\n        TensorEntr,\n        rel_entr,\n        TensorRelEntr,\n        kl_div,\n        TensorKlDiv,\n    )\n    from .convenience import (\n        xlogy,\n        TensorXLogY,\n    )\n    from .bessel import (\n        jv,\n        TensorJV,\n        jve,\n        TensorJVE,\n        yn,\n        TensorYN,\n        yv,\n        TensorYV,\n        yve,\n        TensorYVE,\n        kn,\n        TensorKN,\n        kv,\n        TensorKV,\n        kve,\n        TensorKVE,\n        iv,\n        TensorIV,\n        ive,\n        TensorIVE,\n        hankel1,\n        TensorHankel1,\n        hankel1e,\n        TensorHankel1e,\n        hankel2,\n        TensorHankel2,\n        hankel2e,\n        TensorHankel2e,\n    )\n    from .hypergeometric_funcs import (\n        hyp2f1,\n        TensorHYP2F1,\n        hyp1f1,\n        TensorHYP1F1,\n        hyperu,\n        TensorHYPERU,\n        hyp0f1,\n        TensorHYP0F1,\n    )\n    from .ellip_harm import (\n        ellip_harm,\n        TensorEllipHarm,\n        ellip_harm_2,\n        TensorEllipHarm2,\n        ellip_normal,\n        TensorEllipNormal,\n    )\n    from .ellip_func_integrals import (\n        ellipk,\n        TensorEllipk,\n        ellipkm1,\n        TensorEllipkm1,\n        ellipkinc,\n        TensorEllipkinc,\n        ellipe,\n        TensorEllipe,\n        ellipeinc,\n        TensorEllipeinc,\n        elliprc,\n        TensorElliprc,\n        elliprd,\n        TensorElliprd,\n        elliprf,\n        TensorElliprf,\n        elliprg,\n        TensorElliprg,\n        elliprj,\n        TensorElliprj,\n    )\nexcept ImportError:  # pragma: no cover\n    pass\n", "path": "mars/tensor/special/__init__.py"}], "after_files": [{"content": "# Copyright 1999-2021 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport scipy.special as spspecial\n\nfrom ..arithmetic.utils import arithmetic_operand\nfrom ..utils import infer_dtype, implement_scipy\nfrom .core import (\n    _register_special_op,\n    TensorSpecialBinOp,\n    TensorSpecialUnaryOp,\n    TensorSpecialMultiOp,\n)\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"unary\")\nclass TensorEllipk(TensorSpecialUnaryOp):\n    _func_name = \"ellipk\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"unary\")\nclass TensorEllipkm1(TensorSpecialUnaryOp):\n    _func_name = \"ellipkm1\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"binary_and\")\nclass TensorEllipkinc(TensorSpecialBinOp):\n    _func_name = \"ellipkinc\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"unary\")\nclass TensorEllipe(TensorSpecialUnaryOp):\n    _func_name = \"ellipe\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"binary_and\")\nclass TensorEllipeinc(TensorSpecialBinOp):\n    _func_name = \"ellipeinc\"\n\n\n@_register_special_op\n@arithmetic_operand(sparse_mode=\"binary_and\")\nclass TensorElliprc(TensorSpecialBinOp):\n    _func_name = \"elliprc\"\n\n\n@_register_special_op\nclass TensorElliprd(TensorSpecialMultiOp):\n    _ARG_COUNT = 3\n    _func_name = \"elliprd\"\n\n\n@_register_special_op\nclass TensorElliprf(TensorSpecialMultiOp):\n    _ARG_COUNT = 3\n    _func_name = \"elliprf\"\n\n\n@_register_special_op\nclass TensorElliprg(TensorSpecialMultiOp):\n    _ARG_COUNT = 3\n    _func_name = \"elliprg\"\n\n\n@_register_special_op\nclass TensorElliprj(TensorSpecialMultiOp):\n    _ARG_COUNT = 4\n    _func_name = \"elliprj\"\n\n\n@implement_scipy(spspecial.ellipk)\n@infer_dtype(spspecial.ellipk)\ndef ellipk(x, **kwargs):\n    op = TensorEllipk(**kwargs)\n    return op(x)\n\n\n@implement_scipy(spspecial.ellipkm1)\n@infer_dtype(spspecial.ellipkm1)\ndef ellipkm1(x, **kwargs):\n    op = TensorEllipkm1(**kwargs)\n    return op(x)\n\n\n@implement_scipy(spspecial.ellipkinc)\n@infer_dtype(spspecial.ellipkinc)\ndef ellipkinc(phi, m, **kwargs):\n    op = TensorEllipkinc(**kwargs)\n    return op(phi, m)\n\n\n@implement_scipy(spspecial.ellipe)\n@infer_dtype(spspecial.ellipe)\ndef ellipe(x, **kwargs):\n    op = TensorEllipe(**kwargs)\n    return op(x)\n\n\n@implement_scipy(spspecial.ellipeinc)\n@infer_dtype(spspecial.ellipeinc)\ndef ellipeinc(phi, m, **kwargs):\n    op = TensorEllipeinc(**kwargs)\n    return op(phi, m)\n\n\ntry:\n\n    @implement_scipy(spspecial.elliprc)\n    @infer_dtype(spspecial.elliprc)\n    def elliprc(x, y, **kwargs):\n        op = TensorElliprc(**kwargs)\n        return op(x, y)\n\n    @implement_scipy(spspecial.elliprd)\n    @infer_dtype(spspecial.elliprd)\n    def elliprd(x, y, z, **kwargs):\n        op = TensorElliprd(**kwargs)\n        return op(x, y, z)\n\n    @implement_scipy(spspecial.elliprf)\n    @infer_dtype(spspecial.elliprf)\n    def elliprf(x, y, z, **kwargs):\n        op = TensorElliprf(**kwargs)\n        return op(x, y, z)\n\n    @implement_scipy(spspecial.elliprg)\n    @infer_dtype(spspecial.elliprg)\n    def elliprg(x, y, z, **kwargs):\n        op = TensorElliprg(**kwargs)\n        return op(x, y, z)\n\n    @implement_scipy(spspecial.elliprj)\n    @infer_dtype(spspecial.elliprj)\n    def elliprj(x, y, z, p, **kwargs):\n        op = TensorElliprj(**kwargs)\n        return op(x, y, z, p)\n\nexcept AttributeError:\n    # These functions are not implemented before scipy v1.8 so\n    # spsecial.func may cause AttributeError\n    elliprc = elliprd = elliprf = elliprg = elliprj = None\n", "path": "mars/tensor/special/ellip_func_integrals.py"}, {"content": "# Copyright 1999-2021 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\ntry:\n    import scipy\n\n    from .err_fresnel import (\n        erf,\n        TensorErf,\n        erfc,\n        TensorErfc,\n        erfcx,\n        TensorErfcx,\n        erfi,\n        TensorErfi,\n        erfinv,\n        TensorErfinv,\n        erfcinv,\n        TensorErfcinv,\n    )\n    from .gamma_funcs import (\n        gamma,\n        TensorGamma,\n        gammaln,\n        TensorGammaln,\n        loggamma,\n        TensorLogGamma,\n        gammasgn,\n        TensorGammaSgn,\n        gammainc,\n        TensorGammaInc,\n        gammaincinv,\n        TensorGammaIncInv,\n        gammaincc,\n        TensorGammaIncc,\n        gammainccinv,\n        TensorGammaInccInv,\n        beta,\n        TensorBeta,\n        betaln,\n        TensorBetaLn,\n        betainc,\n        TensorBetaInc,\n        betaincinv,\n        TensorBetaIncInv,\n        psi,\n        TensorPsi,\n        rgamma,\n        TensorRGamma,\n        polygamma,\n        TensorPolyGamma,\n        multigammaln,\n        TensorMultiGammaLn,\n        digamma,\n        TensorDiGamma,\n        poch,\n        TensorPoch,\n    )\n    from .info_theory import (\n        entr,\n        TensorEntr,\n        rel_entr,\n        TensorRelEntr,\n        kl_div,\n        TensorKlDiv,\n    )\n    from .convenience import (\n        xlogy,\n        TensorXLogY,\n    )\n    from .bessel import (\n        jv,\n        TensorJV,\n        jve,\n        TensorJVE,\n        yn,\n        TensorYN,\n        yv,\n        TensorYV,\n        yve,\n        TensorYVE,\n        kn,\n        TensorKN,\n        kv,\n        TensorKV,\n        kve,\n        TensorKVE,\n        iv,\n        TensorIV,\n        ive,\n        TensorIVE,\n        hankel1,\n        TensorHankel1,\n        hankel1e,\n        TensorHankel1e,\n        hankel2,\n        TensorHankel2,\n        hankel2e,\n        TensorHankel2e,\n    )\n    from .hypergeometric_funcs import (\n        hyp2f1,\n        TensorHYP2F1,\n        hyp1f1,\n        TensorHYP1F1,\n        hyperu,\n        TensorHYPERU,\n        hyp0f1,\n        TensorHYP0F1,\n    )\n    from .ellip_harm import (\n        ellip_harm,\n        TensorEllipHarm,\n        ellip_harm_2,\n        TensorEllipHarm2,\n        ellip_normal,\n        TensorEllipNormal,\n    )\n    from .ellip_func_integrals import (\n        ellipk,\n        TensorEllipk,\n        ellipkm1,\n        TensorEllipkm1,\n        ellipkinc,\n        TensorEllipkinc,\n        ellipe,\n        TensorEllipe,\n        ellipeinc,\n        TensorEllipeinc,\n        elliprc,\n        TensorElliprc,\n        elliprd,\n        TensorElliprd,\n        elliprf,\n        TensorElliprf,\n        elliprg,\n        TensorElliprg,\n        elliprj,\n        TensorElliprj,\n    )\nexcept ImportError:  # pragma: no cover\n    pass\n\n_names_to_del = [_name for _name, _val in globals().items() if _val is None]\n[globals().pop(_name) for _name in _names_to_del]\ndel _names_to_del\n", "path": "mars/tensor/special/__init__.py"}]}