-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set typehints_document_rtype = False
- Loading branch information
1 parent
0bd2835
commit 36104c3
Showing
28 changed files
with
76 additions
and
103 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,19 @@ | ||
"""Define new data types""" | ||
from __future__ import annotations | ||
import pandas as pd | ||
from typing import Union, NewType, Sequence | ||
import numpy as np | ||
from typing import Union, List, Tuple, Any, Protocol, TypeVar, Generic, Optional | ||
from sklearn.base import BaseEstimator | ||
import pandas as pd | ||
|
||
# Array-like Types | ||
""" | ||
ArrayLike = Union[ | ||
List[Union[int, float, Any]], | ||
Tuple[Union[int, float, Any], ...], | ||
np.ndarray, | ||
pd.DataFrame, | ||
pd.Series | ||
] | ||
# Define the basic numeric type | ||
NumericType = Union[int, float] | ||
|
||
ArrayLikeInt = Union[List[int], List[int], Tuple[int], np.ndarray] | ||
ArrayLikeFloat = Union[List[Union[float, int]], Tuple[Union[float, int]], np.ndarray] | ||
ArrayLikeAny = Union[List[Any], Tuple[Any], np.ndarray] | ||
ArrayLikeBool = Union[List[bool], Tuple[bool], np.ndarray] | ||
""" | ||
# Define the 1D and 2D types using Union | ||
ArrayLike1DUnion = Union[Sequence[NumericType], np.ndarray, pd.Series] | ||
ArrayLike2DUnion = Union[Sequence[Sequence[NumericType]], np.ndarray, pd.DataFrame] | ||
|
||
# Array-like Types until depth 3 | ||
# General ArrayLike (only numbers) | ||
# 1D | ||
NumericType = Union[int, float] | ||
ArrayLike1D = Union[List[NumericType], Tuple[NumericType], pd.Series] | ||
# Now, we'll create distinct named types using NewType. | ||
# This won't change runtime behavior but will be recognized by static type checkers and can be documented. | ||
|
||
# A 1D array-like object. Can be a sequence (e.g., list or tuple) of ints/floats, numpy ndarray, or pandas Series. | ||
ArrayLike1D = NewType("ArrayLike1D", ArrayLike1DUnion) | ||
|
||
# 2D | ||
ArrayLike = Union[List[List[NumericType]], Tuple[Tuple[NumericType]], np.ndarray, pd.DataFrame] | ||
# A 2D array-like object. Can be a sequence of sequence of ints/floats, numpy ndarray, or pandas DataFrame. | ||
ArrayLike2D = NewType("ArrayLike2D", ArrayLike2DUnion) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-701 Bytes
(98%)
docs/build/doctrees/generated/aaanalysis.plot_settings.doctree
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/004048c0cbb6684bdb9047282ab71735/aaanalysis-plot_settings-2.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/163aacac4bd235c9af7a62d7b4d0c89f/aaanalysis-plot_get_cdict-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/1f3abea1675a65bb341756c52c9927f4/aaanalysis-plot_gcfs-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/72c2e4be500ecf10c85a4e6f81c365fc/aaanalysis-plot_legend-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/795a736e5af756908120c8bda412fd28/aaanalysis-plot_get_cmap-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/88d7f3f7cb5a284c0bfaa377fb4ce1d8/aaanalysis-plot_get_clist-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/fb29bffb69140db4f68c4eb913c6f7d3/aaanalysis-plot_settings-1.pdf
Binary file not shown.
Oops, something went wrong.