Skip to content

Commit 7800026

Browse files
committed
Type more of the expansion functionality
1 parent c6f89f0 commit 7800026

File tree

11 files changed

+490
-412
lines changed

11 files changed

+490
-412
lines changed

sumpy/expansion/__init__.py

Lines changed: 143 additions & 171 deletions
Large diffs are not rendered by default.

sumpy/expansion/diff_op.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import logging
2929
from dataclasses import dataclass
3030
from itertools import accumulate
31-
from typing import TYPE_CHECKING
31+
from typing import TYPE_CHECKING, TypeAlias
3232

3333
import numpy as np
3434
import sympy as sp
@@ -48,6 +48,13 @@
4848
logger = logging.getLogger(__name__)
4949

5050
__doc__ = """
51+
.. autodata:: MultiIndex
52+
:no-index:
53+
54+
.. class:: MultiIndex
55+
56+
See above.
57+
5158
Differential operator interface
5259
-------------------------------
5360
@@ -58,14 +65,17 @@
5865
"""
5966

6067

68+
MultiIndex: TypeAlias = tuple[int, ...]
69+
70+
6171
@dataclass(frozen=True)
6272
class DerivativeIdentifier:
6373
"""
6474
.. autoattribute:: mi
6575
.. autoattribute: vec_idx
6676
"""
6777

68-
mi: tuple[int, ...]
78+
mi: MultiIndex
6979
"""
7080
Multi-index of the derivative being taken, a tuple with a number of entries
7181
corresponding to the dimension.

0 commit comments

Comments
 (0)