diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d5d4369 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +spell/en_us +spell/wordlist +typings/* diff --git a/typings/matplotlib/__init__.pyi b/typings/matplotlib/__init__.pyi deleted file mode 100644 index 92f46fe..0000000 --- a/typings/matplotlib/__init__.pyi +++ /dev/null @@ -1,116 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import contextlib -from pathlib import Path -from collections.abc import Callable, Generator -from packaging.version import Version -from matplotlib._api import MatplotlibDeprecationWarning -from typing import Any, NamedTuple -from matplotlib.cm import _colormaps as colormaps -from matplotlib.colors import _color_sequences as color_sequences - -__all__ = ["__bibtex__", "__version__", "__version_info__", "set_loglevel", "ExecutableNotFoundError", "get_configdir", "get_cachedir", "get_data_path", "matplotlib_fname", "MatplotlibDeprecationWarning", "RcParams", "rc_params", "rc_params_from_file", "rcParamsDefault", "rcParams", "rcParamsOrig", "defaultParams", "rc", "rcdefaults", "rc_file_defaults", "rc_file", "rc_context", "use", "get_backend", "interactive", "is_interactive", "colormaps", "color_sequences"] -class _VersionInfo(NamedTuple): - major: int - minor: int - micro: int - releaselevel: str - serial: int - ... - - -__bibtex__: str -__version__: str -__version_info__: _VersionInfo -def set_loglevel(level: str) -> None: - ... - -class _ExecInfo(NamedTuple): - executable: str - raw_version: str - version: Version - ... - - -class ExecutableNotFoundError(FileNotFoundError): - ... - - -def get_configdir() -> str: - ... - -def get_cachedir() -> str: - ... - -def get_data_path() -> str: - ... - -def matplotlib_fname() -> str: - ... - -class RcParams(dict[str, Any]): - validate: dict[str, Callable] - def __init__(self, *args, **kwargs) -> None: - ... - - def __setitem__(self, key: str, val: Any) -> None: - ... - - def __getitem__(self, key: str) -> Any: - ... - - def __iter__(self) -> Generator[str, None, None]: - ... - - def __len__(self) -> int: - ... - - def find_all(self, pattern: str) -> RcParams: - ... - - def copy(self) -> RcParams: - ... - - - -def rc_params(fail_on_error: bool = ...) -> RcParams: - ... - -def rc_params_from_file(fname: str | Path | os.PathLike, fail_on_error: bool = ..., use_default_template: bool = ...) -> RcParams: - ... - -rcParamsDefault: RcParams -rcParams: RcParams -rcParamsOrig: RcParams -defaultParams: dict[str, Any] -def rc(group: str, **kwargs) -> None: - ... - -def rcdefaults() -> None: - ... - -def rc_file_defaults() -> None: - ... - -def rc_file(fname: str | Path | os.PathLike, *, use_default_template: bool = ...) -> None: - ... - -@contextlib.contextmanager -def rc_context(rc: dict[str, Any] | None = ..., fname: str | Path | os.PathLike | None = ...) -> Generator[None, None, None]: - ... - -def use(backend: str, *, force: bool = ...) -> None: - ... - -def get_backend() -> str: - ... - -def interactive(b: bool) -> None: - ... - -def is_interactive() -> bool: - ... - diff --git a/typings/matplotlib/_afm.pyi b/typings/matplotlib/_afm.pyi deleted file mode 100644 index 6f6bc85..0000000 --- a/typings/matplotlib/_afm.pyi +++ /dev/null @@ -1,154 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -A python interface to Adobe Font Metrics Files. - -Although a number of other Python implementations exist, and may be more -complete than this, it was decided not to go with them because they were -either: - -1) copyrighted or used a non-BSD compatible license -2) had too many dependencies and a free standing lib was needed -3) did more than needed and it was easier to write afresh rather than - figure out how to get just what was needed. - -It is pretty easy to use, and has no external dependencies: - ->>> import matplotlib as mpl ->>> from pathlib import Path ->>> afm_path = Path(mpl.get_data_path(), 'fonts', 'afm', 'ptmr8a.afm') ->>> ->>> from matplotlib.afm import AFM ->>> with afm_path.open('rb') as fh: -... afm = AFM(fh) ->>> afm.string_width_height('What the heck?') -(6220.0, 694) ->>> afm.get_fontname() -'Times-Roman' ->>> afm.get_kern_dist('A', 'f') -0 ->>> afm.get_kern_dist('A', 'y') --92.0 ->>> afm.get_bbox_char('!') -[130, -9, 238, 676] - -As in the Adobe Font Metrics File Format Specification, all dimensions -are given in units of 1/1000 of the scale factor (point size) of the font -being used. -""" -_log = ... -CharMetrics = ... -CompositePart = ... -class AFM: - def __init__(self, fh) -> None: - """Parse the AFM file in file object *fh*.""" - ... - - def get_bbox_char(self, c, isord=...): - ... - - def string_width_height(self, s): # -> tuple[Literal[0], Literal[0]] | tuple[Unknown | Literal[0], float]: - """ - Return the string width (including kerning) and string height - as a (*w*, *h*) tuple. - """ - ... - - def get_str_bbox_and_descent(self, s): # -> tuple[Literal[0], Literal[0], Literal[0], Literal[0], Literal[0]] | tuple[int, float, Unknown | Literal[0], float, float]: - """Return the string bounding box and the maximal descent.""" - ... - - def get_str_bbox(self, s): # -> tuple[Literal[0], Literal[0], Literal[0], Literal[0]] | tuple[int, float, Unknown | Literal[0], float]: - """Return the string bounding box.""" - ... - - def get_name_char(self, c, isord=...): - """Get the name of the character, i.e., ';' is 'semicolon'.""" - ... - - def get_width_char(self, c, isord=...): - """ - Get the width of the character from the character metric WX field. - """ - ... - - def get_width_from_char_name(self, name): - """Get the width of the character from a type1 character name.""" - ... - - def get_height_char(self, c, isord=...): - """Get the bounding box (ink) height of character *c* (space is 0).""" - ... - - def get_kern_dist(self, c1, c2): - """ - Return the kerning pair distance (possibly 0) for chars *c1* and *c2*. - """ - ... - - def get_kern_dist_from_name(self, name1, name2): - """ - Return the kerning pair distance (possibly 0) for chars - *name1* and *name2*. - """ - ... - - def get_fontname(self): - """Return the font name, e.g., 'Times-Roman'.""" - ... - - @property - def postscript_name(self): - ... - - def get_fullname(self): - """Return the font full name, e.g., 'Times-Roman'.""" - ... - - def get_familyname(self): # -> str: - """Return the font family name, e.g., 'Times'.""" - ... - - @property - def family_name(self): # -> str: - """The font family name, e.g., 'Times'.""" - ... - - def get_weight(self): - """Return the font weight, e.g., 'Bold' or 'Roman'.""" - ... - - def get_angle(self): - """Return the fontangle as float.""" - ... - - def get_capheight(self): - """Return the cap height as float.""" - ... - - def get_xheight(self): - """Return the xheight as float.""" - ... - - def get_underline_thickness(self): - """Return the underline thickness as float.""" - ... - - def get_horizontal_stem_width(self): - """ - Return the standard horizontal stem width as float, or *None* if - not specified in AFM file. - """ - ... - - def get_vertical_stem_width(self): - """ - Return the standard vertical stem width as float, or *None* if - not specified in AFM file. - """ - ... - - - diff --git a/typings/matplotlib/_animation_data.pyi b/typings/matplotlib/_animation_data.pyi deleted file mode 100644 index 6116fa9..0000000 --- a/typings/matplotlib/_animation_data.pyi +++ /dev/null @@ -1,8 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -JS_INCLUDE = ... -STYLE_INCLUDE = ... -DISPLAY_TEMPLATE = ... -INCLUDED_FRAMES = ... diff --git a/typings/matplotlib/_api/__init__.pyi b/typings/matplotlib/_api/__init__.pyi deleted file mode 100644 index 1bef213..0000000 --- a/typings/matplotlib/_api/__init__.pyi +++ /dev/null @@ -1,66 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable, Generator, Mapping, Sequence -from typing import Any, Iterable, TypeVar, overload -from numpy.typing import NDArray -from .deprecation import MatplotlibDeprecationWarning as MatplotlibDeprecationWarning, delete_parameter as delete_parameter, deprecate_method_override as deprecate_method_override, deprecate_privatize_attribute as deprecate_privatize_attribute, deprecated as deprecated, make_keyword_only as make_keyword_only, rename_parameter as rename_parameter, suppress_matplotlib_deprecation_warning as suppress_matplotlib_deprecation_warning, warn_deprecated as warn_deprecated - -_T = TypeVar("_T") -class classproperty(Any): - def __init__(self, fget: Callable[[_T], Any], fset: None = ..., fdel: None = ..., doc: str | None = ...) -> None: - ... - - @overload - def __get__(self, instance: None, owner: None) -> classproperty: - ... - - @overload - def __get__(self, instance: object, owner: type[object]) -> Any: - ... - - @property - def fget(self) -> Callable[[_T], Any]: - ... - - - -def check_isinstance(types: type | tuple[type | None, ...], /, **kwargs: Any) -> None: - ... - -def check_in_list(values: Sequence[Any], /, *, _print_supported_values: bool = ..., **kwargs: Any) -> None: - ... - -def check_shape(shape: tuple[int | None, ...], /, **kwargs: NDArray) -> None: - ... - -def check_getitem(mapping: Mapping[Any, Any], /, **kwargs: Any) -> Any: - ... - -def caching_module_getattr(cls: type) -> Callable[[str], Any]: - ... - -@overload -def define_aliases(alias_d: dict[str, list[str]], cls: None = ...) -> Callable[[type[_T]], type[_T]]: - ... - -@overload -def define_aliases(alias_d: dict[str, list[str]], cls: type[_T]) -> type[_T]: - ... - -def select_matching_signature(funcs: list[Callable], *args: Any, **kwargs: Any) -> Any: - ... - -def nargs_error(name: str, takes: int | str, given: int) -> TypeError: - ... - -def kwarg_error(name: str, kw: str | Iterable[str]) -> TypeError: - ... - -def recursive_subclasses(cls: type) -> Generator[type, None, None]: - ... - -def warn_external(message: str | Warning, category: type[Warning] | None = ...) -> None: - ... - diff --git a/typings/matplotlib/_api/deprecation.pyi b/typings/matplotlib/_api/deprecation.pyi deleted file mode 100644 index 15463f0..0000000 --- a/typings/matplotlib/_api/deprecation.pyi +++ /dev/null @@ -1,82 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import contextlib -from collections.abc import Callable -from typing import Any, TypeVar, TypedDict, overload -from typing_extensions import ParamSpec, Unpack - -_P = ParamSpec("_P") -_R = TypeVar("_R") -_T = TypeVar("_T") -class MatplotlibDeprecationWarning(DeprecationWarning): - ... - - -class DeprecationKwargs(TypedDict, total=False): - message: str - alternative: str - pending: bool - obj_type: str - addendum: str - removal: str - ... - - -class NamedDeprecationKwargs(DeprecationKwargs, total=False): - name: str - ... - - -def warn_deprecated(since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> None: - ... - -def deprecated(since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> Callable[[_T], _T]: - ... - -class deprecate_privatize_attribute(Any): - def __init__(self, since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> None: - ... - - def __set_name__(self, owner: type[object], name: str) -> None: - ... - - - -DECORATORS: dict[Callable, Callable] = ... -@overload -def rename_parameter(since: str, old: str, new: str, func: None = ...) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: - ... - -@overload -def rename_parameter(since: str, old: str, new: str, func: Callable[_P, _R]) -> Callable[_P, _R]: - ... - -class _deprecated_parameter_class: - ... - - -_deprecated_parameter: _deprecated_parameter_class -@overload -def delete_parameter(since: str, name: str, func: None = ..., **kwargs: Unpack[DeprecationKwargs]) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: - ... - -@overload -def delete_parameter(since: str, name: str, func: Callable[_P, _R], **kwargs: Unpack[DeprecationKwargs]) -> Callable[_P, _R]: - ... - -@overload -def make_keyword_only(since: str, name: str, func: None = ...) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: - ... - -@overload -def make_keyword_only(since: str, name: str, func: Callable[_P, _R]) -> Callable[_P, _R]: - ... - -def deprecate_method_override(method: Callable[_P, _R], obj: object | type, *, allow_empty: bool = ..., since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> Callable[_P, _R]: - ... - -def suppress_matplotlib_deprecation_warning() -> contextlib.AbstractContextManager[None]: - ... - diff --git a/typings/matplotlib/_blocking_input.pyi b/typings/matplotlib/_blocking_input.pyi deleted file mode 100644 index 25b7216..0000000 --- a/typings/matplotlib/_blocking_input.pyi +++ /dev/null @@ -1,26 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -def blocking_input_loop(figure, event_names, timeout, handler): # -> None: - """ - Run *figure*'s event loop while listening to interactive events. - - The events listed in *event_names* are passed to *handler*. - - This function is used to implement `.Figure.waitforbuttonpress`, - `.Figure.ginput`, and `.Axes.clabel`. - - Parameters - ---------- - figure : `~matplotlib.figure.Figure` - event_names : list of str - The names of the events passed to *handler*. - timeout : float - If positive, the event loop is stopped after *timeout* seconds. - handler : Callable[[Event], Any] - Function called for each event; it can force an early exit of the event - loop by calling ``canvas.stop_event_loop()``. - """ - ... - diff --git a/typings/matplotlib/_c_internal_utils.pyi b/typings/matplotlib/_c_internal_utils.pyi deleted file mode 100644 index 4fdcff1..0000000 --- a/typings/matplotlib/_c_internal_utils.pyi +++ /dev/null @@ -1,7 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -def display_is_valid() -> bool: - ... - diff --git a/typings/matplotlib/_cm.pyi b/typings/matplotlib/_cm.pyi deleted file mode 100644 index 5f1bdcd..0000000 --- a/typings/matplotlib/_cm.pyi +++ /dev/null @@ -1,126 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -Nothing here but dictionaries for generating LinearSegmentedColormaps, -and a dictionary of these dictionaries. - -Documentation for each is in pyplot.colormaps(). Please update this -with the purpose and type of your colormap if you add data for one here. -""" -_binary_data = ... -_autumn_data = ... -_bone_data = ... -_cool_data = ... -_copper_data = ... -_flag_data = ... -_prism_data = ... -def cubehelix(gamma=..., s=..., r=..., h=...): # -> dict[str, partial[Unknown]]: - """ - Return custom data dictionary of (r, g, b) conversion functions, which can - be used with :func:`register_cmap`, for the cubehelix color scheme. - - Unlike most other color schemes cubehelix was designed by D.A. Green to - be monotonically increasing in terms of perceived brightness. - Also, when printed on a black and white postscript printer, the scheme - results in a greyscale with monotonically increasing brightness. - This color scheme is named cubehelix because the (r, g, b) values produced - can be visualised as a squashed helix around the diagonal in the - (r, g, b) color cube. - - For a unit color cube (i.e. 3D coordinates for (r, g, b) each in the - range 0 to 1) the color scheme starts at (r, g, b) = (0, 0, 0), i.e. black, - and finishes at (r, g, b) = (1, 1, 1), i.e. white. For some fraction *x*, - between 0 and 1, the color is the corresponding grey value at that - fraction along the black to white diagonal (x, x, x) plus a color - element. This color element is calculated in a plane of constant - perceived intensity and controlled by the following parameters. - - Parameters - ---------- - gamma : float, default: 1 - Gamma factor emphasizing either low intensity values (gamma < 1), or - high intensity values (gamma > 1). - s : float, default: 0.5 (purple) - The starting color. - r : float, default: -1.5 - The number of r, g, b rotations in color that are made from the start - to the end of the color scheme. The default of -1.5 corresponds to -> - B -> G -> R -> B. - h : float, default: 1 - The hue, i.e. how saturated the colors are. If this parameter is zero - then the color scheme is purely a greyscale. - """ - ... - -_cubehelix_data = ... -_bwr_data = ... -_brg_data = ... -gfunc = ... -_gnuplot_data = ... -_gnuplot2_data = ... -_ocean_data = ... -_afmhot_data = ... -_rainbow_data = ... -_seismic_data = ... -_terrain_data = ... -_gray_data = ... -_hot_data = ... -_hsv_data = ... -_jet_data = ... -_pink_data = ... -_spring_data = ... -_summer_data = ... -_winter_data = ... -_nipy_spectral_data = ... -_Blues_data = ... -_BrBG_data = ... -_BuGn_data = ... -_BuPu_data = ... -_GnBu_data = ... -_Greens_data = ... -_Greys_data = ... -_Oranges_data = ... -_OrRd_data = ... -_PiYG_data = ... -_PRGn_data = ... -_PuBu_data = ... -_PuBuGn_data = ... -_PuOr_data = ... -_PuRd_data = ... -_Purples_data = ... -_RdBu_data = ... -_RdGy_data = ... -_RdPu_data = ... -_RdYlBu_data = ... -_RdYlGn_data = ... -_Reds_data = ... -_Spectral_data = ... -_YlGn_data = ... -_YlGnBu_data = ... -_YlOrBr_data = ... -_YlOrRd_data = ... -_Accent_data = ... -_Dark2_data = ... -_Paired_data = ... -_Pastel1_data = ... -_Pastel2_data = ... -_Set1_data = ... -_Set2_data = ... -_Set3_data = ... -_gist_earth_data = ... -_gist_gray_data = ... -_gist_heat_data = ... -_gist_ncar_data = ... -_gist_rainbow_data = ... -_gist_stern_data = ... -_gist_yarg_data = ... -_coolwarm_data = ... -_CMRmap_data = ... -_wistia_data = ... -_tab10_data = ... -_tab20_data = ... -_tab20b_data = ... -_tab20c_data = ... -datad = ... diff --git a/typings/matplotlib/_cm_listed.pyi b/typings/matplotlib/_cm_listed.pyi deleted file mode 100644 index d5a3fe2..0000000 --- a/typings/matplotlib/_cm_listed.pyi +++ /dev/null @@ -1,13 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -_magma_data = ... -_inferno_data = ... -_plasma_data = ... -_viridis_data = ... -_cividis_data = ... -_twilight_data = ... -_twilight_shifted_data = ... -_turbo_data = ... -cmaps = ... diff --git a/typings/matplotlib/_color_data.pyi b/typings/matplotlib/_color_data.pyi deleted file mode 100644 index 51af11a..0000000 --- a/typings/matplotlib/_color_data.pyi +++ /dev/null @@ -1,10 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .typing import ColorType - -BASE_COLORS: dict[str, ColorType] -TABLEAU_COLORS: dict[str, ColorType] -XKCD_COLORS: dict[str, ColorType] -CSS4_COLORS: dict[str, ColorType] diff --git a/typings/matplotlib/_constrained_layout.pyi b/typings/matplotlib/_constrained_layout.pyi deleted file mode 100644 index aecbe8e..0000000 --- a/typings/matplotlib/_constrained_layout.pyi +++ /dev/null @@ -1,233 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -Adjust subplot layouts so that there are no overlapping axes or axes -decorations. All axes decorations are dealt with (labels, ticks, titles, -ticklabels) and some dependent artists are also dealt with (colorbar, -suptitle). - -Layout is done via `~matplotlib.gridspec`, with one constraint per gridspec, -so it is possible to have overlapping axes if the gridspecs overlap (i.e. -using `~matplotlib.gridspec.GridSpecFromSubplotSpec`). Axes placed using -``figure.subplots()`` or ``figure.add_subplots()`` will participate in the -layout. Axes manually placed via ``figure.add_axes()`` will not. - -See Tutorial: :ref:`constrainedlayout_guide` - -General idea: -------------- - -First, a figure has a gridspec that divides the figure into nrows and ncols, -with heights and widths set by ``height_ratios`` and ``width_ratios``, -often just set to 1 for an equal grid. - -Subplotspecs that are derived from this gridspec can contain either a -``SubPanel``, a ``GridSpecFromSubplotSpec``, or an ``Axes``. The ``SubPanel`` -and ``GridSpecFromSubplotSpec`` are dealt with recursively and each contain an -analogous layout. - -Each ``GridSpec`` has a ``_layoutgrid`` attached to it. The ``_layoutgrid`` -has the same logical layout as the ``GridSpec``. Each row of the grid spec -has a top and bottom "margin" and each column has a left and right "margin". -The "inner" height of each row is constrained to be the same (or as modified -by ``height_ratio``), and the "inner" width of each column is -constrained to be the same (as modified by ``width_ratio``), where "inner" -is the width or height of each column/row minus the size of the margins. - -Then the size of the margins for each row and column are determined as the -max width of the decorators on each axes that has decorators in that margin. -For instance, a normal axes would have a left margin that includes the -left ticklabels, and the ylabel if it exists. The right margin may include a -colorbar, the bottom margin the xaxis decorations, and the top margin the -title. - -With these constraints, the solver then finds appropriate bounds for the -columns and rows. It's possible that the margins take up the whole figure, -in which case the algorithm is not applied and a warning is raised. - -See the tutorial :ref:`constrainedlayout_guide` -for more discussion of the algorithm with examples. -""" -_log = ... -def do_constrained_layout(fig, h_pad, w_pad, hspace=..., wspace=..., rect=..., compress=...): # -> dict[Unknown, Unknown] | None: - """ - Do the constrained_layout. Called at draw time in - ``figure.constrained_layout()`` - - Parameters - ---------- - fig : `~matplotlib.figure.Figure` - `.Figure` instance to do the layout in. - - h_pad, w_pad : float - Padding around the axes elements in figure-normalized units. - - hspace, wspace : float - Fraction of the figure to dedicate to space between the - axes. These are evenly spread between the gaps between the axes. - A value of 0.2 for a three-column layout would have a space - of 0.1 of the figure width between each column. - If h/wspace < h/w_pad, then the pads are used instead. - - rect : tuple of 4 floats - Rectangle in figure coordinates to perform constrained layout in - [left, bottom, width, height], each from 0-1. - - compress : bool - Whether to shift Axes so that white space in between them is - removed. This is useful for simple grids of fixed-aspect Axes (e.g. - a grid of images). - - Returns - ------- - layoutgrid : private debugging structure - """ - ... - -def make_layoutgrids(fig, layoutgrids, rect=...): # -> dict[Unknown, Unknown]: - """ - Make the layoutgrid tree. - - (Sub)Figures get a layoutgrid so we can have figure margins. - - Gridspecs that are attached to axes get a layoutgrid so axes - can have margins. - """ - ... - -def make_layoutgrids_gs(layoutgrids, gs): - """ - Make the layoutgrid for a gridspec (and anything nested in the gridspec) - """ - ... - -def check_no_collapsed_axes(layoutgrids, fig): # -> bool: - """ - Check that no axes have collapsed to zero size. - """ - ... - -def compress_fixed_aspect(layoutgrids, fig): - ... - -def get_margin_from_padding(obj, *, w_pad=..., h_pad=..., hspace=..., wspace=...): # -> dict[str, int]: - ... - -def make_layout_margins(layoutgrids, fig, renderer, *, w_pad=..., h_pad=..., hspace=..., wspace=...): - """ - For each axes, make a margin between the *pos* layoutbox and the - *axes* layoutbox be a minimum size that can accommodate the - decorations on the axis. - - Then make room for colorbars. - - Parameters - ---------- - layoutgrids : dict - fig : `~matplotlib.figure.Figure` - `.Figure` instance to do the layout in. - renderer : `~matplotlib.backend_bases.RendererBase` subclass. - The renderer to use. - w_pad, h_pad : float, default: 0 - Width and height padding (in fraction of figure). - hspace, wspace : float, default: 0 - Width and height padding as fraction of figure size divided by - number of columns or rows. - """ - ... - -def make_margin_suptitles(layoutgrids, fig, renderer, *, w_pad=..., h_pad=...): # -> None: - ... - -def match_submerged_margins(layoutgrids, fig): # -> None: - """ - Make the margins that are submerged inside an Axes the same size. - - This allows axes that span two columns (or rows) that are offset - from one another to have the same size. - - This gives the proper layout for something like:: - fig = plt.figure(constrained_layout=True) - axs = fig.subplot_mosaic("AAAB\nCCDD") - - Without this routine, the axes D will be wider than C, because the - margin width between the two columns in C has no width by default, - whereas the margins between the two columns of D are set by the - width of the margin between A and B. However, obviously the user would - like C and D to be the same size, so we need to add constraints to these - "submerged" margins. - - This routine makes all the interior margins the same, and the spacing - between the three columns in A and the two column in C are all set to the - margins between the two columns of D. - - See test_constrained_layout::test_constrained_layout12 for an example. - """ - ... - -def get_cb_parent_spans(cbax): # -> tuple[range, range]: - """ - Figure out which subplotspecs this colorbar belongs to. - - Parameters - ---------- - cbax : `~matplotlib.axes.Axes` - Axes for the colorbar. - """ - ... - -def get_pos_and_bbox(ax, renderer): # -> tuple[Unknown, Unknown]: - """ - Get the position and the bbox for the axes. - - Parameters - ---------- - ax : `~matplotlib.axes.Axes` - renderer : `~matplotlib.backend_bases.RendererBase` subclass. - - Returns - ------- - pos : `~matplotlib.transforms.Bbox` - Position in figure coordinates. - bbox : `~matplotlib.transforms.Bbox` - Tight bounding box in figure coordinates. - """ - ... - -def reposition_axes(layoutgrids, fig, renderer, *, w_pad=..., h_pad=..., hspace=..., wspace=...): # -> None: - """ - Reposition all the axes based on the new inner bounding box. - """ - ... - -def reposition_colorbar(layoutgrids, cbax, renderer, *, offset=...): # -> None: - """ - Place the colorbar in its new place. - - Parameters - ---------- - layoutgrids : dict - cbax : `~matplotlib.axes.Axes` - Axes for the colorbar. - renderer : `~matplotlib.backend_bases.RendererBase` subclass. - The renderer to use. - offset : array-like - Offset the colorbar needs to be pushed to in order to - account for multiple colorbars. - """ - ... - -def reset_margins(layoutgrids, fig): # -> None: - """ - Reset the margins in the layoutboxes of *fig*. - - Margins are usually set as a minimum, so if the figure gets smaller - the minimum needs to be zero in order for it to grow again. - """ - ... - -def colorbar_get_pad(layoutgrids, cax): - ... - diff --git a/typings/matplotlib/_docstring.pyi b/typings/matplotlib/_docstring.pyi deleted file mode 100644 index 3cec5c8..0000000 --- a/typings/matplotlib/_docstring.pyi +++ /dev/null @@ -1,44 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, Callable, TypeVar, overload - -_T = TypeVar('_T') -class Substitution: - @overload - def __init__(self, *args: str) -> None: - ... - - @overload - def __init__(self, **kwargs: str) -> None: - ... - - def __call__(self, func: _T) -> _T: - ... - - def update(self, *args, **kwargs): - ... - - - -class _ArtistKwdocLoader(dict[str, str]): - def __missing__(self, key: str) -> str: - ... - - - -class _ArtistPropertiesSubstitution(Substitution): - def __init__(self) -> None: - ... - - def __call__(self, obj: _T) -> _T: - ... - - - -def copy(source: Any) -> Callable[[_T], _T]: - ... - -dedent_interpd: _ArtistPropertiesSubstitution -interpd: _ArtistPropertiesSubstitution diff --git a/typings/matplotlib/_enums.pyi b/typings/matplotlib/_enums.pyi deleted file mode 100644 index 450b4be..0000000 --- a/typings/matplotlib/_enums.pyi +++ /dev/null @@ -1,32 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from enum import Enum - -class _AutoStringNameEnum(Enum): - def __hash__(self) -> int: - ... - - - -class JoinStyle(str, _AutoStringNameEnum): - miter: str - round: str - bevel: str - @staticmethod - def demo() -> None: - ... - - - -class CapStyle(str, _AutoStringNameEnum): - butt: str - projecting: str - round: str - @staticmethod - def demo() -> None: - ... - - - diff --git a/typings/matplotlib/_fontconfig_pattern.pyi b/typings/matplotlib/_fontconfig_pattern.pyi deleted file mode 100644 index 5b42335..0000000 --- a/typings/matplotlib/_fontconfig_pattern.pyi +++ /dev/null @@ -1,31 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from functools import lru_cache - -""" -A module for parsing and generating `fontconfig patterns`_. - -.. _fontconfig patterns: - https://www.freedesktop.org/software/fontconfig/fontconfig-user.html -""" -_family_punc = ... -_family_unescape = ... -_family_escape = ... -_value_punc = ... -_value_unescape = ... -_value_escape = ... -_CONSTANTS = ... -@lru_cache -def parse_fontconfig_pattern(pattern): # -> dict[Unknown, Unknown]: - """ - Parse a fontconfig *pattern* into a dict that can initialize a - `.font_manager.FontProperties` object. - """ - ... - -def generate_fontconfig_pattern(d): # -> str: - """Convert a `.FontProperties` to a fontconfig pattern string.""" - ... - diff --git a/typings/matplotlib/_image.pyi b/typings/matplotlib/_image.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/matplotlib/_image.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/matplotlib/_internal_utils.pyi b/typings/matplotlib/_internal_utils.pyi deleted file mode 100644 index de4d638..0000000 --- a/typings/matplotlib/_internal_utils.pyi +++ /dev/null @@ -1,30 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -Internal debugging utilities, that are not expected to be used in the rest of -the codebase. - -WARNING: Code in this module may change without prior notice! -""" -def graphviz_dump_transform(transform, dest, *, highlight=...): # -> None: - """ - Generate a graphical representation of the transform tree for *transform* - using the :program:`dot` program (which this function depends on). The - output format (png, dot, etc.) is determined from the suffix of *dest*. - - Parameters - ---------- - transform : `~matplotlib.transform.Transform` - The represented transform. - dest : str - Output filename. The extension must be one of the formats supported - by :program:`dot`, e.g. png, svg, dot, ... - (see https://www.graphviz.org/doc/info/output.html). - highlight : list of `~matplotlib.transform.Transform` or None - The transforms in the tree to be drawn in bold. - If *None*, *transform* is highlighted. - """ - ... - diff --git a/typings/matplotlib/_layoutgrid.pyi b/typings/matplotlib/_layoutgrid.pyi deleted file mode 100644 index 8d33e0f..0000000 --- a/typings/matplotlib/_layoutgrid.pyi +++ /dev/null @@ -1,212 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -A layoutgrid is a nrows by ncols set of boxes, meant to be used by -`._constrained_layout`, each box is analogous to a subplotspec element of -a gridspec. - -Each box is defined by left[ncols], right[ncols], bottom[nrows] and top[nrows], -and by two editable margins for each side. The main margin gets its value -set by the size of ticklabels, titles, etc on each axes that is in the figure. -The outer margin is the padding around the axes, and space for any -colorbars. - -The "inner" widths and heights of these boxes are then constrained to be the -same (relative the values of `width_ratios[ncols]` and `height_ratios[nrows]`). - -The layoutgrid is then constrained to be contained within a parent layoutgrid, -its column(s) and row(s) specified when it is created. -""" -_log = ... -class LayoutGrid: - """ - Analogous to a gridspec, and contained in another LayoutGrid. - """ - def __init__(self, parent=..., parent_pos=..., parent_inner=..., name=..., ncols=..., nrows=..., h_pad=..., w_pad=..., width_ratios=..., height_ratios=...) -> None: - ... - - def __repr__(self): # -> str: - ... - - def reset_margins(self): # -> None: - """ - Reset all the margins to zero. Must do this after changing - figure size, for instance, because the relative size of the - axes labels etc changes. - """ - ... - - def add_constraints(self, parent): # -> None: - ... - - def hard_constraints(self): # -> None: - """ - These are the redundant constraints, plus ones that make the - rest of the code easier. - """ - ... - - def add_child(self, child, i=..., j=...): # -> None: - ... - - def parent_constraints(self, parent): # -> None: - ... - - def grid_constraints(self): # -> None: - ... - - def edit_margin(self, todo, size, cell): # -> None: - """ - Change the size of the margin for one cell. - - Parameters - ---------- - todo : string (one of 'left', 'right', 'bottom', 'top') - margin to alter. - - size : float - Size of the margin. If it is larger than the existing minimum it - updates the margin size. Fraction of figure size. - - cell : int - Cell column or row to edit. - """ - ... - - def edit_margin_min(self, todo, size, cell=...): # -> None: - """ - Change the minimum size of the margin for one cell. - - Parameters - ---------- - todo : string (one of 'left', 'right', 'bottom', 'top') - margin to alter. - - size : float - Minimum size of the margin . If it is larger than the - existing minimum it updates the margin size. Fraction of - figure size. - - cell : int - Cell column or row to edit. - """ - ... - - def edit_margins(self, todo, size): # -> None: - """ - Change the size of all the margin of all the cells in the layout grid. - - Parameters - ---------- - todo : string (one of 'left', 'right', 'bottom', 'top') - margin to alter. - - size : float - Size to set the margins. Fraction of figure size. - """ - ... - - def edit_all_margins_min(self, todo, size): # -> None: - """ - Change the minimum size of all the margin of all - the cells in the layout grid. - - Parameters - ---------- - todo : {'left', 'right', 'bottom', 'top'} - The margin to alter. - - size : float - Minimum size of the margin. If it is larger than the - existing minimum it updates the margin size. Fraction of - figure size. - """ - ... - - def edit_outer_margin_mins(self, margin, ss): # -> None: - """ - Edit all four margin minimums in one statement. - - Parameters - ---------- - margin : dict - size of margins in a dict with keys 'left', 'right', 'bottom', - 'top' - - ss : SubplotSpec - defines the subplotspec these margins should be applied to - """ - ... - - def get_margins(self, todo, col): - """Return the margin at this position""" - ... - - def get_outer_bbox(self, rows=..., cols=...): # -> Bbox: - """ - Return the outer bounding box of the subplot specs - given by rows and cols. rows and cols can be spans. - """ - ... - - def get_inner_bbox(self, rows=..., cols=...): # -> Bbox: - """ - Return the inner bounding box of the subplot specs - given by rows and cols. rows and cols can be spans. - """ - ... - - def get_bbox_for_cb(self, rows=..., cols=...): # -> Bbox: - """ - Return the bounding box that includes the - decorations but, *not* the colorbar... - """ - ... - - def get_left_margin_bbox(self, rows=..., cols=...): # -> Bbox: - """ - Return the left margin bounding box of the subplot specs - given by rows and cols. rows and cols can be spans. - """ - ... - - def get_bottom_margin_bbox(self, rows=..., cols=...): # -> Bbox: - """ - Return the left margin bounding box of the subplot specs - given by rows and cols. rows and cols can be spans. - """ - ... - - def get_right_margin_bbox(self, rows=..., cols=...): # -> Bbox: - """ - Return the left margin bounding box of the subplot specs - given by rows and cols. rows and cols can be spans. - """ - ... - - def get_top_margin_bbox(self, rows=..., cols=...): # -> Bbox: - """ - Return the left margin bounding box of the subplot specs - given by rows and cols. rows and cols can be spans. - """ - ... - - def update_variables(self): # -> None: - """ - Update the variables for the solver attached to this layoutgrid. - """ - ... - - - -_layoutboxobjnum = ... -def seq_id(): # -> str: - """Generate a short sequential id for layoutbox objects.""" - ... - -def plot_children(fig, lg=..., level=...): # -> None: - """Simple plotting to show where boxes are.""" - ... - diff --git a/typings/matplotlib/_mathtext.pyi b/typings/matplotlib/_mathtext.pyi deleted file mode 100644 index 5cfe61a..0000000 --- a/typings/matplotlib/_mathtext.pyi +++ /dev/null @@ -1,928 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import abc -import enum -import functools -import typing as T -from typing import NamedTuple -from pyparsing import Literal, ParseResults, ParserElement, __version__ as pyparsing_version -from .font_manager import FontProperties -from .ft2font import FT2Font, FT2Image, Glyph -from packaging.version import parse as parse_version - -""" -Implementation details for :mod:`.mathtext`. -""" -if parse_version(pyparsing_version).major < 3: - ... -else: - ... -if T.TYPE_CHECKING: - ... -_log = ... -def get_unicode_index(symbol: str) -> int: - r""" - Return the integer index (from the Unicode table) of *symbol*. - - Parameters - ---------- - symbol : str - A single (Unicode) character, a TeX command (e.g. r'\pi') or a Type1 - symbol name (e.g. 'phi'). - """ - ... - -class VectorParse(NamedTuple): - """ - The namedtuple type returned by ``MathTextParser("path").parse(...)``. - - Attributes - ---------- - width, height, depth : float - The global metrics. - glyphs : list - The glyphs including their positions. - rect : list - The list of rectangles. - """ - width: float - height: float - depth: float - glyphs: list[tuple[FT2Font, float, int, float, float]] - rects: list[tuple[float, float, float, float]] - ... - - -class RasterParse(NamedTuple): - """ - The namedtuple type returned by ``MathTextParser("agg").parse(...)``. - - Attributes - ---------- - ox, oy : float - The offsets are always zero. - width, height, depth : float - The global metrics. - image : FT2Image - A raster image. - """ - ox: float - oy: float - width: float - height: float - depth: float - image: FT2Image - ... - - -class Output: - r""" - Result of `ship`\ping a box: lists of positioned glyphs and rectangles. - - This class is not exposed to end users, but converted to a `VectorParse` or - a `RasterParse` by `.MathTextParser.parse`. - """ - def __init__(self, box: Box) -> None: - ... - - def to_vector(self) -> VectorParse: - ... - - def to_raster(self, *, antialiased: bool) -> RasterParse: - ... - - - -class FontMetrics(NamedTuple): - """ - Metrics of a font. - - Attributes - ---------- - advance : float - The advance distance (in points) of the glyph. - height : float - The height of the glyph in points. - width : float - The width of the glyph in points. - xmin, xmax, ymin, ymax : float - The ink rectangle of the glyph. - iceberg : float - The distance from the baseline to the top of the glyph. (This corresponds to - TeX's definition of "height".) - slanted : bool - Whether the glyph should be considered as "slanted" (currently used for kerning - sub/superscripts). - """ - advance: float - height: float - width: float - xmin: float - xmax: float - ymin: float - ymax: float - iceberg: float - slanted: bool - ... - - -class FontInfo(NamedTuple): - font: FT2Font - fontsize: float - postscript_name: str - metrics: FontMetrics - num: int - glyph: Glyph - offset: float - ... - - -class Fonts(abc.ABC): - """ - An abstract base class for a system of fonts to use for mathtext. - - The class must be able to take symbol keys and font file names and - return the character metrics. It also delegates to a backend class - to do the actual drawing. - """ - def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None: - """ - Parameters - ---------- - default_font_prop : `~.font_manager.FontProperties` - The default non-math font, or the base font for Unicode (generic) - font rendering. - load_glyph_flags : int - Flags passed to the glyph loader (e.g. ``FT_Load_Glyph`` and - ``FT_Load_Char`` for FreeType-based fonts). - """ - ... - - def get_kern(self, font1: str, fontclass1: str, sym1: str, fontsize1: float, font2: str, fontclass2: str, sym2: str, fontsize2: float, dpi: float) -> float: - """ - Get the kerning distance for font between *sym1* and *sym2*. - - See `~.Fonts.get_metrics` for a detailed description of the parameters. - """ - ... - - def get_metrics(self, font: str, font_class: str, sym: str, fontsize: float, dpi: float) -> FontMetrics: - r""" - Parameters - ---------- - font : str - One of the TeX font names: "tt", "it", "rm", "cal", "sf", "bf", - "default", "regular", "bb", "frak", "scr". "default" and "regular" - are synonyms and use the non-math font. - font_class : str - One of the TeX font names (as for *font*), but **not** "bb", - "frak", or "scr". This is used to combine two font classes. The - only supported combination currently is ``get_metrics("frak", "bf", - ...)``. - sym : str - A symbol in raw TeX form, e.g., "1", "x", or "\sigma". - fontsize : float - Font size in points. - dpi : float - Rendering dots-per-inch. - - Returns - ------- - FontMetrics - """ - ... - - def render_glyph(self, output: Output, ox: float, oy: float, font: str, font_class: str, sym: str, fontsize: float, dpi: float) -> None: - """ - At position (*ox*, *oy*), draw the glyph specified by the remaining - parameters (see `get_metrics` for their detailed description). - """ - ... - - def render_rect_filled(self, output: Output, x1: float, y1: float, x2: float, y2: float) -> None: - """ - Draw a filled rectangle from (*x1*, *y1*) to (*x2*, *y2*). - """ - ... - - def get_xheight(self, font: str, fontsize: float, dpi: float) -> float: - """ - Get the xheight for the given *font* and *fontsize*. - """ - ... - - def get_underline_thickness(self, font: str, fontsize: float, dpi: float) -> float: - """ - Get the line thickness that matches the given font. Used as a - base unit for drawing lines such as in a fraction or radical. - """ - ... - - def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]]: - """ - Override if your font provides multiple sizes of the same - symbol. Should return a list of symbols matching *sym* in - various sizes. The expression renderer will select the most - appropriate size for a given situation from this list. - """ - ... - - - -class TruetypeFonts(Fonts, metaclass=abc.ABCMeta): - """ - A generic base class for all font setups that use Truetype fonts - (through FT2Font). - """ - def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None: - ... - - def get_xheight(self, fontname: str, fontsize: float, dpi: float) -> float: - ... - - def get_underline_thickness(self, font: str, fontsize: float, dpi: float) -> float: - ... - - def get_kern(self, font1: str, fontclass1: str, sym1: str, fontsize1: float, font2: str, fontclass2: str, sym2: str, fontsize2: float, dpi: float) -> float: - ... - - - -class BakomaFonts(TruetypeFonts): - """ - Use the Bakoma TrueType fonts for rendering. - - Symbols are strewn about a number of font files, each of which has - its own proprietary 8-bit encoding. - """ - _fontmap = ... - def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None: - ... - - _slanted_symbols = ... - _size_alternatives = ... - def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]]: - ... - - - -class UnicodeFonts(TruetypeFonts): - """ - An abstract base class for handling Unicode fonts. - - While some reasonably complete Unicode fonts (such as DejaVu) may - work in some situations, the only Unicode font I'm aware of with a - complete set of math symbols is STIX. - - This class will "fallback" on the Bakoma fonts when a required - symbol cannot be found in the font. - """ - _cmr10_substitutions = ... - def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None: - ... - - _slanted_symbols = ... - def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]]: - ... - - - -class DejaVuFonts(UnicodeFonts, metaclass=abc.ABCMeta): - _fontmap: dict[str | int, str] = ... - def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None: - ... - - - -class DejaVuSerifFonts(DejaVuFonts): - """ - A font handling class for the DejaVu Serif fonts - - If a glyph is not found it will fallback to Stix Serif - """ - _fontmap = ... - - -class DejaVuSansFonts(DejaVuFonts): - """ - A font handling class for the DejaVu Sans fonts - - If a glyph is not found it will fallback to Stix Sans - """ - _fontmap = ... - - -class StixFonts(UnicodeFonts): - """ - A font handling class for the STIX fonts. - - In addition to what UnicodeFonts provides, this class: - - - supports "virtual fonts" which are complete alpha numeric - character sets with different font styles at special Unicode - code points, such as "Blackboard". - - - handles sized alternative characters for the STIXSizeX fonts. - """ - _fontmap: dict[str | int, str] = ... - _fallback_font = ... - _sans = ... - def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None: - ... - - @functools.cache - def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]] | list[tuple[int, str]]: - ... - - - -class StixSansFonts(StixFonts): - """ - A font handling class for the STIX fonts (that uses sans-serif - characters by default). - """ - _sans = ... - - -SHRINK_FACTOR = ... -NUM_SIZE_LEVELS = ... -class FontConstantsBase: - """ - A set of constants that controls how certain things, such as sub- - and superscripts are laid out. These are all metrics that can't - be reliably retrieved from the font metrics in the font itself. - """ - script_space: T.ClassVar[float] = ... - subdrop: T.ClassVar[float] = ... - sup1: T.ClassVar[float] = ... - sub1: T.ClassVar[float] = ... - sub2: T.ClassVar[float] = ... - delta: T.ClassVar[float] = ... - delta_slanted: T.ClassVar[float] = ... - delta_integral: T.ClassVar[float] = ... - - -class ComputerModernFontConstants(FontConstantsBase): - script_space = ... - subdrop = ... - sup1 = ... - sub1 = ... - sub2 = ... - delta = ... - delta_slanted = ... - delta_integral = ... - - -class STIXFontConstants(FontConstantsBase): - script_space = ... - sup1 = ... - sub2 = ... - delta = ... - delta_slanted = ... - delta_integral = ... - - -class STIXSansFontConstants(FontConstantsBase): - script_space = ... - sup1 = ... - delta_slanted = ... - delta_integral = ... - - -class DejaVuSerifFontConstants(FontConstantsBase): - ... - - -class DejaVuSansFontConstants(FontConstantsBase): - ... - - -_font_constant_mapping = ... -class Node: - """A node in the TeX box model.""" - def __init__(self) -> None: - ... - - def __repr__(self) -> str: - ... - - def get_kerning(self, next: Node | None) -> float: - ... - - def shrink(self) -> None: - """ - Shrinks one level smaller. There are only three levels of - sizes, after which things will no longer get smaller. - """ - ... - - def render(self, output: Output, x: float, y: float) -> None: - """Render this node.""" - ... - - - -class Box(Node): - """A node with a physical location.""" - def __init__(self, width: float, height: float, depth: float) -> None: - ... - - def shrink(self) -> None: - ... - - def render(self, output: Output, x1: float, y1: float, x2: float, y2: float) -> None: - ... - - - -class Vbox(Box): - """A box with only height (zero width).""" - def __init__(self, height: float, depth: float) -> None: - ... - - - -class Hbox(Box): - """A box with only width (zero height and depth).""" - def __init__(self, width: float) -> None: - ... - - - -class Char(Node): - """ - A single character. - - Unlike TeX, the font information and metrics are stored with each `Char` - to make it easier to lookup the font metrics when needed. Note that TeX - boxes have a width, height, and depth, unlike Type1 and TrueType which use - a full bounding box and an advance in the x-direction. The metrics must - be converted to the TeX model, and the advance (if different from width) - must be converted into a `Kern` node when the `Char` is added to its parent - `Hlist`. - """ - def __init__(self, c: str, state: ParserState) -> None: - ... - - def __repr__(self) -> str: - ... - - def is_slanted(self) -> bool: - ... - - def get_kerning(self, next: Node | None) -> float: - """ - Return the amount of kerning between this and the given character. - - This method is called when characters are strung together into `Hlist` - to create `Kern` nodes. - """ - ... - - def render(self, output: Output, x: float, y: float) -> None: - ... - - def shrink(self) -> None: - ... - - - -class Accent(Char): - """ - The font metrics need to be dealt with differently for accents, - since they are already offset correctly from the baseline in - TrueType fonts. - """ - def shrink(self) -> None: - ... - - def render(self, output: Output, x: float, y: float) -> None: - ... - - - -class List(Box): - """A list of nodes (either horizontal or vertical).""" - def __init__(self, elements: T.Sequence[Node]) -> None: - ... - - def __repr__(self) -> str: - ... - - def shrink(self) -> None: - ... - - - -class Hlist(List): - """A horizontal list of boxes.""" - def __init__(self, elements: T.Sequence[Node], w: float = ..., m: T.Literal['additional', 'exactly'] = ..., do_kern: bool = ...) -> None: - ... - - def kern(self) -> None: - """ - Insert `Kern` nodes between `Char` nodes to set kerning. - - The `Char` nodes themselves determine the amount of kerning they need - (in `~Char.get_kerning`), and this function just creates the correct - linked list. - """ - ... - - def hpack(self, w: float = ..., m: T.Literal['additional', 'exactly'] = ...) -> None: - r""" - Compute the dimensions of the resulting boxes, and adjust the glue if - one of those dimensions is pre-specified. The computed sizes normally - enclose all of the material inside the new box; but some items may - stick out if negative glue is used, if the box is overfull, or if a - ``\vbox`` includes other boxes that have been shifted left. - - Parameters - ---------- - w : float, default: 0 - A width. - m : {'exactly', 'additional'}, default: 'additional' - Whether to produce a box whose width is 'exactly' *w*; or a box - with the natural width of the contents, plus *w* ('additional'). - - Notes - ----- - The defaults produce a box with the natural width of the contents. - """ - ... - - - -class Vlist(List): - """A vertical list of boxes.""" - def __init__(self, elements: T.Sequence[Node], h: float = ..., m: T.Literal['additional', 'exactly'] = ...) -> None: - ... - - def vpack(self, h: float = ..., m: T.Literal['additional', 'exactly'] = ..., l: float = ...) -> None: - """ - Compute the dimensions of the resulting boxes, and to adjust the glue - if one of those dimensions is pre-specified. - - Parameters - ---------- - h : float, default: 0 - A height. - m : {'exactly', 'additional'}, default: 'additional' - Whether to produce a box whose height is 'exactly' *h*; or a box - with the natural height of the contents, plus *h* ('additional'). - l : float, default: np.inf - The maximum height. - - Notes - ----- - The defaults produce a box with the natural height of the contents. - """ - ... - - - -class Rule(Box): - """ - A solid black rectangle. - - It has *width*, *depth*, and *height* fields just as in an `Hlist`. - However, if any of these dimensions is inf, the actual value will be - determined by running the rule up to the boundary of the innermost - enclosing box. This is called a "running dimension". The width is never - running in an `Hlist`; the height and depth are never running in a `Vlist`. - """ - def __init__(self, width: float, height: float, depth: float, state: ParserState) -> None: - ... - - def render(self, output: Output, x: float, y: float, w: float, h: float) -> None: - ... - - - -class Hrule(Rule): - """Convenience class to create a horizontal rule.""" - def __init__(self, state: ParserState, thickness: float | None = ...) -> None: - ... - - - -class Vrule(Rule): - """Convenience class to create a vertical rule.""" - def __init__(self, state: ParserState) -> None: - ... - - - -class _GlueSpec(NamedTuple): - width: float - stretch: float - stretch_order: int - shrink: float - shrink_order: int - ... - - -class Glue(Node): - """ - Most of the information in this object is stored in the underlying - ``_GlueSpec`` class, which is shared between multiple glue objects. - (This is a memory optimization which probably doesn't matter anymore, but - it's easier to stick to what TeX does.) - """ - def __init__(self, glue_type: _GlueSpec | T.Literal["fil", "fill", "filll", "neg_fil", "neg_fill", "neg_filll", "empty", "ss"]) -> None: - ... - - def shrink(self) -> None: - ... - - - -class HCentered(Hlist): - """ - A convenience class to create an `Hlist` whose contents are - centered within its enclosing box. - """ - def __init__(self, elements: list[Node]) -> None: - ... - - - -class VCentered(Vlist): - """ - A convenience class to create a `Vlist` whose contents are - centered within its enclosing box. - """ - def __init__(self, elements: list[Node]) -> None: - ... - - - -class Kern(Node): - """ - A `Kern` node has a width field to specify a (normally - negative) amount of spacing. This spacing correction appears in - horizontal lists between letters like A and V when the font - designer said that it looks better to move them closer together or - further apart. A kern node can also appear in a vertical list, - when its *width* denotes additional spacing in the vertical - direction. - """ - height = ... - depth = ... - def __init__(self, width: float) -> None: - ... - - def __repr__(self) -> str: - ... - - def shrink(self) -> None: - ... - - - -class AutoHeightChar(Hlist): - """ - A character as close to the given height and depth as possible. - - When using a font with multiple height versions of some characters (such as - the BaKoMa fonts), the correct glyph will be selected, otherwise this will - always just return a scaled version of the glyph. - """ - def __init__(self, c: str, height: float, depth: float, state: ParserState, always: bool = ..., factor: float | None = ...) -> None: - ... - - - -class AutoWidthChar(Hlist): - """ - A character as close to the given width as possible. - - When using a font with multiple width versions of some characters (such as - the BaKoMa fonts), the correct glyph will be selected, otherwise this will - always just return a scaled version of the glyph. - """ - def __init__(self, c: str, width: float, state: ParserState, always: bool = ..., char_class: type[Char] = ...) -> None: - ... - - - -def ship(box: Box, xy: tuple[float, float] = ...) -> Output: - """ - Ship out *box* at offset *xy*, converting it to an `Output`. - - Since boxes can be inside of boxes inside of boxes, the main work of `ship` - is done by two mutually recursive routines, `hlist_out` and `vlist_out`, - which traverse the `Hlist` nodes and `Vlist` nodes inside of horizontal - and vertical boxes. The global variables used in TeX to store state as it - processes have become local variables here. - """ - ... - -def Error(msg: str) -> ParserElement: - """Helper class to raise parser errors.""" - ... - -class ParserState: - """ - Parser state. - - States are pushed and popped from a stack as necessary, and the "current" - state is always at the top of the stack. - - Upon entering and leaving a group { } or math/non-math, the stack is pushed - and popped accordingly. - """ - def __init__(self, fontset: Fonts, font: str, font_class: str, fontsize: float, dpi: float) -> None: - ... - - def copy(self) -> ParserState: - ... - - @property - def font(self) -> str: - ... - - @font.setter - def font(self, name: str) -> None: - ... - - def get_current_underline_thickness(self) -> float: - """Return the underline thickness for this state.""" - ... - - - -def cmd(expr: str, args: ParserElement) -> ParserElement: - r""" - Helper to define TeX commands. - - ``cmd("\cmd", args)`` is equivalent to - ``"\cmd" - (args | Error("Expected \cmd{arg}{...}"))`` where the names in - the error message are taken from element names in *args*. If *expr* - already includes arguments (e.g. "\cmd{arg}{...}"), then they are stripped - when constructing the parse element, but kept (and *expr* is used as is) in - the error message. - """ - ... - -class Parser: - """ - A pyparsing-based parser for strings containing math expressions. - - Raw text may also appear outside of pairs of ``$``. - - The grammar is based directly on that in TeX, though it cuts a few corners. - """ - class _MathStyle(enum.Enum): - DISPLAYSTYLE = ... - TEXTSTYLE = ... - SCRIPTSTYLE = ... - SCRIPTSCRIPTSTYLE = ... - - - _binary_operators = ... - _relation_symbols = ... - _arrow_symbols = ... - _spaced_symbols = ... - _punctuation_symbols = ... - _overunder_symbols = ... - _overunder_functions = ... - _dropsub_symbols = ... - _fontnames = ... - _function_names = ... - _ambi_delims = ... - _left_delims = ... - _right_delims = ... - _delims = ... - _small_greek = ... - _latin_alphabets = ... - def __init__(self) -> None: - ... - - def parse(self, s: str, fonts_object: Fonts, fontsize: float, dpi: float) -> Hlist: - """ - Parse expression *s* using the given *fonts_object* for - output, at the given *fontsize* and *dpi*. - - Returns the parse tree of `Node` instances. - """ - ... - - def get_state(self) -> ParserState: - """Get the current `State` of the parser.""" - ... - - def pop_state(self) -> None: - """Pop a `State` off of the stack.""" - ... - - def push_state(self) -> None: - """Push a new `State` onto the stack, copying the current state.""" - ... - - def main(self, toks: ParseResults) -> list[Hlist]: - ... - - def math_string(self, toks: ParseResults) -> ParseResults: - ... - - def math(self, toks: ParseResults) -> T.Any: - ... - - def non_math(self, toks: ParseResults) -> T.Any: - ... - - float_literal = ... - def text(self, toks: ParseResults) -> T.Any: - ... - - _space_widths = ... - def space(self, toks: ParseResults) -> T.Any: - ... - - def customspace(self, toks: ParseResults) -> T.Any: - ... - - def symbol(self, s: str, loc: int, toks: ParseResults | dict[str, str]) -> T.Any: - ... - - def unknown_symbol(self, s: str, loc: int, toks: ParseResults) -> T.Any: - ... - - _accent_map = ... - _wide_accents = ... - def accent(self, toks: ParseResults) -> T.Any: - ... - - def function(self, s: str, loc: int, toks: ParseResults) -> T.Any: - ... - - def operatorname(self, s: str, loc: int, toks: ParseResults) -> T.Any: - ... - - def start_group(self, toks: ParseResults) -> T.Any: - ... - - def group(self, toks: ParseResults) -> T.Any: - ... - - def required_group(self, toks: ParseResults) -> T.Any: - ... - - optional_group = ... - def end_group(self) -> T.Any: - ... - - def unclosed_group(self, s: str, loc: int, toks: ParseResults) -> T.Any: - ... - - def font(self, toks: ParseResults) -> T.Any: - ... - - def is_overunder(self, nucleus: Node) -> bool: - ... - - def is_dropsub(self, nucleus: Node) -> bool: - ... - - def is_slanted(self, nucleus: Node) -> bool: - ... - - def subsuper(self, s: str, loc: int, toks: ParseResults) -> T.Any: - ... - - def style_literal(self, toks: ParseResults) -> T.Any: - ... - - def genfrac(self, toks: ParseResults) -> T.Any: - ... - - def frac(self, toks: ParseResults) -> T.Any: - ... - - def dfrac(self, toks: ParseResults) -> T.Any: - ... - - def binom(self, toks: ParseResults) -> T.Any: - ... - - underset = ... - def sqrt(self, toks: ParseResults) -> T.Any: - ... - - def overline(self, toks: ParseResults) -> T.Any: - ... - - def auto_delim(self, toks: ParseResults) -> T.Any: - ... - - def boldsymbol(self, toks: ParseResults) -> T.Any: - ... - - def substack(self, toks: ParseResults) -> T.Any: - ... - - - diff --git a/typings/matplotlib/_mathtext_data.pyi b/typings/matplotlib/_mathtext_data.pyi deleted file mode 100644 index 0fb65d9..0000000 --- a/typings/matplotlib/_mathtext_data.pyi +++ /dev/null @@ -1,13 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -font data tables for truetype and afm computer modern fonts -""" -latex_to_bakoma = ... -type12uni = ... -uni2type1 = ... -tex2uni = ... -stix_virtual_fonts: dict[str, dict[str, list[tuple[int, int, str, int]]] | list[tuple[int, int, str, int]]] = ... -stix_glyph_fixes = ... diff --git a/typings/matplotlib/_path.pyi b/typings/matplotlib/_path.pyi deleted file mode 100644 index 305de17..0000000 --- a/typings/matplotlib/_path.pyi +++ /dev/null @@ -1,17 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from collections.abc import Sequence -from .transforms import BboxBase - -def affine_transform(points: np.ndarray, trans: np.ndarray) -> np.ndarray: - ... - -def count_bboxes_overlapping_bbox(bbox: BboxBase, bboxes: Sequence[BboxBase]) -> int: - ... - -def update_path_extents(path, trans, rect, minpos, ignore): - ... - diff --git a/typings/matplotlib/_pylab_helpers.pyi b/typings/matplotlib/_pylab_helpers.pyi deleted file mode 100644 index 8f06f6b..0000000 --- a/typings/matplotlib/_pylab_helpers.pyi +++ /dev/null @@ -1,52 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections import OrderedDict -from matplotlib.backend_bases import FigureManagerBase -from matplotlib.figure import Figure - -class Gcf: - figs: OrderedDict[int, FigureManagerBase] - @classmethod - def get_fig_manager(cls, num: int) -> FigureManagerBase | None: - ... - - @classmethod - def destroy(cls, num: int | FigureManagerBase) -> None: - ... - - @classmethod - def destroy_fig(cls, fig: Figure) -> None: - ... - - @classmethod - def destroy_all(cls) -> None: - ... - - @classmethod - def has_fignum(cls, num: int) -> bool: - ... - - @classmethod - def get_all_fig_managers(cls) -> list[FigureManagerBase]: - ... - - @classmethod - def get_num_fig_managers(cls) -> int: - ... - - @classmethod - def get_active(cls) -> FigureManagerBase | None: - ... - - @classmethod - def set_active(cls, manager: FigureManagerBase) -> None: - ... - - @classmethod - def draw_all(cls, force: bool = ...) -> None: - ... - - - diff --git a/typings/matplotlib/_qhull.pyi b/typings/matplotlib/_qhull.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/matplotlib/_qhull.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/matplotlib/_text_helpers.pyi b/typings/matplotlib/_text_helpers.pyi deleted file mode 100644 index a34ed9f..0000000 --- a/typings/matplotlib/_text_helpers.pyi +++ /dev/null @@ -1,33 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -Low-level text helper utilities. -""" -LayoutItem = ... -def warn_on_missing_glyph(codepoint): # -> None: - ... - -def layout(string, font, *, kern_mode=...): # -> Generator[Any, Any, None]: - """ - Render *string* with *font*. For each character in *string*, yield a - (glyph-index, x-position) pair. When such a pair is yielded, the font's - glyph is set to the corresponding character. - - Parameters - ---------- - string : str - The string to be rendered. - font : FT2Font - The font. - kern_mode : int - A FreeType kerning mode. - - Yields - ------ - glyph_index : int - x_position : float - """ - ... - diff --git a/typings/matplotlib/_tight_bbox.pyi b/typings/matplotlib/_tight_bbox.pyi deleted file mode 100644 index 2459f51..0000000 --- a/typings/matplotlib/_tight_bbox.pyi +++ /dev/null @@ -1,27 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -Helper module for the *bbox_inches* parameter in `.Figure.savefig`. -""" -def adjust_bbox(fig, bbox_inches, fixed_dpi=...): # -> () -> None: - """ - Temporarily adjust the figure so that only the specified area - (bbox_inches) is saved. - - It modifies fig.bbox, fig.bbox_inches, - fig.transFigure._boxout, and fig.patch. While the figure size - changes, the scale of the original figure is conserved. A - function which restores the original values are returned. - """ - ... - -def process_figure_for_rasterizing(fig, bbox_inches_restore, fixed_dpi=...): # -> tuple[Unknown, () -> None]: - """ - A function that needs to be called when figure dpi changes during the - drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with - the new dpi. - """ - ... - diff --git a/typings/matplotlib/_tight_layout.pyi b/typings/matplotlib/_tight_layout.pyi deleted file mode 100644 index c676910..0000000 --- a/typings/matplotlib/_tight_layout.pyi +++ /dev/null @@ -1,56 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -Routines to adjust subplot params so that subplots are -nicely fit in the figure. In doing so, only axis labels, tick labels, axes -titles and offsetboxes that are anchored to axes are currently considered. - -Internally, this module assumes that the margins (left margin, etc.) which are -differences between ``Axes.get_tightbbox`` and ``Axes.bbox`` are independent of -Axes position. This may fail if ``Axes.adjustable`` is ``datalim`` as well as -such cases as when left or right margin are affected by xlabel. -""" -def get_subplotspec_list(axes_list, grid_spec=...): # -> list[Unknown]: - """ - Return a list of subplotspec from the given list of axes. - - For an instance of axes that does not support subplotspec, None is inserted - in the list. - - If grid_spec is given, None is inserted for those not from the given - grid_spec. - """ - ... - -def get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer, pad=..., h_pad=..., w_pad=..., rect=...): # -> dict[Unknown, Unknown]: - """ - Return subplot parameters for tight-layouted-figure with specified padding. - - Parameters - ---------- - fig : Figure - axes_list : list of Axes - subplotspec_list : list of `.SubplotSpec` - The subplotspecs of each axes. - renderer : renderer - pad : float - Padding between the figure edge and the edges of subplots, as a - fraction of the font size. - h_pad, w_pad : float - Padding (height/width) between edges of adjacent subplots. Defaults to - *pad*. - rect : tuple (left, bottom, right, top), default: None. - rectangle in normalized figure coordinates - that the whole subplots area (including labels) will fit into. - Defaults to using the entire figure. - - Returns - ------- - subplotspec or None - subplotspec kwargs to be passed to `.Figure.subplots_adjust` or - None if tight_layout could not be accomplished. - """ - ... - diff --git a/typings/matplotlib/_tri.pyi b/typings/matplotlib/_tri.pyi deleted file mode 100644 index 2834139..0000000 --- a/typings/matplotlib/_tri.pyi +++ /dev/null @@ -1,54 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any - -class TrapezoidMapTriFinder: - def __init__(self, *args, **kwargs) -> None: - ... - - def find_many(self, *args, **kwargs) -> Any: - ... - - def get_tree_stats(self, *args, **kwargs) -> Any: - ... - - def initialize(self, *args, **kwargs) -> Any: - ... - - def print_tree(self, *args, **kwargs) -> Any: - ... - - - -class TriContourGenerator: - def __init__(self, *args, **kwargs) -> None: - ... - - def create_contour(self, *args, **kwargs) -> Any: - ... - - def create_filled_contour(self, *args, **kwargs) -> Any: - ... - - - -class Triangulation: - def __init__(self, *args, **kwargs) -> None: - ... - - def calculate_plane_coefficients(self, *args, **kwargs) -> Any: - ... - - def get_edges(self, *args, **kwargs) -> Any: - ... - - def get_neighbors(self, *args, **kwargs) -> Any: - ... - - def set_mask(self, *args, **kwargs) -> Any: - ... - - - diff --git a/typings/matplotlib/_ttconv.pyi b/typings/matplotlib/_ttconv.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/matplotlib/_ttconv.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/matplotlib/_type1font.pyi b/typings/matplotlib/_type1font.pyi deleted file mode 100644 index be39a3b..0000000 --- a/typings/matplotlib/_type1font.pyi +++ /dev/null @@ -1,207 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import functools - -""" -A class representing a Type 1 font. - -This version reads pfa and pfb files and splits them for embedding in -pdf files. It also supports SlantFont and ExtendFont transformations, -similarly to pdfTeX and friends. There is no support yet for subsetting. - -Usage:: - - font = Type1Font(filename) - clear_part, encrypted_part, finale = font.parts - slanted_font = font.transform({'slant': 0.167}) - extended_font = font.transform({'extend': 1.2}) - -Sources: - -* Adobe Technical Note #5040, Supporting Downloadable PostScript - Language Fonts. - -* Adobe Type 1 Font Format, Adobe Systems Incorporated, third printing, - v1.1, 1993. ISBN 0-201-57044-0. -""" -_log = ... -class _Token: - """ - A token in a PostScript stream. - - Attributes - ---------- - pos : int - Position, i.e. offset from the beginning of the data. - raw : str - Raw text of the token. - kind : str - Description of the token (for debugging or testing). - """ - __slots__ = ... - kind = ... - def __init__(self, pos, raw) -> None: - ... - - def __str__(self) -> str: - ... - - def endpos(self): - """Position one past the end of the token""" - ... - - def is_keyword(self, *names): # -> Literal[False]: - """Is this a name token with one of the names?""" - ... - - def is_slash_name(self): # -> Literal[False]: - """Is this a name token that starts with a slash?""" - ... - - def is_delim(self): # -> Literal[False]: - """Is this a delimiter token?""" - ... - - def is_number(self): # -> Literal[False]: - """Is this a number token?""" - ... - - def value(self): # -> Unknown: - ... - - - -class _NameToken(_Token): - kind = ... - def is_slash_name(self): - ... - - def value(self): - ... - - - -class _BooleanToken(_Token): - kind = ... - def value(self): - ... - - - -class _KeywordToken(_Token): - kind = ... - def is_keyword(self, *names): # -> bool: - ... - - - -class _DelimiterToken(_Token): - kind = ... - def is_delim(self): # -> Literal[True]: - ... - - def opposite(self): # -> str: - ... - - - -class _WhitespaceToken(_Token): - kind = ... - - -class _StringToken(_Token): - kind = ... - _escapes_re = ... - _replacements = ... - _ws_re = ... - @functools.lru_cache - def value(self): # -> str | bytes: - ... - - - -class _BinaryToken(_Token): - kind = ... - def value(self): - ... - - - -class _NumberToken(_Token): - kind = ... - def is_number(self): # -> Literal[True]: - ... - - def value(self): # -> int | float: - ... - - - -class _BalancedExpression(_Token): - ... - - -class Type1Font: - """ - A class representing a Type-1 font, for use by backends. - - Attributes - ---------- - parts : tuple - A 3-tuple of the cleartext part, the encrypted part, and the finale of - zeros. - - decrypted : bytes - The decrypted form of ``parts[1]``. - - prop : dict[str, Any] - A dictionary of font properties. Noteworthy keys include: - - - FontName: PostScript name of the font - - Encoding: dict from numeric codes to glyph names - - FontMatrix: bytes object encoding a matrix - - UniqueID: optional font identifier, dropped when modifying the font - - CharStrings: dict from glyph names to byte code - - Subrs: array of byte code subroutines - - OtherSubrs: bytes object encoding some PostScript code - """ - __slots__ = ... - def __init__(self, input) -> None: - """ - Initialize a Type-1 font. - - Parameters - ---------- - input : str or 3-tuple - Either a pfb file name, or a 3-tuple of already-decoded Type-1 - font `~.Type1Font.parts`. - """ - ... - - def transform(self, effects): # -> Type1Font: - """ - Return a new font that is slanted and/or extended. - - Parameters - ---------- - effects : dict - A dict with optional entries: - - - 'slant' : float, default: 0 - Tangent of the angle that the font is to be slanted to the - right. Negative values slant to the left. - - 'extend' : float, default: 1 - Scaling factor for the font width. Values less than 1 condense - the glyphs. - - Returns - ------- - `Type1Font` - """ - ... - - - -_StandardEncoding = ... diff --git a/typings/matplotlib/_version.pyi b/typings/matplotlib/_version.pyi deleted file mode 100644 index be1231e..0000000 --- a/typings/matplotlib/_version.pyi +++ /dev/null @@ -1,17 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Tuple, Union - -TYPE_CHECKING = ... -if TYPE_CHECKING: - VERSION_TUPLE = Tuple[Union[int, str], ...] -else: - ... -version: str -__version__: str -__version_tuple__: VERSION_TUPLE -version_tuple: VERSION_TUPLE -version = ... -version_tuple = ... diff --git a/typings/matplotlib/animation.pyi b/typings/matplotlib/animation.pyi deleted file mode 100644 index b73309a..0000000 --- a/typings/matplotlib/animation.pyi +++ /dev/null @@ -1,251 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import abc -import contextlib -from collections.abc import Callable, Collection, Generator, Iterable, Sequence -from pathlib import Path -from matplotlib.artist import Artist -from matplotlib.backend_bases import TimerBase -from matplotlib.figure import Figure -from typing import Any - -subprocess_creation_flags: int -def adjusted_figsize(w: float, h: float, dpi: float, n: int) -> tuple[float, float]: - ... - -class MovieWriterRegistry: - def __init__(self) -> None: - ... - - def register(self, name: str) -> Callable[[type[AbstractMovieWriter]], type[AbstractMovieWriter]]: - ... - - def is_available(self, name: str) -> bool: - ... - - def __iter__(self) -> Generator[str, None, None]: - ... - - def list(self) -> list[str]: - ... - - def __getitem__(self, name: str) -> type[AbstractMovieWriter]: - ... - - - -writers: MovieWriterRegistry -class AbstractMovieWriter(abc.ABC, metaclass=abc.ABCMeta): - fps: int - metadata: dict[str, str] - codec: str - bitrate: int - def __init__(self, fps: int = ..., metadata: dict[str, str] | None = ..., codec: str | None = ..., bitrate: int | None = ...) -> None: - ... - - outfile: str | Path - fig: Figure - dpi: float - @abc.abstractmethod - def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ...) -> None: - ... - - @property - def frame_size(self) -> tuple[int, int]: - ... - - @abc.abstractmethod - def grab_frame(self, **savefig_kwargs) -> None: - ... - - @abc.abstractmethod - def finish(self) -> None: - ... - - @contextlib.contextmanager - def saving(self, fig: Figure, outfile: str | Path, dpi: float | None, *args, **kwargs) -> Generator[AbstractMovieWriter, None, None]: - ... - - - -class MovieWriter(AbstractMovieWriter): - supported_formats: list[str] - frame_format: str - extra_args: list[str] | None - def __init__(self, fps: int = ..., codec: str | None = ..., bitrate: int | None = ..., extra_args: list[str] | None = ..., metadata: dict[str, str] | None = ...) -> None: - ... - - def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ...) -> None: - ... - - def grab_frame(self, **savefig_kwargs) -> None: - ... - - def finish(self) -> None: - ... - - @classmethod - def bin_path(cls) -> str: - ... - - @classmethod - def isAvailable(cls) -> bool: - ... - - - -class FileMovieWriter(MovieWriter): - fig: Figure - outfile: str | Path - dpi: float - temp_prefix: str - fname_format_str: str - def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ..., frame_prefix: str | Path | None = ...) -> None: - ... - - def __del__(self) -> None: - ... - - @property - def frame_format(self) -> str: - ... - - @frame_format.setter - def frame_format(self, frame_format: str) -> None: - ... - - - -class PillowWriter(AbstractMovieWriter): - @classmethod - def isAvailable(cls) -> bool: - ... - - def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ...) -> None: - ... - - def grab_frame(self, **savefig_kwargs) -> None: - ... - - def finish(self) -> None: - ... - - - -class FFMpegBase: - codec: str - @property - def output_args(self) -> list[str]: - ... - - - -class FFMpegWriter(FFMpegBase, MovieWriter): - ... - - -class FFMpegFileWriter(FFMpegBase, FileMovieWriter): - supported_formats: list[str] - ... - - -class ImageMagickBase: - @classmethod - def bin_path(cls) -> str: - ... - - @classmethod - def isAvailable(cls) -> bool: - ... - - - -class ImageMagickWriter(ImageMagickBase, MovieWriter): - input_names: str - ... - - -class ImageMagickFileWriter(ImageMagickBase, FileMovieWriter): - supported_formats: list[str] - @property - def input_names(self) -> str: - ... - - - -class HTMLWriter(FileMovieWriter): - supported_formats: list[str] - @classmethod - def isAvailable(cls) -> bool: - ... - - embed_frames: bool - default_mode: str - def __init__(self, fps: int = ..., codec: str | None = ..., bitrate: int | None = ..., extra_args: list[str] | None = ..., metadata: dict[str, str] | None = ..., embed_frames: bool = ..., default_mode: str = ..., embed_limit: float | None = ...) -> None: - ... - - def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ..., frame_dir: str | Path | None = ...) -> None: - ... - - def grab_frame(self, **savefig_kwargs): - ... - - def finish(self) -> None: - ... - - - -class Animation: - frame_seq: Iterable[Artist] - event_source: Any - def __init__(self, fig: Figure, event_source: Any | None = ..., blit: bool = ...) -> None: - ... - - def __del__(self) -> None: - ... - - def save(self, filename: str | Path, writer: AbstractMovieWriter | str | None = ..., fps: int | None = ..., dpi: float | None = ..., codec: str | None = ..., bitrate: int | None = ..., extra_args: list[str] | None = ..., metadata: dict[str, str] | None = ..., extra_anim: list[Animation] | None = ..., savefig_kwargs: dict[str, Any] | None = ..., *, progress_callback: Callable[[int, int], Any] | None = ...) -> None: - ... - - def new_frame_seq(self) -> Iterable[Artist]: - ... - - def new_saved_frame_seq(self) -> Iterable[Artist]: - ... - - def to_html5_video(self, embed_limit: float | None = ...) -> str: - ... - - def to_jshtml(self, fps: int | None = ..., embed_frames: bool = ..., default_mode: str | None = ...) -> str: - ... - - def pause(self) -> None: - ... - - def resume(self) -> None: - ... - - - -class TimedAnimation(Animation): - repeat: bool - def __init__(self, fig: Figure, interval: int = ..., repeat_delay: int = ..., repeat: bool = ..., event_source: TimerBase | None = ..., *args, **kwargs) -> None: - ... - - - -class ArtistAnimation(TimedAnimation): - def __init__(self, fig: Figure, artists: Sequence[Collection[Artist]], *args, **kwargs) -> None: - ... - - - -class FuncAnimation(TimedAnimation): - save_count: int - def __init__(self, fig: Figure, func: Callable[..., Iterable[Artist]], frames: Iterable[Artist] | int | Callable[[], Generator] | None = ..., init_func: Callable[[], Iterable[Artist]] | None = ..., fargs: tuple[Any, ...] | None = ..., save_count: int | None = ..., *, cache_frame_data: bool = ..., **kwargs) -> None: - ... - - - diff --git a/typings/matplotlib/artist.pyi b/typings/matplotlib/artist.pyi deleted file mode 100644 index 114d5e4..0000000 --- a/typings/matplotlib/artist.pyi +++ /dev/null @@ -1,320 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from .axes._base import _AxesBase -from .backend_bases import MouseEvent, RendererBase -from .figure import Figure, SubFigure -from .path import Path -from .patches import Patch -from .patheffects import AbstractPathEffect -from .transforms import Bbox, BboxBase, Transform, TransformedPatchPath, TransformedPath -from collections.abc import Callable, Iterable -from typing import Any, NamedTuple, TextIO, overload -from numpy.typing import ArrayLike - -def allow_rasterization(draw): - ... - -class _XYPair(NamedTuple): - x: ArrayLike - y: ArrayLike - ... - - -class _Unset: - ... - - -class Artist: - zorder: float - stale_callback: Callable[[Artist, bool], None] | None - figure: Figure | SubFigure | None - clipbox: BboxBase | None - def __init__(self) -> None: - ... - - def remove(self) -> None: - ... - - def have_units(self) -> bool: - ... - - def convert_xunits(self, x): - ... - - def convert_yunits(self, y): - ... - - @property - def axes(self) -> _AxesBase | None: - ... - - @axes.setter - def axes(self, new_axes: _AxesBase | None) -> None: - ... - - @property - def stale(self) -> bool: - ... - - @stale.setter - def stale(self, val: bool) -> None: - ... - - def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - def get_tightbbox(self, renderer: RendererBase | None = ...) -> Bbox | None: - ... - - def add_callback(self, func: Callable[[Artist], Any]) -> int: - ... - - def remove_callback(self, oid: int) -> None: - ... - - def pchanged(self) -> None: - ... - - def is_transform_set(self) -> bool: - ... - - def set_transform(self, t: Transform | None) -> None: - ... - - def get_transform(self) -> Transform: - ... - - def get_children(self) -> list[Artist]: - ... - - def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict[Any, Any]]: - ... - - def pickable(self) -> bool: - ... - - def pick(self, mouseevent: MouseEvent) -> None: - ... - - def set_picker(self, picker: None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict[Any, Any]]]) -> None: - ... - - def get_picker(self) -> None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict[Any, Any]]]: - ... - - def get_url(self) -> str | None: - ... - - def set_url(self, url: str | None) -> None: - ... - - def get_gid(self) -> str | None: - ... - - def set_gid(self, gid: str | None) -> None: - ... - - def get_snap(self) -> bool | None: - ... - - def set_snap(self, snap: bool | None) -> None: - ... - - def get_sketch_params(self) -> tuple[float, float, float] | None: - ... - - def set_sketch_params(self, scale: float | None = ..., length: float | None = ..., randomness: float | None = ...) -> None: - ... - - def set_path_effects(self, path_effects: list[AbstractPathEffect]) -> None: - ... - - def get_path_effects(self) -> list[AbstractPathEffect]: - ... - - def get_figure(self) -> Figure | None: - ... - - def set_figure(self, fig: Figure) -> None: - ... - - def set_clip_box(self, clipbox: BboxBase | None) -> None: - ... - - def set_clip_path(self, path: Patch | Path | TransformedPath | TransformedPatchPath | None, transform: Transform | None = ...) -> None: - ... - - def get_alpha(self) -> float | None: - ... - - def get_visible(self) -> bool: - ... - - def get_animated(self) -> bool: - ... - - def get_in_layout(self) -> bool: - ... - - def get_clip_on(self) -> bool: - ... - - def get_clip_box(self) -> Bbox | None: - ... - - def get_clip_path(self) -> Patch | Path | TransformedPath | TransformedPatchPath | None: - ... - - def get_transformed_clip_path_and_affine(self) -> tuple[None, None] | tuple[Path, Transform]: - ... - - def set_clip_on(self, b: bool) -> None: - ... - - def get_rasterized(self) -> bool: - ... - - def set_rasterized(self, rasterized: bool) -> None: - ... - - def get_agg_filter(self) -> Callable[[ArrayLike, float], tuple[np.ndarray, float, float]] | None: - ... - - def set_agg_filter(self, filter_func: Callable[[ArrayLike, float], tuple[np.ndarray, float, float]] | None) -> None: - ... - - def draw(self, renderer: RendererBase) -> None: - ... - - def set_alpha(self, alpha: float | None) -> None: - ... - - def set_visible(self, b: bool) -> None: - ... - - def set_animated(self, b: bool) -> None: - ... - - def set_in_layout(self, in_layout: bool) -> None: - ... - - def get_label(self) -> object: - ... - - def set_label(self, s: object) -> None: - ... - - def get_zorder(self) -> float: - ... - - def set_zorder(self, level: float) -> None: - ... - - @property - def sticky_edges(self) -> _XYPair: - ... - - def update_from(self, other: Artist) -> None: - ... - - def properties(self) -> dict[str, Any]: - ... - - def update(self, props: dict[str, Any]) -> list[Any]: - ... - - def set(self, **kwargs: Any) -> list[Any]: - ... - - def findobj(self, match: None | Callable[[Artist], bool] | type[Artist] = ..., include_self: bool = ...) -> list[Artist]: - ... - - def get_cursor_data(self, event: MouseEvent) -> Any: - ... - - def format_cursor_data(self, data: Any) -> str: - ... - - def get_mouseover(self) -> bool: - ... - - def set_mouseover(self, mouseover: bool) -> None: - ... - - @property - def mouseover(self) -> bool: - ... - - @mouseover.setter - def mouseover(self, mouseover: bool) -> None: - ... - - - -class ArtistInspector: - oorig: Artist | type[Artist] - o: type[Artist] - aliasd: dict[str, set[str]] - def __init__(self, o: Artist | type[Artist] | Iterable[Artist | type[Artist]]) -> None: - ... - - def get_aliases(self) -> dict[str, set[str]]: - ... - - def get_valid_values(self, attr: str) -> str | None: - ... - - def get_setters(self) -> list[str]: - ... - - @staticmethod - def number_of_parameters(func: Callable) -> int: - ... - - @staticmethod - def is_alias(method: Callable) -> bool: - ... - - def aliased_name(self, s: str) -> str: - ... - - def aliased_name_rest(self, s: str, target: str) -> str: - ... - - @overload - def pprint_setters(self, prop: None = ..., leadingspace: int = ...) -> list[str]: - ... - - @overload - def pprint_setters(self, prop: str, leadingspace: int = ...) -> str: - ... - - @overload - def pprint_setters_rest(self, prop: None = ..., leadingspace: int = ...) -> list[str]: - ... - - @overload - def pprint_setters_rest(self, prop: str, leadingspace: int = ...) -> str: - ... - - def properties(self) -> dict[str, Any]: - ... - - def pprint_getters(self) -> list[str]: - ... - - - -def getp(obj: Artist, property: str | None = ...) -> Any: - ... - -get = ... -def setp(obj: Artist, *args, file: TextIO | None = ..., **kwargs) -> list[Any] | None: - ... - -def kwdoc(artist: Artist | type[Artist] | Iterable[Artist | type[Artist]]) -> str: - ... - diff --git a/typings/matplotlib/axes/__init__.pyi b/typings/matplotlib/axes/__init__.pyi deleted file mode 100644 index 51bf2c6..0000000 --- a/typings/matplotlib/axes/__init__.pyi +++ /dev/null @@ -1,22 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import TypeVar -from ._axes import * -from ._axes import Axes as Subplot - -_T = TypeVar("_T") -class _SubplotBaseMeta(type): - def __instancecheck__(self, obj) -> bool: - ... - - - -class SubplotBase(metaclass=_SubplotBaseMeta): - ... - - -def subplot_class_factory(cls: type[_T]) -> type[_T]: - ... - diff --git a/typings/matplotlib/axes/_axes.pyi b/typings/matplotlib/axes/_axes.pyi deleted file mode 100644 index 17c4bff..0000000 --- a/typings/matplotlib/axes/_axes.pyi +++ /dev/null @@ -1,258 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import datetime -import PIL.Image -import numpy as np -from matplotlib.axes._base import _AxesBase -from matplotlib.axes._secondary_axes import SecondaryAxis -from matplotlib.artist import Artist -from matplotlib.backend_bases import RendererBase -from matplotlib.collections import BrokenBarHCollection, Collection, EventCollection, LineCollection, PathCollection, PolyCollection, QuadMesh -from matplotlib.colors import Colormap, Normalize -from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer -from matplotlib.contour import ContourSet, QuadContourSet -from matplotlib.image import AxesImage, PcolorImage -from matplotlib.legend import Legend -from matplotlib.legend_handler import HandlerBase -from matplotlib.lines import Line2D -from matplotlib.mlab import GaussianKDE -from matplotlib.patches import FancyArrow, Polygon, Rectangle, StepPatch, Wedge -from matplotlib.quiver import Barbs, Quiver, QuiverKey -from matplotlib.text import Annotation, Text -from matplotlib.transforms import Bbox, Transform -from collections.abc import Callable, Sequence -from typing import Any, Literal, overload -from numpy.typing import ArrayLike -from matplotlib.typing import ColorType, LineStyleType, MarkerType - -class Axes(_AxesBase): - def get_title(self, loc: Literal["left", "center", "right"] = ...) -> str: - ... - - def set_title(self, label: str, fontdict: dict[str, Any] | None = ..., loc: Literal["left", "center", "right"] | None = ..., pad: float | None = ..., *, y: float | None = ..., **kwargs) -> Text: - ... - - def get_legend_handles_labels(self, legend_handler_map: dict[type, HandlerBase] | None = ...) -> tuple[list[Artist], list[Any]]: - ... - - legend_: Legend | None - @overload - def legend(self) -> Legend: - ... - - @overload - def legend(self, handles: Sequence[Artist | tuple[Artist, ...]], labels: Sequence[str], **kwargs) -> Legend: - ... - - @overload - def legend(self, *, handles: Sequence[Artist | tuple[Artist, ...]], **kwargs) -> Legend: - ... - - @overload - def legend(self, labels: Sequence[str], **kwargs) -> Legend: - ... - - @overload - def legend(self, **kwargs) -> Legend: - ... - - def inset_axes(self, bounds: tuple[float, float, float, float], *, transform: Transform | None = ..., zorder: float = ..., **kwargs) -> Axes: - ... - - def indicate_inset(self, bounds: tuple[float, float, float, float], inset_ax: Axes | None = ..., *, transform: Transform | None = ..., facecolor: ColorType = ..., edgecolor: ColorType = ..., alpha: float = ..., zorder: float = ..., **kwargs) -> Rectangle: - ... - - def indicate_inset_zoom(self, inset_ax: Axes, **kwargs) -> Rectangle: - ... - - def secondary_xaxis(self, location: Literal["top", "bottom"] | float, *, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform | None = ..., **kwargs) -> SecondaryAxis: - ... - - def secondary_yaxis(self, location: Literal["left", "right"] | float, *, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform | None = ..., **kwargs) -> SecondaryAxis: - ... - - def text(self, x: float, y: float, s: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text: - ... - - def annotate(self, text: str, xy: tuple[float, float], xytext: tuple[float, float] | None = ..., xycoords: str | Artist | Transform | Callable[[RendererBase], Bbox | Transform] | tuple[float, float] = ..., textcoords: str | Artist | Transform | Callable[[RendererBase], Bbox | Transform] | tuple[float, float] | None = ..., arrowprops: dict[str, Any] | None = ..., annotation_clip: bool | None = ..., **kwargs) -> Annotation: - ... - - def axhline(self, y: float = ..., xmin: float = ..., xmax: float = ..., **kwargs) -> Line2D: - ... - - def axvline(self, x: float = ..., ymin: float = ..., ymax: float = ..., **kwargs) -> Line2D: - ... - - def axline(self, xy1: tuple[float, float], xy2: tuple[float, float] | None = ..., *, slope: float | None = ..., **kwargs) -> Line2D: - ... - - def axhspan(self, ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs) -> Polygon: - ... - - def axvspan(self, xmin: float, xmax: float, ymin: float = ..., ymax: float = ..., **kwargs) -> Polygon: - ... - - def hlines(self, y: float | ArrayLike, xmin: float | ArrayLike, xmax: float | ArrayLike, colors: ColorType | Sequence[ColorType] | None = ..., linestyles: LineStyleType = ..., label: str = ..., *, data=..., **kwargs) -> LineCollection: - ... - - def vlines(self, x: float | ArrayLike, ymin: float | ArrayLike, ymax: float | ArrayLike, colors: ColorType | Sequence[ColorType] | None = ..., linestyles: LineStyleType = ..., label: str = ..., *, data=..., **kwargs) -> LineCollection: - ... - - def eventplot(self, positions: ArrayLike | Sequence[ArrayLike], orientation: Literal["horizontal", "vertical"] = ..., lineoffsets: float | Sequence[float] = ..., linelengths: float | Sequence[float] = ..., linewidths: float | Sequence[float] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., alpha: float | Sequence[float] | None = ..., linestyles: LineStyleType | Sequence[LineStyleType] = ..., *, data=..., **kwargs) -> EventCollection: - ... - - def plot(self, *args: float | ArrayLike | str, scalex: bool = ..., scaley: bool = ..., data=..., **kwargs) -> list[Line2D]: - ... - - def plot_date(self, x: ArrayLike, y: ArrayLike, fmt: str = ..., tz: str | datetime.tzinfo | None = ..., xdate: bool = ..., ydate: bool = ..., *, data=..., **kwargs) -> list[Line2D]: - ... - - def loglog(self, *args, **kwargs) -> list[Line2D]: - ... - - def semilogx(self, *args, **kwargs) -> list[Line2D]: - ... - - def semilogy(self, *args, **kwargs) -> list[Line2D]: - ... - - def acorr(self, x: ArrayLike, *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: - ... - - def xcorr(self, x: ArrayLike, y: ArrayLike, normed: bool = ..., detrend: Callable[[ArrayLike], ArrayLike] = ..., usevlines: bool = ..., maxlags: int = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: - ... - - def step(self, x: ArrayLike, y: ArrayLike, *args, where: Literal["pre", "post", "mid"] = ..., data=..., **kwargs) -> list[Line2D]: - ... - - def bar(self, x: float | ArrayLike, height: float | ArrayLike, width: float | ArrayLike = ..., bottom: float | ArrayLike | None = ..., *, align: Literal["center", "edge"] = ..., data=..., **kwargs) -> BarContainer: - ... - - def barh(self, y: float | ArrayLike, width: float | ArrayLike, height: float | ArrayLike = ..., left: float | ArrayLike | None = ..., *, align: Literal["center", "edge"] = ..., data=..., **kwargs) -> BarContainer: - ... - - def bar_label(self, container: BarContainer, labels: ArrayLike | None = ..., *, fmt: str | Callable[[float], str] = ..., label_type: Literal["center", "edge"] = ..., padding: float = ..., **kwargs) -> list[Annotation]: - ... - - def broken_barh(self, xranges: Sequence[tuple[float, float]], yrange: tuple[float, float], *, data=..., **kwargs) -> BrokenBarHCollection: - ... - - def stem(self, *args: ArrayLike | str, linefmt: str | None = ..., markerfmt: str | None = ..., basefmt: str | None = ..., bottom: float = ..., label: str | None = ..., orientation: Literal["vertical", "horizontal"] = ..., data=...) -> StemContainer: - ... - - def pie(self, x: ArrayLike, explode: ArrayLike | None = ..., labels: Sequence[str] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., autopct: str | Callable[[float], str] | None = ..., pctdistance: float = ..., shadow: bool = ..., labeldistance: float | None = ..., startangle: float = ..., radius: float = ..., counterclock: bool = ..., wedgeprops: dict[str, Any] | None = ..., textprops: dict[str, Any] | None = ..., center: tuple[float, float] = ..., frame: bool = ..., rotatelabels: bool = ..., *, normalize: bool = ..., hatch: str | Sequence[str] | None = ..., data=...) -> tuple[list[Wedge], list[Text]] | tuple[list[Wedge], list[Text], list[Text]]: - ... - - def errorbar(self, x: float | ArrayLike, y: float | ArrayLike, yerr: float | ArrayLike | None = ..., xerr: float | ArrayLike | None = ..., fmt: str = ..., ecolor: ColorType | None = ..., elinewidth: float | None = ..., capsize: float | None = ..., barsabove: bool = ..., lolims: bool | ArrayLike = ..., uplims: bool | ArrayLike = ..., xlolims: bool | ArrayLike = ..., xuplims: bool | ArrayLike = ..., errorevery: int | tuple[int, int] = ..., capthick: float | None = ..., *, data=..., **kwargs) -> ErrorbarContainer: - ... - - def boxplot(self, x: ArrayLike | Sequence[ArrayLike], notch: bool | None = ..., sym: str | None = ..., vert: bool | None = ..., whis: float | tuple[float, float] | None = ..., positions: ArrayLike | None = ..., widths: float | ArrayLike | None = ..., patch_artist: bool | None = ..., bootstrap: int | None = ..., usermedians: ArrayLike | None = ..., conf_intervals: ArrayLike | None = ..., meanline: bool | None = ..., showmeans: bool | None = ..., showcaps: bool | None = ..., showbox: bool | None = ..., showfliers: bool | None = ..., boxprops: dict[str, Any] | None = ..., labels: Sequence[str] | None = ..., flierprops: dict[str, Any] | None = ..., medianprops: dict[str, Any] | None = ..., meanprops: dict[str, Any] | None = ..., capprops: dict[str, Any] | None = ..., whiskerprops: dict[str, Any] | None = ..., manage_ticks: bool = ..., autorange: bool = ..., zorder: float | None = ..., capwidths: float | ArrayLike | None = ..., *, data=...) -> dict[str, Any]: - ... - - def bxp(self, bxpstats: Sequence[dict[str, Any]], positions: ArrayLike | None = ..., widths: float | ArrayLike | None = ..., vert: bool = ..., patch_artist: bool = ..., shownotches: bool = ..., showmeans: bool = ..., showcaps: bool = ..., showbox: bool = ..., showfliers: bool = ..., boxprops: dict[str, Any] | None = ..., whiskerprops: dict[str, Any] | None = ..., flierprops: dict[str, Any] | None = ..., medianprops: dict[str, Any] | None = ..., capprops: dict[str, Any] | None = ..., meanprops: dict[str, Any] | None = ..., meanline: bool = ..., manage_ticks: bool = ..., zorder: float | None = ..., capwidths: float | ArrayLike | None = ...) -> dict[str, Any]: - ... - - def scatter(self, x: float | ArrayLike, y: float | ArrayLike, s: float | ArrayLike | None = ..., c: Sequence[ColorType] | ColorType | None = ..., marker: MarkerType | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., alpha: float | None = ..., linewidths: float | Sequence[float] | None = ..., *, edgecolors: Literal["face", "none"] | ColorType | Sequence[ColorType] | None = ..., plotnonfinite: bool = ..., data=..., **kwargs) -> PathCollection: - ... - - def hexbin(self, x: ArrayLike, y: ArrayLike, C: ArrayLike | None = ..., gridsize: int | tuple[int, int] = ..., bins: Literal["log"] | int | Sequence[float] | None = ..., xscale: Literal["linear", "log"] = ..., yscale: Literal["linear", "log"] = ..., extent: tuple[float, float, float, float] | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., alpha: float | None = ..., linewidths: float | None = ..., edgecolors: Literal["face", "none"] | ColorType = ..., reduce_C_function: Callable[[np.ndarray | list[float]], float] = ..., mincnt: int | None = ..., marginals: bool = ..., *, data=..., **kwargs) -> PolyCollection: - ... - - def arrow(self, x: float, y: float, dx: float, dy: float, **kwargs) -> FancyArrow: - ... - - def quiverkey(self, Q: Quiver, X: float, Y: float, U: float, label: str, **kwargs) -> QuiverKey: - ... - - def quiver(self, *args, data=..., **kwargs) -> Quiver: - ... - - def barbs(self, *args, data=..., **kwargs) -> Barbs: - ... - - def fill(self, *args, data=..., **kwargs) -> list[Polygon]: - ... - - def fill_between(self, x: ArrayLike, y1: ArrayLike | float, y2: ArrayLike | float = ..., where: Sequence[bool] | None = ..., interpolate: bool = ..., step: Literal["pre", "post", "mid"] | None = ..., *, data=..., **kwargs) -> PolyCollection: - ... - - def fill_betweenx(self, y: ArrayLike, x1: ArrayLike | float, x2: ArrayLike | float = ..., where: Sequence[bool] | None = ..., step: Literal["pre", "post", "mid"] | None = ..., interpolate: bool = ..., *, data=..., **kwargs) -> PolyCollection: - ... - - def imshow(self, X: ArrayLike | PIL.Image.Image, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., *, aspect: Literal["equal", "auto"] | float | None = ..., interpolation: str | None = ..., alpha: float | ArrayLike | None = ..., vmin: float | None = ..., vmax: float | None = ..., origin: Literal["upper", "lower"] | None = ..., extent: tuple[float, float, float, float] | None = ..., interpolation_stage: Literal["data", "rgba"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool | None = ..., url: str | None = ..., data=..., **kwargs) -> AxesImage: - ... - - def pcolor(self, *args: ArrayLike, shading: Literal["flat", "nearest", "auto"] | None = ..., alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., data=..., **kwargs) -> Collection: - ... - - def pcolormesh(self, *args: ArrayLike, alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., shading: Literal["flat", "nearest", "gouraud", "auto"] | None = ..., antialiased: bool = ..., data=..., **kwargs) -> QuadMesh: - ... - - def pcolorfast(self, *args: ArrayLike | tuple[float, float], alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., data=..., **kwargs) -> AxesImage | PcolorImage | QuadMesh: - ... - - def contour(self, *args, data=..., **kwargs) -> QuadContourSet: - ... - - def contourf(self, *args, data=..., **kwargs) -> QuadContourSet: - ... - - def clabel(self, CS: ContourSet, levels: ArrayLike | None = ..., **kwargs) -> list[Text]: - ... - - def hist(self, x: ArrayLike | Sequence[ArrayLike], bins: int | Sequence[float] | str | None = ..., range: tuple[float, float] | None = ..., density: bool = ..., weights: ArrayLike | None = ..., cumulative: bool | float = ..., bottom: ArrayLike | float | None = ..., histtype: Literal["bar", "barstacked", "step", "stepfilled"] = ..., align: Literal["left", "mid", "right"] = ..., orientation: Literal["vertical", "horizontal"] = ..., rwidth: float | None = ..., log: bool = ..., color: ColorType | Sequence[ColorType] | None = ..., label: str | Sequence[str] | None = ..., stacked: bool = ..., *, data=..., **kwargs) -> tuple[np.ndarray | list[np.ndarray], np.ndarray, BarContainer | Polygon | list[BarContainer | Polygon],]: - ... - - def stairs(self, values: ArrayLike, edges: ArrayLike | None = ..., *, orientation: Literal["vertical", "horizontal"] = ..., baseline: float | ArrayLike | None = ..., fill: bool = ..., data=..., **kwargs) -> StepPatch: - ... - - def hist2d(self, x: ArrayLike, y: ArrayLike, bins: None | int | tuple[int, int] | ArrayLike | tuple[ArrayLike, ArrayLike] = ..., range: ArrayLike | None = ..., density: bool = ..., weights: ArrayLike | None = ..., cmin: float | None = ..., cmax: float | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray, QuadMesh]: - ... - - def ecdf(self, x: ArrayLike, weights: ArrayLike | None = ..., *, complementary: bool = ..., orientation: Literal["vertical", "horizonatal"] = ..., compress: bool = ..., data=..., **kwargs) -> Line2D: - ... - - def psd(self, x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., return_line: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: - ... - - def csd(self, x: ArrayLike, y: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., return_line: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: - ... - - def magnitude_spectrum(self, x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale: Literal["default", "linear", "dB"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]: - ... - - def angle_spectrum(self, x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]: - ... - - def phase_spectrum(self, x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]: - ... - - def cohere(self, x: ArrayLike, y: ArrayLike, NFFT: int = ..., Fs: float = ..., Fc: int = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike = ..., noverlap: int = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] = ..., scale_by_freq: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray]: - ... - - def specgram(self, x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., cmap: str | Colormap | None = ..., xextent: tuple[float, float] | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., mode: Literal["default", "psd", "magnitude", "angle", "phase"] | None = ..., scale: Literal["default", "linear", "dB"] | None = ..., vmin: float | None = ..., vmax: float | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray, AxesImage]: - ... - - def spy(self, Z: ArrayLike, precision: float | Literal["present"] = ..., marker: str | None = ..., markersize: float | None = ..., aspect: Literal["equal", "auto"] | float | None = ..., origin: Literal["upper", "lower"] = ..., **kwargs) -> AxesImage: - ... - - def matshow(self, Z: ArrayLike, **kwargs) -> AxesImage: - ... - - def violinplot(self, dataset: ArrayLike | Sequence[ArrayLike], positions: ArrayLike | None = ..., vert: bool = ..., widths: float | ArrayLike = ..., showmeans: bool = ..., showextrema: bool = ..., showmedians: bool = ..., quantiles: Sequence[float | Sequence[float]] | None = ..., points: int = ..., bw_method: Literal["scott", "silverman"] | float | Callable[[GaussianKDE], float] | None = ..., *, data=...) -> dict[str, Collection]: - ... - - def violin(self, vpstats: Sequence[dict[str, Any]], positions: ArrayLike | None = ..., vert: bool = ..., widths: float | ArrayLike = ..., showmeans: bool = ..., showextrema: bool = ..., showmedians: bool = ...) -> dict[str, Collection]: - ... - - table = ... - stackplot = ... - streamplot = ... - tricontour = ... - tricontourf = ... - tripcolor = ... - triplot = ... - - diff --git a/typings/matplotlib/axes/_base.pyi b/typings/matplotlib/axes/_base.pyi deleted file mode 100644 index a03c8b1..0000000 --- a/typings/matplotlib/axes/_base.pyi +++ /dev/null @@ -1,570 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib.artist as martist -import datetime -import numpy as np -from collections.abc import Callable, Iterable, Iterator, Sequence -from matplotlib import cbook -from matplotlib.artist import Artist -from matplotlib.axis import Tick, XAxis, YAxis -from matplotlib.backend_bases import MouseButton, MouseEvent, RendererBase -from matplotlib.container import Container -from matplotlib.collections import Collection -from matplotlib.legend import Legend -from matplotlib.lines import Line2D -from matplotlib.gridspec import GridSpec, SubplotSpec -from matplotlib.figure import Figure -from matplotlib.image import AxesImage -from matplotlib.patches import Patch -from matplotlib.scale import ScaleBase -from matplotlib.spines import Spines -from matplotlib.table import Table -from matplotlib.text import Text -from matplotlib.transforms import Bbox, Transform -from cycler import Cycler -from numpy.typing import ArrayLike -from typing import Any, Literal, overload -from matplotlib.typing import ColorType - -class _axis_method_wrapper: - attr_name: str - method_name: str - __doc__: str - def __init__(self, attr_name: str, method_name: str, *, doc_sub: dict[str, str] | None = ...) -> None: - ... - - def __set_name__(self, owner: Any, name: str) -> None: - ... - - - -class _AxesBase(martist.Artist): - name: str - patch: Patch - spines: Spines - fmt_xdata: Callable[[float], str] | None - fmt_ydata: Callable[[float], str] | None - xaxis: XAxis - yaxis: YAxis - bbox: Bbox - dataLim: Bbox - transAxes: Transform - transScale: Transform - transLimits: Transform - transData: Transform - ignore_existing_data_limits: bool - axison: bool - _projection_init: Any - def __init__(self, fig: Figure, *args: tuple[float, float, float, float] | Bbox | int, facecolor: ColorType | None = ..., frameon: bool = ..., sharex: _AxesBase | None = ..., sharey: _AxesBase | None = ..., label: Any = ..., xscale: str | ScaleBase | None = ..., yscale: str | ScaleBase | None = ..., box_aspect: float | None = ..., **kwargs) -> None: - ... - - def get_subplotspec(self) -> SubplotSpec | None: - ... - - def set_subplotspec(self, subplotspec: SubplotSpec) -> None: - ... - - def get_gridspec(self) -> GridSpec | None: - ... - - def set_figure(self, fig: Figure) -> None: - ... - - @property - def viewLim(self) -> Bbox: - ... - - def get_xaxis_transform(self, which: Literal["grid", "tick1", "tick2"] = ...) -> Transform: - ... - - def get_xaxis_text1_transform(self, pad_points: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_xaxis_text2_transform(self, pad_points) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_yaxis_transform(self, which: Literal["grid", "tick1", "tick2"] = ...) -> Transform: - ... - - def get_yaxis_text1_transform(self, pad_points) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_yaxis_text2_transform(self, pad_points) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_position(self, original: bool = ...) -> Bbox: - ... - - def set_position(self, pos: Bbox | tuple[float, float, float, float], which: Literal["both", "active", "original"] = ...) -> None: - ... - - def reset_position(self) -> None: - ... - - def set_axes_locator(self, locator: Callable[[_AxesBase, RendererBase], Bbox]) -> None: - ... - - def get_axes_locator(self) -> Callable[[_AxesBase, RendererBase], Bbox]: - ... - - def sharex(self, other: _AxesBase) -> None: - ... - - def sharey(self, other: _AxesBase) -> None: - ... - - def clear(self) -> None: - ... - - def cla(self) -> None: - ... - - class ArtistList(Sequence[Artist]): - def __init__(self, axes: _AxesBase, prop_name: str, valid_types: type | Iterable[type] | None = ..., invalid_types: type | Iterable[type] | None = ...) -> None: - ... - - def __len__(self) -> int: - ... - - def __iter__(self) -> Iterator[Artist]: - ... - - @overload - def __getitem__(self, key: int) -> Artist: - ... - - @overload - def __getitem__(self, key: slice) -> list[Artist]: - ... - - @overload - def __add__(self, other: _AxesBase.ArtistList) -> list[Artist]: - ... - - @overload - def __add__(self, other: list[Any]) -> list[Any]: - ... - - @overload - def __add__(self, other: tuple[Any]) -> tuple[Any]: - ... - - @overload - def __radd__(self, other: _AxesBase.ArtistList) -> list[Artist]: - ... - - @overload - def __radd__(self, other: list[Any]) -> list[Any]: - ... - - @overload - def __radd__(self, other: tuple[Any]) -> tuple[Any]: - ... - - - - @property - def artists(self) -> _AxesBase.ArtistList: - ... - - @property - def collections(self) -> _AxesBase.ArtistList: - ... - - @property - def images(self) -> _AxesBase.ArtistList: - ... - - @property - def lines(self) -> _AxesBase.ArtistList: - ... - - @property - def patches(self) -> _AxesBase.ArtistList: - ... - - @property - def tables(self) -> _AxesBase.ArtistList: - ... - - @property - def texts(self) -> _AxesBase.ArtistList: - ... - - def get_facecolor(self) -> ColorType: - ... - - def set_facecolor(self, color: ColorType | None) -> None: - ... - - @overload - def set_prop_cycle(self, cycler: Cycler) -> None: - ... - - @overload - def set_prop_cycle(self, label: str, values: Iterable[Any]) -> None: - ... - - @overload - def set_prop_cycle(self, **kwargs: Iterable[Any]) -> None: - ... - - def get_aspect(self) -> float | Literal["auto"]: - ... - - def set_aspect(self, aspect: float | Literal["auto", "equal"], adjustable: Literal["box", "datalim"] | None = ..., anchor: str | tuple[float, float] | None = ..., share: bool = ...) -> None: - ... - - def get_adjustable(self) -> Literal["box", "datalim"]: - ... - - def set_adjustable(self, adjustable: Literal["box", "datalim"], share: bool = ...) -> None: - ... - - def get_box_aspect(self) -> float | None: - ... - - def set_box_aspect(self, aspect: float | None = ...) -> None: - ... - - def get_anchor(self) -> str | tuple[float, float]: - ... - - def set_anchor(self, anchor: str | tuple[float, float], share: bool = ...) -> None: - ... - - def get_data_ratio(self) -> float: - ... - - def apply_aspect(self, position: Bbox | None = ...) -> None: - ... - - @overload - def axis(self, arg: tuple[float, float, float, float] | bool | str | None = ..., /, *, emit: bool = ...) -> tuple[float, float, float, float]: - ... - - @overload - def axis(self, *, emit: bool = ..., xmin: float | None = ..., xmax: float | None = ..., ymin: float | None = ..., ymax: float | None = ...) -> tuple[float, float, float, float]: - ... - - def get_legend(self) -> Legend: - ... - - def get_images(self) -> list[AxesImage]: - ... - - def get_lines(self) -> list[Line2D]: - ... - - def get_xaxis(self) -> XAxis: - ... - - def get_yaxis(self) -> YAxis: - ... - - def has_data(self) -> bool: - ... - - def add_artist(self, a: Artist) -> Artist: - ... - - def add_child_axes(self, ax: _AxesBase) -> _AxesBase: - ... - - def add_collection(self, collection: Collection, autolim: bool = ...) -> Collection: - ... - - def add_image(self, image: AxesImage) -> AxesImage: - ... - - def add_line(self, line: Line2D) -> Line2D: - ... - - def add_patch(self, p: Patch) -> Patch: - ... - - def add_table(self, tab: Table) -> Table: - ... - - def add_container(self, container: Container) -> Container: - ... - - def relim(self, visible_only: bool = ...) -> None: - ... - - def update_datalim(self, xys: ArrayLike, updatex: bool = ..., updatey: bool = ...) -> None: - ... - - def in_axes(self, mouseevent: MouseEvent) -> bool: - ... - - def get_autoscale_on(self) -> bool: - ... - - def set_autoscale_on(self, b: bool) -> None: - ... - - @property - def use_sticky_edges(self) -> bool: - ... - - @use_sticky_edges.setter - def use_sticky_edges(self, b: bool) -> None: - ... - - def set_xmargin(self, m: float) -> None: - ... - - def set_ymargin(self, m: float) -> None: - ... - - def margins(self, *margins: float, x: float | None = ..., y: float | None = ..., tight: bool | None = ...) -> tuple[float, float] | None: - ... - - def set_rasterization_zorder(self, z: float | None) -> None: - ... - - def get_rasterization_zorder(self) -> float | None: - ... - - def autoscale(self, enable: bool = ..., axis: Literal["both", "x", "y"] = ..., tight: bool | None = ...) -> None: - ... - - def autoscale_view(self, tight: bool | None = ..., scalex: bool = ..., scaley: bool = ...) -> None: - ... - - def draw_artist(self, a: Artist) -> None: - ... - - def redraw_in_frame(self) -> None: - ... - - def get_frame_on(self) -> bool: - ... - - def set_frame_on(self, b: bool) -> None: - ... - - def get_axisbelow(self) -> bool | Literal["line"]: - ... - - def set_axisbelow(self, b: bool | Literal["line"]) -> None: - ... - - def grid(self, visible: bool | None = ..., which: Literal["major", "minor", "both"] = ..., axis: Literal["both", "x", "y"] = ..., **kwargs) -> None: - ... - - def ticklabel_format(self, *, axis: Literal["both", "x", "y"] = ..., style: Literal["", "sci", "scientific", "plain"] = ..., scilimits: tuple[int, int] | None = ..., useOffset: bool | float | None = ..., useLocale: bool | None = ..., useMathText: bool | None = ...) -> None: - ... - - def locator_params(self, axis: Literal["both", "x", "y"] = ..., tight: bool | None = ..., **kwargs) -> None: - ... - - def tick_params(self, axis: Literal["both", "x", "y"] = ..., **kwargs) -> None: - ... - - def set_axis_off(self) -> None: - ... - - def set_axis_on(self) -> None: - ... - - def get_xlabel(self) -> str: - ... - - def set_xlabel(self, xlabel: str, fontdict: dict[str, Any] | None = ..., labelpad: float | None = ..., *, loc: Literal["left", "center", "right"] | None = ..., **kwargs) -> Text: - ... - - def invert_xaxis(self) -> None: - ... - - def get_xbound(self) -> tuple[float, float]: - ... - - def set_xbound(self, lower: float | None = ..., upper: float | None = ...) -> None: - ... - - def get_xlim(self) -> tuple[float, float]: - ... - - def set_xlim(self, left: float | tuple[float, float] | None = ..., right: float | None = ..., *, emit: bool = ..., auto: bool | None = ..., xmin: float | None = ..., xmax: float | None = ...) -> tuple[float, float]: - ... - - def get_ylabel(self) -> str: - ... - - def set_ylabel(self, ylabel: str, fontdict: dict[str, Any] | None = ..., labelpad: float | None = ..., *, loc: Literal["bottom", "center", "top"] | None = ..., **kwargs) -> Text: - ... - - def invert_yaxis(self) -> None: - ... - - def get_ybound(self) -> tuple[float, float]: - ... - - def set_ybound(self, lower: float | None = ..., upper: float | None = ...) -> None: - ... - - def get_ylim(self) -> tuple[float, float]: - ... - - def set_ylim(self, bottom: float | tuple[float, float] | None = ..., top: float | None = ..., *, emit: bool = ..., auto: bool | None = ..., ymin: float | None = ..., ymax: float | None = ...) -> tuple[float, float]: - ... - - def format_xdata(self, x: float) -> str: - ... - - def format_ydata(self, y: float) -> str: - ... - - def format_coord(self, x: float, y: float) -> str: - ... - - def minorticks_on(self) -> None: - ... - - def minorticks_off(self) -> None: - ... - - def can_zoom(self) -> bool: - ... - - def can_pan(self) -> bool: - ... - - def get_navigate(self) -> bool: - ... - - def set_navigate(self, b: bool) -> None: - ... - - def get_navigate_mode(self) -> Literal["PAN", "ZOOM"] | None: - ... - - def set_navigate_mode(self, b: Literal["PAN", "ZOOM"] | None) -> None: - ... - - def start_pan(self, x: float, y: float, button: MouseButton) -> None: - ... - - def end_pan(self) -> None: - ... - - def drag_pan(self, button: MouseButton, key: str | None, x: float, y: float) -> None: - ... - - def get_children(self) -> list[Artist]: - ... - - def contains_point(self, point: tuple[int, int]) -> bool: - ... - - def get_default_bbox_extra_artists(self) -> list[Artist]: - ... - - def get_tightbbox(self, renderer: RendererBase | None = ..., *, call_axes_locator: bool = ..., bbox_extra_artists: Sequence[Artist] | None = ..., for_layout_only: bool = ...) -> Bbox | None: - ... - - def twinx(self) -> _AxesBase: - ... - - def twiny(self) -> _AxesBase: - ... - - def get_shared_x_axes(self) -> cbook.GrouperView: - ... - - def get_shared_y_axes(self) -> cbook.GrouperView: - ... - - def label_outer(self, remove_inner_ticks: bool = ...) -> None: - ... - - def get_xgridlines(self) -> list[Line2D]: - ... - - def get_xticklines(self, minor: bool = ...) -> list[Line2D]: - ... - - def get_ygridlines(self) -> list[Line2D]: - ... - - def get_yticklines(self, minor: bool = ...) -> list[Line2D]: - ... - - def get_autoscalex_on(self) -> bool: - ... - - def get_autoscaley_on(self) -> bool: - ... - - def set_autoscalex_on(self, b: bool) -> None: - ... - - def set_autoscaley_on(self, b: bool) -> None: - ... - - def xaxis_inverted(self) -> bool: - ... - - def get_xscale(self) -> str: - ... - - def set_xscale(self, value: str | ScaleBase, **kwargs) -> None: - ... - - def get_xticks(self, *, minor: bool = ...) -> np.ndarray: - ... - - def set_xticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]: - ... - - def get_xmajorticklabels(self) -> list[Text]: - ... - - def get_xminorticklabels(self) -> list[Text]: - ... - - def get_xticklabels(self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...) -> list[Text]: - ... - - def set_xticklabels(self, labels: Iterable[str | Text], *, minor: bool = ..., fontdict: dict[str, Any] | None = ..., **kwargs) -> list[Text]: - ... - - def yaxis_inverted(self) -> bool: - ... - - def get_yscale(self) -> str: - ... - - def set_yscale(self, value: str | ScaleBase, **kwargs) -> None: - ... - - def get_yticks(self, *, minor: bool = ...) -> np.ndarray: - ... - - def set_yticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]: - ... - - def get_ymajorticklabels(self) -> list[Text]: - ... - - def get_yminorticklabels(self) -> list[Text]: - ... - - def get_yticklabels(self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...) -> list[Text]: - ... - - def set_yticklabels(self, labels: Iterable[str | Text], *, minor: bool = ..., fontdict: dict[str, Any] | None = ..., **kwargs) -> list[Text]: - ... - - def xaxis_date(self, tz: str | datetime.tzinfo | None = ...) -> None: - ... - - def yaxis_date(self, tz: str | datetime.tzinfo | None = ...) -> None: - ... - - - diff --git a/typings/matplotlib/axes/_secondary_axes.pyi b/typings/matplotlib/axes/_secondary_axes.pyi deleted file mode 100644 index 9aa8d85..0000000 --- a/typings/matplotlib/axes/_secondary_axes.pyi +++ /dev/null @@ -1,36 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.axes._base import _AxesBase -from matplotlib.axis import Tick -from matplotlib.transforms import Transform -from collections.abc import Callable, Iterable -from typing import Literal -from numpy.typing import ArrayLike -from matplotlib.typing import ColorType - -class SecondaryAxis(_AxesBase): - def __init__(self, parent: _AxesBase, orientation: Literal["x", "y"], location: Literal["top", "bottom", "right", "left"] | float, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform, **kwargs) -> None: - ... - - def set_alignment(self, align: Literal["top", "bottom", "right", "left"]) -> None: - ... - - def set_location(self, location: Literal["top", "bottom", "right", "left"] | float) -> None: - ... - - def set_ticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]: - ... - - def set_functions(self, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform) -> None: - ... - - def set_aspect(self, *args, **kwargs) -> None: - ... - - def set_color(self, color: ColorType) -> None: - ... - - - diff --git a/typings/matplotlib/axis.pyi b/typings/matplotlib/axis.pyi deleted file mode 100644 index 26d9b89..0000000 --- a/typings/matplotlib/axis.pyi +++ /dev/null @@ -1,433 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import datetime -import numpy as np -import matplotlib.artist as martist -from collections.abc import Callable, Iterable, Sequence -from typing import Any, Literal, overload -from numpy.typing import ArrayLike -from matplotlib import cbook -from matplotlib.axes import Axes -from matplotlib.backend_bases import RendererBase -from matplotlib.lines import Line2D -from matplotlib.text import Text -from matplotlib.ticker import Formatter, Locator -from matplotlib.transforms import Bbox, Transform -from matplotlib.typing import ColorType - -GRIDLINE_INTERPOLATION_STEPS: int -class Tick(martist.Artist): - axes: Axes - tick1line: Line2D - tick2line: Line2D - gridline: Line2D - label1: Text - label2: Text - def __init__(self, axes: Axes, loc: float, *, size: float | None = ..., width: float | None = ..., color: ColorType | None = ..., tickdir: Literal["in", "inout", "out"] | None = ..., pad: float | None = ..., labelsize: float | None = ..., labelcolor: ColorType | None = ..., labelfontfamily: str | Sequence[str] | None = ..., zorder: float | None = ..., gridOn: bool | None = ..., tick1On: bool = ..., tick2On: bool = ..., label1On: bool = ..., label2On: bool = ..., major: bool = ..., labelrotation: float = ..., grid_color: ColorType | None = ..., grid_linestyle: str | None = ..., grid_linewidth: float | None = ..., grid_alpha: float | None = ..., **kwargs) -> None: - ... - - def get_tickdir(self) -> Literal["in", "inout", "out"]: - ... - - def get_tick_padding(self) -> float: - ... - - def get_children(self) -> list[martist.Artist]: - ... - - stale: bool - def set_pad(self, val: float) -> None: - ... - - def get_pad(self) -> None: - ... - - def get_loc(self) -> float: - ... - - def set_label1(self, s: object) -> None: - ... - - def set_label(self, s: object) -> None: - ... - - def set_label2(self, s: object) -> None: - ... - - def set_url(self, url: str | None) -> None: - ... - - def get_view_interval(self) -> ArrayLike: - ... - - def update_position(self, loc: float) -> None: - ... - - - -class XTick(Tick): - __name__: str - def __init__(self, *args, **kwargs) -> None: - ... - - stale: bool - def update_position(self, loc: float) -> None: - ... - - def get_view_interval(self) -> np.ndarray: - ... - - - -class YTick(Tick): - __name__: str - def __init__(self, *args, **kwargs) -> None: - ... - - stale: bool - def update_position(self, loc: float) -> None: - ... - - def get_view_interval(self) -> np.ndarray: - ... - - - -class Ticker: - def __init__(self) -> None: - ... - - @property - def locator(self) -> Locator | None: - ... - - @locator.setter - def locator(self, locator: Locator) -> None: - ... - - @property - def formatter(self) -> Formatter | None: - ... - - @formatter.setter - def formatter(self, formatter: Formatter) -> None: - ... - - - -class _LazyTickList: - def __init__(self, major: bool) -> None: - ... - - @overload - def __get__(self, instance: None, owner: None) -> _LazyTickList: - ... - - @overload - def __get__(self, instance: Axis, owner: type[Axis]) -> list[Tick]: - ... - - - -class Axis(martist.Artist): - OFFSETTEXTPAD: int - isDefault_label: bool - axes: Axes - major: Ticker - minor: Ticker - callbacks: cbook.CallbackRegistry - label: Text - offsetText: Text - labelpad: float - pickradius: float - def __init__(self, axes, *, pickradius: float = ..., clear: bool = ...) -> None: - ... - - @property - def isDefault_majloc(self) -> bool: - ... - - @isDefault_majloc.setter - def isDefault_majloc(self, value: bool) -> None: - ... - - @property - def isDefault_majfmt(self) -> bool: - ... - - @isDefault_majfmt.setter - def isDefault_majfmt(self, value: bool) -> None: - ... - - @property - def isDefault_minloc(self) -> bool: - ... - - @isDefault_minloc.setter - def isDefault_minloc(self, value: bool) -> None: - ... - - @property - def isDefault_minfmt(self) -> bool: - ... - - @isDefault_minfmt.setter - def isDefault_minfmt(self, value: bool) -> None: - ... - - majorTicks: _LazyTickList - minorTicks: _LazyTickList - def get_remove_overlapping_locs(self) -> bool: - ... - - def set_remove_overlapping_locs(self, val: bool) -> None: - ... - - @property - def remove_overlapping_locs(self) -> bool: - ... - - @remove_overlapping_locs.setter - def remove_overlapping_locs(self, val: bool) -> None: - ... - - stale: bool - def set_label_coords(self, x: float, y: float, transform: Transform | None = ...) -> None: - ... - - def get_transform(self) -> Transform: - ... - - def get_scale(self) -> str: - ... - - def limit_range_for_scale(self, vmin: float, vmax: float) -> tuple[float, float]: - ... - - def get_children(self) -> list[martist.Artist]: - ... - - converter: Any - units: Any - def clear(self) -> None: - ... - - def reset_ticks(self) -> None: - ... - - def set_tick_params(self, which: Literal["major", "minor", "both"] = ..., reset: bool = ..., **kwargs) -> None: - ... - - def get_tick_params(self, which: Literal["major", "minor"] = ...) -> dict[str, Any]: - ... - - def get_view_interval(self) -> tuple[float, float]: - ... - - def set_view_interval(self, vmin: float, vmax: float, ignore: bool = ...) -> None: - ... - - def get_data_interval(self) -> tuple[float, float]: - ... - - def set_data_interval(self, vmin: float, vmax: float, ignore: bool = ...) -> None: - ... - - def get_inverted(self) -> bool: - ... - - def set_inverted(self, inverted: bool) -> None: - ... - - def set_default_intervals(self) -> None: - ... - - def get_tightbbox(self, renderer: RendererBase | None = ..., *, for_layout_only: bool = ...) -> Bbox | None: - ... - - def get_tick_padding(self) -> float: - ... - - def get_gridlines(self) -> list[Line2D]: - ... - - def get_label(self) -> Text: - ... - - def get_offset_text(self) -> Text: - ... - - def get_pickradius(self) -> float: - ... - - def get_majorticklabels(self) -> list[Text]: - ... - - def get_minorticklabels(self) -> list[Text]: - ... - - def get_ticklabels(self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...) -> list[Text]: - ... - - def get_majorticklines(self) -> list[Line2D]: - ... - - def get_minorticklines(self) -> list[Line2D]: - ... - - def get_ticklines(self, minor: bool = ...) -> list[Line2D]: - ... - - def get_majorticklocs(self) -> np.ndarray: - ... - - def get_minorticklocs(self) -> np.ndarray: - ... - - def get_ticklocs(self, *, minor: bool = ...) -> np.ndarray: - ... - - def get_ticks_direction(self, minor: bool = ...) -> np.ndarray: - ... - - def get_label_text(self) -> str: - ... - - def get_major_locator(self) -> Locator: - ... - - def get_minor_locator(self) -> Locator: - ... - - def get_major_formatter(self) -> Formatter: - ... - - def get_minor_formatter(self) -> Formatter: - ... - - def get_major_ticks(self, numticks: int | None = ...) -> list[Tick]: - ... - - def get_minor_ticks(self, numticks: int | None = ...) -> list[Tick]: - ... - - def grid(self, visible: bool | None = ..., which: Literal["major", "minor", "both"] = ..., **kwargs) -> None: - ... - - def update_units(self, data): - ... - - def have_units(self) -> bool: - ... - - def convert_units(self, x): - ... - - def set_units(self, u) -> None: - ... - - def get_units(self): - ... - - def set_label_text(self, label: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text: - ... - - def set_major_formatter(self, formatter: Formatter | str | Callable[[float, float], str]) -> None: - ... - - def set_minor_formatter(self, formatter: Formatter | str | Callable[[float, float], str]) -> None: - ... - - def set_major_locator(self, locator: Locator) -> None: - ... - - def set_minor_locator(self, locator: Locator) -> None: - ... - - def set_pickradius(self, pickradius: float) -> None: - ... - - def set_ticklabels(self, labels: Iterable[str | Text], *, minor: bool = ..., fontdict: dict[str, Any] | None = ..., **kwargs) -> list[Text]: - ... - - def set_ticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]: - ... - - def axis_date(self, tz: str | datetime.tzinfo | None = ...) -> None: - ... - - def get_tick_space(self) -> int: - ... - - def get_label_position(self) -> Literal["top", "bottom"]: - ... - - def set_label_position(self, position: Literal["top", "bottom", "left", "right"]) -> None: - ... - - def get_minpos(self) -> float: - ... - - - -class XAxis(Axis): - __name__: str - axis_name: str - def __init__(self, *args, **kwargs) -> None: - ... - - label_position: Literal["bottom", "top"] - stale: bool - def set_label_position(self, position: Literal["bottom", "top"]) -> None: - ... - - def set_ticks_position(self, position: Literal["top", "bottom", "both", "default", "none"]) -> None: - ... - - def tick_top(self) -> None: - ... - - def tick_bottom(self) -> None: - ... - - def get_ticks_position(self) -> Literal["top", "bottom", "default", "unknown"]: - ... - - def get_tick_space(self) -> int: - ... - - - -class YAxis(Axis): - __name__: str - axis_name: str - def __init__(self, *args, **kwargs) -> None: - ... - - label_position: Literal["left", "right"] - stale: bool - def set_label_position(self, position: Literal["left", "right"]) -> None: - ... - - def set_offset_position(self, position: Literal["left", "right"]) -> None: - ... - - def set_ticks_position(self, position: Literal["left", "right", "both", "default", "none"]) -> None: - ... - - def tick_right(self) -> None: - ... - - def tick_left(self) -> None: - ... - - def get_ticks_position(self) -> Literal["left", "right", "default", "unknown"]: - ... - - def get_tick_space(self) -> int: - ... - - - diff --git a/typings/matplotlib/backend_bases.pyi b/typings/matplotlib/backend_bases.pyi deleted file mode 100644 index 9bca6fc..0000000 --- a/typings/matplotlib/backend_bases.pyi +++ /dev/null @@ -1,647 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -from enum import Enum, IntEnum -from matplotlib import _api, cbook, transforms, widgets -from matplotlib.artist import Artist -from matplotlib.axes import Axes -from matplotlib.backend_managers import ToolManager -from matplotlib.backend_tools import Cursors, ToolBase -from matplotlib.colorbar import Colorbar -from matplotlib.figure import Figure -from matplotlib.font_manager import FontProperties -from matplotlib.path import Path -from matplotlib.texmanager import TexManager -from matplotlib.text import Text -from matplotlib.transforms import Bbox, BboxBase, Transform, TransformedPath -from collections.abc import Callable, Iterable, Sequence -from typing import Any, IO, Literal, NamedTuple, TypeVar -from numpy.typing import ArrayLike -from .typing import CapStyleType, ColorType, JoinStyleType, LineStyleType - -def register_backend(format: str, backend: str | type[FigureCanvasBase], description: str | None = ...) -> None: - ... - -def get_registered_canvas_class(format: str) -> type[FigureCanvasBase]: - ... - -class RendererBase: - def __init__(self) -> None: - ... - - def open_group(self, s: str, gid: str | None = ...) -> None: - ... - - def close_group(self, s: str) -> None: - ... - - def draw_path(self, gc: GraphicsContextBase, path: Path, transform: Transform, rgbFace: ColorType | None = ...) -> None: - ... - - def draw_markers(self, gc: GraphicsContextBase, marker_path: Path, marker_trans: Transform, path: Path, trans: Transform, rgbFace: ColorType | None = ...) -> None: - ... - - def draw_path_collection(self, gc: GraphicsContextBase, master_transform: Transform, paths: Sequence[Path], all_transforms: Sequence[ArrayLike], offsets: ArrayLike | Sequence[ArrayLike], offset_trans: Transform, facecolors: ColorType | Sequence[ColorType], edgecolors: ColorType | Sequence[ColorType], linewidths: float | Sequence[float], linestyles: LineStyleType | Sequence[LineStyleType], antialiaseds: bool | Sequence[bool], urls: str | Sequence[str], offset_position: Any) -> None: - ... - - def draw_quad_mesh(self, gc: GraphicsContextBase, master_transform: Transform, meshWidth, meshHeight, coordinates: ArrayLike, offsets: ArrayLike | Sequence[ArrayLike], offsetTrans: Transform, facecolors: Sequence[ColorType], antialiased: bool, edgecolors: Sequence[ColorType] | ColorType | None) -> None: - ... - - def draw_gouraud_triangle(self, gc: GraphicsContextBase, points: ArrayLike, colors: ArrayLike, transform: Transform) -> None: - ... - - def draw_gouraud_triangles(self, gc: GraphicsContextBase, triangles_array: ArrayLike, colors_array: ArrayLike, transform: Transform) -> None: - ... - - def get_image_magnification(self) -> float: - ... - - def draw_image(self, gc: GraphicsContextBase, x: float, y: float, im: ArrayLike, transform: transforms.Affine2DBase | None = ...) -> None: - ... - - def option_image_nocomposite(self) -> bool: - ... - - def option_scale_image(self) -> bool: - ... - - def draw_tex(self, gc: GraphicsContextBase, x: float, y: float, s: str, prop: FontProperties, angle: float, *, mtext: Text | None = ...) -> None: - ... - - def draw_text(self, gc: GraphicsContextBase, x: float, y: float, s: str, prop: FontProperties, angle: float, ismath: bool | Literal["TeX"] = ..., mtext: Text | None = ...) -> None: - ... - - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool | Literal["TeX"]) -> tuple[float, float, float]: - ... - - def flipy(self) -> bool: - ... - - def get_canvas_width_height(self) -> tuple[float, float]: - ... - - def get_texmanager(self) -> TexManager: - ... - - def new_gc(self) -> GraphicsContextBase: - ... - - def points_to_pixels(self, points: ArrayLike) -> ArrayLike: - ... - - def start_rasterizing(self) -> None: - ... - - def stop_rasterizing(self) -> None: - ... - - def start_filter(self) -> None: - ... - - def stop_filter(self, filter_func) -> None: - ... - - - -class GraphicsContextBase: - def __init__(self) -> None: - ... - - def copy_properties(self, gc: GraphicsContextBase) -> None: - ... - - def restore(self) -> None: - ... - - def get_alpha(self) -> float: - ... - - def get_antialiased(self) -> int: - ... - - def get_capstyle(self) -> Literal["butt", "projecting", "round"]: - ... - - def get_clip_rectangle(self) -> Bbox | None: - ... - - def get_clip_path(self) -> tuple[TransformedPath, Transform] | tuple[None, None]: - ... - - def get_dashes(self) -> tuple[float, ArrayLike | None]: - ... - - def get_forced_alpha(self) -> bool: - ... - - def get_joinstyle(self) -> Literal["miter", "round", "bevel"]: - ... - - def get_linewidth(self) -> float: - ... - - def get_rgb(self) -> tuple[float, float, float, float]: - ... - - def get_url(self) -> str | None: - ... - - def get_gid(self) -> int | None: - ... - - def get_snap(self) -> bool | None: - ... - - def set_alpha(self, alpha: float) -> None: - ... - - def set_antialiased(self, b: bool) -> None: - ... - - def set_capstyle(self, cs: CapStyleType) -> None: - ... - - def set_clip_rectangle(self, rectangle: Bbox | None) -> None: - ... - - def set_clip_path(self, path: TransformedPath | None) -> None: - ... - - def set_dashes(self, dash_offset: float, dash_list: ArrayLike | None) -> None: - ... - - def set_foreground(self, fg: ColorType, isRGBA: bool = ...) -> None: - ... - - def set_joinstyle(self, js: JoinStyleType) -> None: - ... - - def set_linewidth(self, w: float) -> None: - ... - - def set_url(self, url: str | None) -> None: - ... - - def set_gid(self, id: int | None) -> None: - ... - - def set_snap(self, snap: bool | None) -> None: - ... - - def set_hatch(self, hatch: str | None) -> None: - ... - - def get_hatch(self) -> str | None: - ... - - def get_hatch_path(self, density: float = ...) -> Path: - ... - - def get_hatch_color(self) -> ColorType: - ... - - def set_hatch_color(self, hatch_color: ColorType) -> None: - ... - - def get_hatch_linewidth(self) -> float: - ... - - def get_sketch_params(self) -> tuple[float, float, float] | None: - ... - - def set_sketch_params(self, scale: float | None = ..., length: float | None = ..., randomness: float | None = ...) -> None: - ... - - - -class TimerBase: - callbacks: list[tuple[Callable, tuple, dict[str, Any]]] - def __init__(self, interval: int | None = ..., callbacks: list[tuple[Callable, tuple, dict[str, Any]]] | None = ...) -> None: - ... - - def __del__(self) -> None: - ... - - def start(self, interval: int | None = ...) -> None: - ... - - def stop(self) -> None: - ... - - @property - def interval(self) -> int: - ... - - @interval.setter - def interval(self, interval: int) -> None: - ... - - @property - def single_shot(self) -> bool: - ... - - @single_shot.setter - def single_shot(self, ss: bool) -> None: - ... - - def add_callback(self, func: Callable, *args, **kwargs) -> Callable: - ... - - def remove_callback(self, func: Callable, *args, **kwargs) -> None: - ... - - - -class Event: - name: str - canvas: FigureCanvasBase - def __init__(self, name: str, canvas: FigureCanvasBase, guiEvent: Any | None = ...) -> None: - ... - - @property - def guiEvent(self) -> Any: - ... - - - -class DrawEvent(Event): - renderer: RendererBase - def __init__(self, name: str, canvas: FigureCanvasBase, renderer: RendererBase) -> None: - ... - - - -class ResizeEvent(Event): - width: int - height: int - def __init__(self, name: str, canvas: FigureCanvasBase) -> None: - ... - - - -class CloseEvent(Event): - ... - - -class LocationEvent(Event): - lastevent: Event | None - x: int - y: int - inaxes: Axes | None - xdata: float | None - ydata: float | None - def __init__(self, name: str, canvas: FigureCanvasBase, x: int, y: int, guiEvent: Any | None = ..., *, modifiers: Iterable[str] | None = ...) -> None: - ... - - - -class MouseButton(IntEnum): - LEFT: int - MIDDLE: int - RIGHT: int - BACK: int - FORWARD: int - ... - - -class MouseEvent(LocationEvent): - button: MouseButton | Literal["up", "down"] | None - key: str | None - step: float - dblclick: bool - def __init__(self, name: str, canvas: FigureCanvasBase, x: int, y: int, button: MouseButton | Literal["up", "down"] | None = ..., key: str | None = ..., step: float = ..., dblclick: bool = ..., guiEvent: Any | None = ..., *, modifiers: Iterable[str] | None = ...) -> None: - ... - - - -class PickEvent(Event): - mouseevent: MouseEvent - artist: Artist - def __init__(self, name: str, canvas: FigureCanvasBase, mouseevent: MouseEvent, artist: Artist, guiEvent: Any | None = ..., **kwargs) -> None: - ... - - - -class KeyEvent(LocationEvent): - key: str | None - def __init__(self, name: str, canvas: FigureCanvasBase, key: str | None, x: int = ..., y: int = ..., guiEvent: Any | None = ...) -> None: - ... - - - -class FigureCanvasBase: - required_interactive_framework: str | None - @_api.classproperty - def manager_class(cls) -> type[FigureManagerBase]: - ... - - events: list[str] - fixed_dpi: None | float - filetypes: dict[str, str] - @_api.classproperty - def supports_blit(cls) -> bool: - ... - - figure: Figure - manager: None | FigureManagerBase - widgetlock: widgets.LockDraw - mouse_grabber: None | Axes - toolbar: None | NavigationToolbar2 - def __init__(self, figure: Figure | None = ...) -> None: - ... - - @property - def callbacks(self) -> cbook.CallbackRegistry: - ... - - @property - def button_pick_id(self) -> int: - ... - - @property - def scroll_pick_id(self) -> int: - ... - - @classmethod - def new_manager(cls, figure: Figure, num: int | str) -> FigureManagerBase: - ... - - def is_saving(self) -> bool: - ... - - def blit(self, bbox: BboxBase | None = ...) -> None: - ... - - def inaxes(self, xy: tuple[float, float]) -> Axes | None: - ... - - def grab_mouse(self, ax: Axes) -> None: - ... - - def release_mouse(self, ax: Axes) -> None: - ... - - def set_cursor(self, cursor: Cursors) -> None: - ... - - def draw(self, *args, **kwargs) -> None: - ... - - def draw_idle(self, *args, **kwargs) -> None: - ... - - @property - def device_pixel_ratio(self) -> float: - ... - - def get_width_height(self, *, physical: bool = ...) -> tuple[int, int]: - ... - - @classmethod - def get_supported_filetypes(cls) -> dict[str, str]: - ... - - @classmethod - def get_supported_filetypes_grouped(cls) -> dict[str, list[str]]: - ... - - def print_figure(self, filename: str | os.PathLike | IO, dpi: float | None = ..., facecolor: ColorType | Literal["auto"] | None = ..., edgecolor: ColorType | Literal["auto"] | None = ..., orientation: str = ..., format: str | None = ..., *, bbox_inches: Literal["tight"] | Bbox | None = ..., pad_inches: float | None = ..., bbox_extra_artists: list[Artist] | None = ..., backend: str | None = ..., **kwargs) -> Any: - ... - - @classmethod - def get_default_filetype(cls) -> str: - ... - - def get_default_filename(self) -> str: - ... - - _T = TypeVar("_T", bound=FigureCanvasBase) - def switch_backends(self, FigureCanvasClass: type[_T]) -> _T: - ... - - def mpl_connect(self, s: str, func: Callable[[Event], Any]) -> int: - ... - - def mpl_disconnect(self, cid: int) -> None: - ... - - def new_timer(self, interval: int | None = ..., callbacks: list[tuple[Callable, tuple, dict[str, Any]]] | None = ...) -> TimerBase: - ... - - def flush_events(self) -> None: - ... - - def start_event_loop(self, timeout: float = ...) -> None: - ... - - def stop_event_loop(self) -> None: - ... - - - -def key_press_handler(event: KeyEvent, canvas: FigureCanvasBase | None = ..., toolbar: NavigationToolbar2 | None = ...) -> None: - ... - -def button_press_handler(event: MouseEvent, canvas: FigureCanvasBase | None = ..., toolbar: NavigationToolbar2 | None = ...) -> None: - ... - -class NonGuiException(Exception): - ... - - -class FigureManagerBase: - canvas: FigureCanvasBase - num: int | str - key_press_handler_id: int | None - button_press_handler_id: int | None - toolmanager: ToolManager | None - toolbar: NavigationToolbar2 | ToolContainerBase | None - def __init__(self, canvas: FigureCanvasBase, num: int | str) -> None: - ... - - @classmethod - def create_with_canvas(cls, canvas_class: type[FigureCanvasBase], figure: Figure, num: int | str) -> FigureManagerBase: - ... - - @classmethod - def start_main_loop(cls) -> None: - ... - - @classmethod - def pyplot_show(cls, *, block: bool | None = ...) -> None: - ... - - def show(self) -> None: - ... - - def destroy(self) -> None: - ... - - def full_screen_toggle(self) -> None: - ... - - def resize(self, w: int, h: int) -> None: - ... - - def get_window_title(self) -> str: - ... - - def set_window_title(self, title: str) -> None: - ... - - - -cursors = Cursors -class _Mode(str, Enum): - NONE: str - PAN: str - ZOOM: str - ... - - -class NavigationToolbar2: - toolitems: tuple[tuple[str, ...] | tuple[None, ...], ...] - canvas: FigureCanvasBase - mode: _Mode - def __init__(self, canvas: FigureCanvasBase) -> None: - ... - - def set_message(self, s: str) -> None: - ... - - def draw_rubberband(self, event: Event, x0: float, y0: float, x1: float, y1: float) -> None: - ... - - def remove_rubberband(self) -> None: - ... - - def home(self, *args) -> None: - ... - - def back(self, *args) -> None: - ... - - def forward(self, *args) -> None: - ... - - def mouse_move(self, event: MouseEvent) -> None: - ... - - def pan(self, *args) -> None: - ... - - class _PanInfo(NamedTuple): - button: MouseButton - axes: list[Axes] - cid: int - ... - - - def press_pan(self, event: Event) -> None: - ... - - def drag_pan(self, event: Event) -> None: - ... - - def release_pan(self, event: Event) -> None: - ... - - def zoom(self, *args) -> None: - ... - - class _ZoomInfo(NamedTuple): - direction: Literal["in", "out"] - start_xy: tuple[float, float] - axes: list[Axes] - cid: int - cbar: Colorbar - ... - - - def press_zoom(self, event: Event) -> None: - ... - - def drag_zoom(self, event: Event) -> None: - ... - - def release_zoom(self, event: Event) -> None: - ... - - def push_current(self) -> None: - ... - - subplot_tool: widgets.SubplotTool - def configure_subplots(self, *args): - ... - - def save_figure(self, *args) -> None: - ... - - def update(self) -> None: - ... - - def set_history_buttons(self) -> None: - ... - - - -class ToolContainerBase: - toolmanager: ToolManager - def __init__(self, toolmanager: ToolManager) -> None: - ... - - def add_tool(self, tool: ToolBase, group: str, position: int = ...) -> None: - ... - - def trigger_tool(self, name: str) -> None: - ... - - def add_toolitem(self, name: str, group: str, position: int, image: str, description: str, toggle: bool) -> None: - ... - - def toggle_toolitem(self, name: str, toggled: bool) -> None: - ... - - def remove_toolitem(self, name: str) -> None: - ... - - def set_message(self, s: str) -> None: - ... - - - -class _Backend: - backend_version: str - FigureCanvas: type[FigureCanvasBase] | None - FigureManager: type[FigureManagerBase] - mainloop: None | Callable[[], Any] - @classmethod - def new_figure_manager(cls, num: int | str, *args, **kwargs) -> FigureManagerBase: - ... - - @classmethod - def new_figure_manager_given_figure(cls, num: int | str, figure: Figure) -> FigureManagerBase: - ... - - @classmethod - def draw_if_interactive(cls) -> None: - ... - - @classmethod - def show(cls, *, block: bool | None = ...) -> None: - ... - - @staticmethod - def export(cls) -> type[_Backend]: - ... - - - -class ShowBase(_Backend): - def __call__(self, block: bool | None = ...) -> None: - ... - - - diff --git a/typings/matplotlib/backend_managers.pyi b/typings/matplotlib/backend_managers.pyi deleted file mode 100644 index f45d64d..0000000 --- a/typings/matplotlib/backend_managers.pyi +++ /dev/null @@ -1,95 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib import backend_tools, widgets -from matplotlib.backend_bases import FigureCanvasBase -from matplotlib.figure import Figure -from collections.abc import Callable, Iterable -from typing import Any, TypeVar - -class ToolEvent: - name: str - sender: Any - tool: backend_tools.ToolBase - data: Any - def __init__(self, name, sender, tool, data: Any | None = ...) -> None: - ... - - - -class ToolTriggerEvent(ToolEvent): - canvasevent: ToolEvent - def __init__(self, name, sender, tool, canvasevent: ToolEvent | None = ..., data: Any | None = ...) -> None: - ... - - - -class ToolManagerMessageEvent: - name: str - sender: Any - message: str - def __init__(self, name: str, sender: Any, message: str) -> None: - ... - - - -class ToolManager: - keypresslock: widgets.LockDraw - messagelock: widgets.LockDraw - def __init__(self, figure: Figure | None = ...) -> None: - ... - - @property - def canvas(self) -> FigureCanvasBase | None: - ... - - @property - def figure(self) -> Figure | None: - ... - - @figure.setter - def figure(self, figure: Figure) -> None: - ... - - def set_figure(self, figure: Figure, update_tools: bool = ...) -> None: - ... - - def toolmanager_connect(self, s: str, func: Callable[[ToolEvent], Any]) -> int: - ... - - def toolmanager_disconnect(self, cid: int) -> None: - ... - - def message_event(self, message: str, sender: Any | None = ...) -> None: - ... - - @property - def active_toggle(self) -> dict[str | None, list[str] | str]: - ... - - def get_tool_keymap(self, name: str) -> list[str]: - ... - - def update_keymap(self, name: str, key: str | Iterable[str]) -> None: - ... - - def remove_tool(self, name: str) -> None: - ... - - _T = TypeVar("_T", bound=backend_tools.ToolBase) - def add_tool(self, name: str, tool: type[_T], *args, **kwargs) -> _T: - ... - - def trigger_tool(self, name: str | backend_tools.ToolBase, sender: Any | None = ..., canvasevent: ToolEvent | None = ..., data: Any | None = ...) -> None: - ... - - @property - def tools(self) -> dict[str, backend_tools.ToolBase]: - ... - - def get_tool(self, name: str | backend_tools.ToolBase, warn: bool = ...) -> backend_tools.ToolBase | None: - ... - - - diff --git a/typings/matplotlib/backend_tools.pyi b/typings/matplotlib/backend_tools.pyi deleted file mode 100644 index 88bdb68..0000000 --- a/typings/matplotlib/backend_tools.pyi +++ /dev/null @@ -1,244 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import enum -from matplotlib import cbook -from matplotlib.axes import Axes -from matplotlib.backend_bases import FigureCanvasBase, ToolContainerBase -from matplotlib.backend_managers import ToolEvent, ToolManager -from matplotlib.figure import Figure -from matplotlib.scale import ScaleBase -from typing import Any - -class Cursors(enum.IntEnum): - POINTER: int - HAND: int - SELECT_REGION: int - MOVE: int - WAIT: int - RESIZE_HORIZONTAL: int - RESIZE_VERTICAL: int - ... - - -cursors = Cursors -class ToolBase: - @property - def default_keymap(self) -> list[str] | None: - ... - - description: str | None - image: str | None - def __init__(self, toolmanager: ToolManager, name: str) -> None: - ... - - @property - def name(self) -> str: - ... - - @property - def toolmanager(self) -> ToolManager: - ... - - @property - def canvas(self) -> FigureCanvasBase | None: - ... - - @property - def figure(self) -> Figure | None: - ... - - @figure.setter - def figure(self, figure: Figure | None) -> None: - ... - - def set_figure(self, figure: Figure | None) -> None: - ... - - def trigger(self, sender: Any, event: ToolEvent, data: Any = ...) -> None: - ... - - - -class ToolToggleBase(ToolBase): - radio_group: str | None - cursor: Cursors | None - default_toggled: bool - def __init__(self, *args, **kwargs) -> None: - ... - - def enable(self, event: ToolEvent | None = ...) -> None: - ... - - def disable(self, event: ToolEvent | None = ...) -> None: - ... - - @property - def toggled(self) -> bool: - ... - - def set_figure(self, figure: Figure | None) -> None: - ... - - - -class ToolSetCursor(ToolBase): - ... - - -class ToolCursorPosition(ToolBase): - def send_message(self, event: ToolEvent) -> None: - ... - - - -class RubberbandBase(ToolBase): - def draw_rubberband(self, *data) -> None: - ... - - def remove_rubberband(self) -> None: - ... - - - -class ToolQuit(ToolBase): - ... - - -class ToolQuitAll(ToolBase): - ... - - -class ToolGrid(ToolBase): - ... - - -class ToolMinorGrid(ToolBase): - ... - - -class ToolFullScreen(ToolBase): - ... - - -class AxisScaleBase(ToolToggleBase): - def enable(self, event: ToolEvent | None = ...) -> None: - ... - - def disable(self, event: ToolEvent | None = ...) -> None: - ... - - - -class ToolYScale(AxisScaleBase): - def set_scale(self, ax: Axes, scale: str | ScaleBase) -> None: - ... - - - -class ToolXScale(AxisScaleBase): - def set_scale(self, ax, scale: str | ScaleBase) -> None: - ... - - - -class ToolViewsPositions(ToolBase): - views: dict[Figure | Axes, cbook.Stack] - positions: dict[Figure | Axes, cbook.Stack] - home_views: dict[Figure, dict[Axes, tuple[float, float, float, float]]] - def add_figure(self, figure: Figure) -> None: - ... - - def clear(self, figure: Figure) -> None: - ... - - def update_view(self) -> None: - ... - - def push_current(self, figure: Figure | None = ...) -> None: - ... - - def update_home_views(self, figure: Figure | None = ...) -> None: - ... - - def home(self) -> None: - ... - - def back(self) -> None: - ... - - def forward(self) -> None: - ... - - - -class ViewsPositionsBase(ToolBase): - ... - - -class ToolHome(ViewsPositionsBase): - ... - - -class ToolBack(ViewsPositionsBase): - ... - - -class ToolForward(ViewsPositionsBase): - ... - - -class ConfigureSubplotsBase(ToolBase): - ... - - -class SaveFigureBase(ToolBase): - ... - - -class ZoomPanBase(ToolToggleBase): - base_scale: float - scrollthresh: float - lastscroll: float - def __init__(self, *args) -> None: - ... - - def enable(self, event: ToolEvent | None = ...) -> None: - ... - - def disable(self, event: ToolEvent | None = ...) -> None: - ... - - def scroll_zoom(self, event: ToolEvent) -> None: - ... - - - -class ToolZoom(ZoomPanBase): - ... - - -class ToolPan(ZoomPanBase): - ... - - -class ToolHelpBase(ToolBase): - @staticmethod - def format_shortcut(key_sequence: str) -> str: - ... - - - -class ToolCopyToClipboardBase(ToolBase): - ... - - -default_tools: dict[str, ToolBase] -default_toolbar_tools: list[list[str | list[str]]] -def add_tools_to_manager(toolmanager: ToolManager, tools: dict[str, type[ToolBase]] = ...) -> None: - ... - -def add_tools_to_container(container: ToolContainerBase, tools: list[Any] = ...) -> None: - ... - diff --git a/typings/matplotlib/backends/__init__.pyi b/typings/matplotlib/backends/__init__.pyi deleted file mode 100644 index a9acd6a..0000000 --- a/typings/matplotlib/backends/__init__.pyi +++ /dev/null @@ -1,5 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -_QT_FORCE_QT5_BINDING = ... diff --git a/typings/matplotlib/bezier.pyi b/typings/matplotlib/bezier.pyi deleted file mode 100644 index 44ee0ee..0000000 --- a/typings/matplotlib/bezier.pyi +++ /dev/null @@ -1,81 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from collections.abc import Callable -from typing import Literal -from numpy.typing import ArrayLike -from .path import Path - -class NonIntersectingPathException(ValueError): - ... - - -def get_intersection(cx1: float, cy1: float, cos_t1: float, sin_t1: float, cx2: float, cy2: float, cos_t2: float, sin_t2: float) -> tuple[float, float]: - ... - -def get_normal_points(cx: float, cy: float, cos_t: float, sin_t: float, length: float) -> tuple[float, float, float, float]: - ... - -def split_de_casteljau(beta: ArrayLike, t: float) -> tuple[np.ndarray, np.ndarray]: - ... - -def find_bezier_t_intersecting_with_closedpath(bezier_point_at_t: Callable[[float], tuple[float, float]], inside_closedpath: Callable[[tuple[float, float]], bool], t0: float = ..., t1: float = ..., tolerance: float = ...) -> tuple[float, float]: - ... - -class BezierSegment: - def __init__(self, control_points: ArrayLike) -> None: - ... - - def __call__(self, t: ArrayLike) -> np.ndarray: - ... - - def point_at_t(self, t: float) -> tuple[float, ...]: - ... - - @property - def control_points(self) -> np.ndarray: - ... - - @property - def dimension(self) -> int: - ... - - @property - def degree(self) -> int: - ... - - @property - def polynomial_coefficients(self) -> np.ndarray: - ... - - def axis_aligned_extrema(self) -> tuple[np.ndarray, np.ndarray]: - ... - - - -def split_bezier_intersecting_with_closedpath(bezier: ArrayLike, inside_closedpath: Callable[[tuple[float, float]], bool], tolerance: float = ...) -> tuple[np.ndarray, np.ndarray]: - ... - -def split_path_inout(path: Path, inside: Callable[[tuple[float, float]], bool], tolerance: float = ..., reorder_inout: bool = ...) -> tuple[Path, Path]: - ... - -def inside_circle(cx: float, cy: float, r: float) -> Callable[[tuple[float, float]], bool]: - ... - -def get_cos_sin(x0: float, y0: float, x1: float, y1: float) -> tuple[float, float]: - ... - -def check_if_parallel(dx1: float, dy1: float, dx2: float, dy2: float, tolerance: float = ...) -> Literal[-1, False, 1]: - ... - -def get_parallels(bezier2: ArrayLike, width: float) -> tuple[list[tuple[float, float]], list[tuple[float, float]]]: - ... - -def find_control_points(c1x: float, c1y: float, mmx: float, mmy: float, c2x: float, c2y: float) -> list[tuple[float, float]]: - ... - -def make_wedged_bezier2(bezier2: ArrayLike, width: float, w1: float = ..., wm: float = ..., w2: float = ...) -> tuple[list[tuple[float, float]], list[tuple[float, float]]]: - ... - diff --git a/typings/matplotlib/category.pyi b/typings/matplotlib/category.pyi deleted file mode 100644 index 55c78a6..0000000 --- a/typings/matplotlib/category.pyi +++ /dev/null @@ -1,151 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib import ticker, units - -""" -Plotting of string "category" data: ``plot(['d', 'f', 'a'], [1, 2, 3])`` will -plot three points with x-axis values of 'd', 'f', 'a'. - -See :doc:`/gallery/lines_bars_and_markers/categorical_variables` for an -example. - -The module uses Matplotlib's `matplotlib.units` mechanism to convert from -strings to integers and provides a tick locator, a tick formatter, and the -`.UnitData` class that creates and stores the string-to-integer mapping. -""" -_log = ... -class StrCategoryConverter(units.ConversionInterface): - @staticmethod - def convert(value, unit, axis): # -> Any: - """ - Convert strings in *value* to floats using mapping information stored - in the *unit* object. - - Parameters - ---------- - value : str or iterable - Value or list of values to be converted. - unit : `.UnitData` - An object mapping strings to integers. - axis : `~matplotlib.axis.Axis` - The axis on which the converted value is plotted. - - .. note:: *axis* is unused. - - Returns - ------- - float or `~numpy.ndarray` of float - """ - ... - - @staticmethod - def axisinfo(unit, axis): # -> AxisInfo: - """ - Set the default axis ticks and labels. - - Parameters - ---------- - unit : `.UnitData` - object string unit information for value - axis : `~matplotlib.axis.Axis` - axis for which information is being set - - .. note:: *axis* is not used - - Returns - ------- - `~matplotlib.units.AxisInfo` - Information to support default tick labeling - - """ - ... - - @staticmethod - def default_units(data, axis): - """ - Set and update the `~matplotlib.axis.Axis` units. - - Parameters - ---------- - data : str or iterable of str - axis : `~matplotlib.axis.Axis` - axis on which the data is plotted - - Returns - ------- - `.UnitData` - object storing string to integer mapping - """ - ... - - - -class StrCategoryLocator(ticker.Locator): - """Tick at every integer mapping of the string data.""" - def __init__(self, units_mapping) -> None: - """ - Parameters - ---------- - units_mapping : dict - Mapping of category names (str) to indices (int). - """ - ... - - def __call__(self): # -> list[Unknown]: - ... - - def tick_values(self, vmin, vmax): # -> list[Unknown]: - ... - - - -class StrCategoryFormatter(ticker.Formatter): - """String representation of the data at every tick.""" - def __init__(self, units_mapping) -> None: - """ - Parameters - ---------- - units_mapping : dict - Mapping of category names (str) to indices (int). - """ - ... - - def __call__(self, x, pos=...): # -> str: - ... - - def format_ticks(self, values): # -> list[str]: - ... - - - -class UnitData: - def __init__(self, data=...) -> None: - """ - Create mapping between unique categorical values and integer ids. - - Parameters - ---------- - data : iterable - sequence of string values - """ - ... - - def update(self, data): # -> None: - """ - Map new values to integer identifiers. - - Parameters - ---------- - data : iterable of str or bytes - - Raises - ------ - TypeError - If elements in *data* are neither str nor bytes. - """ - ... - - - diff --git a/typings/matplotlib/cbook.pyi b/typings/matplotlib/cbook.pyi deleted file mode 100644 index 5140241..0000000 --- a/typings/matplotlib/cbook.pyi +++ /dev/null @@ -1,236 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import collections.abc -import contextlib -import os -import numpy as np -from collections.abc import Callable, Collection, Generator, Iterable, Iterator -from matplotlib.artist import Artist -from numpy.typing import ArrayLike -from typing import Any, Generic, IO, Literal, TypeVar, overload - -_T = TypeVar("_T") -class CallbackRegistry: - exception_handler: Callable[[Exception], Any] - callbacks: dict[Any, dict[int, Any]] - def __init__(self, exception_handler: Callable[[Exception], Any] | None = ..., *, signals: Iterable[Any] | None = ...) -> None: - ... - - def connect(self, signal: Any, func: Callable) -> int: - ... - - def disconnect(self, cid: int) -> None: - ... - - def process(self, s: Any, *args, **kwargs) -> None: - ... - - def blocked(self, *, signal: Any | None = ...) -> contextlib.AbstractContextManager[None]: - ... - - - -class silent_list(list[_T]): - type: str | None - def __init__(self, type: str | None, seq: Iterable[_T] | None = ...) -> None: - ... - - - -def strip_math(s: str) -> str: - ... - -def is_writable_file_like(obj: Any) -> bool: - ... - -def file_requires_unicode(x: Any) -> bool: - ... - -@overload -def to_filehandle(fname: str | os.PathLike | IO, flag: str = ..., return_opened: Literal[False] = ..., encoding: str | None = ...) -> IO: - ... - -@overload -def to_filehandle(fname: str | os.PathLike | IO, flag: str, return_opened: Literal[True], encoding: str | None = ...) -> tuple[IO, bool]: - ... - -@overload -def to_filehandle(fname: str | os.PathLike | IO, *, return_opened: Literal[True], encoding: str | None = ...) -> tuple[IO, bool]: - ... - -def open_file_cm(path_or_file: str | os.PathLike | IO, mode: str = ..., encoding: str | None = ...) -> contextlib.AbstractContextManager[IO]: - ... - -def is_scalar_or_string(val: Any) -> bool: - ... - -@overload -def get_sample_data(fname: str | os.PathLike, asfileobj: Literal[True] = ..., *, np_load: Literal[True]) -> np.ndarray: - ... - -@overload -def get_sample_data(fname: str | os.PathLike, asfileobj: Literal[True] = ..., *, np_load: Literal[False] = ...) -> IO: - ... - -@overload -def get_sample_data(fname: str | os.PathLike, asfileobj: Literal[False], *, np_load: bool = ...) -> str: - ... - -def flatten(seq: Iterable[Any], scalarp: Callable[[Any], bool] = ...) -> Generator[Any, None, None]: - ... - -class Stack(Generic[_T]): - def __init__(self, default: _T | None = ...) -> None: - ... - - def __call__(self) -> _T: - ... - - def __len__(self) -> int: - ... - - def __getitem__(self, ind: int) -> _T: - ... - - def forward(self) -> _T: - ... - - def back(self) -> _T: - ... - - def push(self, o: _T) -> _T: - ... - - def home(self) -> _T: - ... - - def empty(self) -> bool: - ... - - def clear(self) -> None: - ... - - def bubble(self, o: _T) -> _T: - ... - - def remove(self, o: _T) -> None: - ... - - - -def safe_masked_invalid(x: ArrayLike, copy: bool = ...) -> np.ndarray: - ... - -def print_cycles(objects: Iterable[Any], outstream: IO = ..., show_progress: bool = ...) -> None: - ... - -class Grouper(Generic[_T]): - def __init__(self, init: Iterable[_T] = ...) -> None: - ... - - def __contains__(self, item: _T) -> bool: - ... - - def clean(self) -> None: - ... - - def join(self, a: _T, *args: _T) -> None: - ... - - def joined(self, a: _T, b: _T) -> bool: - ... - - def remove(self, a: _T) -> None: - ... - - def __iter__(self) -> Iterator[list[_T]]: - ... - - def get_siblings(self, a: _T) -> list[_T]: - ... - - - -class GrouperView(Generic[_T]): - def __init__(self, grouper: Grouper[_T]) -> None: - ... - - def __contains__(self, item: _T) -> bool: - ... - - def __iter__(self) -> Iterator[list[_T]]: - ... - - def joined(self, a: _T, b: _T) -> bool: - ... - - def get_siblings(self, a: _T) -> list[_T]: - ... - - - -def simple_linear_interpolation(a: ArrayLike, steps: int) -> np.ndarray: - ... - -def delete_masked_points(*args): - ... - -def boxplot_stats(X: ArrayLike, whis: float | tuple[float, float] = ..., bootstrap: int | None = ..., labels: ArrayLike | None = ..., autorange: bool = ...) -> list[dict[str, Any]]: - ... - -ls_mapper: dict[str, str] -ls_mapper_r: dict[str, str] -def contiguous_regions(mask: ArrayLike) -> list[np.ndarray]: - ... - -def is_math_text(s: str) -> bool: - ... - -def violin_stats(X: ArrayLike, method: Callable, points: int = ..., quantiles: ArrayLike | None = ...) -> list[dict[str, Any]]: - ... - -def pts_to_prestep(x: ArrayLike, *args: ArrayLike) -> np.ndarray: - ... - -def pts_to_poststep(x: ArrayLike, *args: ArrayLike) -> np.ndarray: - ... - -def pts_to_midstep(x: np.ndarray, *args: np.ndarray) -> np.ndarray: - ... - -STEP_LOOKUP_MAP: dict[str, Callable] -def index_of(y: float | ArrayLike) -> tuple[np.ndarray, np.ndarray]: - ... - -def safe_first_element(obj: Collection[_T]) -> _T: - ... - -def sanitize_sequence(data): - ... - -def normalize_kwargs(kw: dict[str, Any], alias_mapping: dict[str, list[str]] | type[Artist] | Artist | None = ...) -> dict[str, Any]: - ... - -class _OrderedSet(collections.abc.MutableSet): - def __init__(self) -> None: - ... - - def __contains__(self, key) -> bool: - ... - - def __iter__(self): - ... - - def __len__(self) -> int: - ... - - def add(self, key) -> None: - ... - - def discard(self, key) -> None: - ... - - - diff --git a/typings/matplotlib/cm.pyi b/typings/matplotlib/cm.pyi deleted file mode 100644 index 92de619..0000000 --- a/typings/matplotlib/cm.pyi +++ /dev/null @@ -1,94 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from collections.abc import Iterator, Mapping -from matplotlib import cbook, colors -from matplotlib.colorbar import Colorbar -from numpy.typing import ArrayLike - -class ColormapRegistry(Mapping[str, colors.Colormap]): - def __init__(self, cmaps: Mapping[str, colors.Colormap]) -> None: - ... - - def __getitem__(self, item: str) -> colors.Colormap: - ... - - def __iter__(self) -> Iterator[str]: - ... - - def __len__(self) -> int: - ... - - def __call__(self) -> list[str]: - ... - - def register(self, cmap: colors.Colormap, *, name: str | None = ..., force: bool = ...) -> None: - ... - - def unregister(self, name: str) -> None: - ... - - def get_cmap(self, cmap: str | colors.Colormap) -> colors.Colormap: - ... - - - -_colormaps: ColormapRegistry = ... -def get_cmap(name: str | colors.Colormap | None = ..., lut: int | None = ...) -> colors.Colormap: - ... - -class ScalarMappable: - cmap: colors.Colormap | None - colorbar: Colorbar | None - callbacks: cbook.CallbackRegistry - def __init__(self, norm: colors.Normalize | None = ..., cmap: str | colors.Colormap | None = ...) -> None: - ... - - def to_rgba(self, x: np.ndarray, alpha: float | ArrayLike | None = ..., bytes: bool = ..., norm: bool = ...) -> np.ndarray: - ... - - def set_array(self, A: ArrayLike | None) -> None: - ... - - def get_array(self) -> np.ndarray | None: - ... - - def get_cmap(self) -> colors.Colormap: - ... - - def get_clim(self) -> tuple[float, float]: - ... - - def set_clim(self, vmin: float | tuple[float, float] | None = ..., vmax: float | None = ...) -> None: - ... - - def get_alpha(self) -> float | None: - ... - - def set_cmap(self, cmap: str | colors.Colormap) -> None: - ... - - @property - def norm(self) -> colors.Normalize: - ... - - @norm.setter - def norm(self, norm: colors.Normalize | str | None) -> None: - ... - - def set_norm(self, norm: colors.Normalize | str | None) -> None: - ... - - def autoscale(self) -> None: - ... - - def autoscale_None(self) -> None: - ... - - def changed(self) -> None: - ... - - - diff --git a/typings/matplotlib/collections.pyi b/typings/matplotlib/collections.pyi deleted file mode 100644 index 15fd65b..0000000 --- a/typings/matplotlib/collections.pyi +++ /dev/null @@ -1,362 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from collections.abc import Callable, Iterable, Sequence -from typing import Literal -from numpy.typing import ArrayLike, NDArray -from . import artist, cm, transforms -from .backend_bases import MouseEvent -from .artist import Artist -from .colors import Colormap, Normalize -from .lines import Line2D -from .path import Path -from .patches import Patch -from .ticker import Formatter, Locator -from .tri import Triangulation -from .typing import CapStyleType, ColorType, JoinStyleType, LineStyleType - -class Collection(artist.Artist, cm.ScalarMappable): - def __init__(self, *, edgecolors: ColorType | Sequence[ColorType] | None = ..., facecolors: ColorType | Sequence[ColorType] | None = ..., linewidths: float | Sequence[float] | None = ..., linestyles: LineStyleType | Sequence[LineStyleType] = ..., capstyle: CapStyleType | None = ..., joinstyle: JoinStyleType | None = ..., antialiaseds: bool | Sequence[bool] | None = ..., offsets: tuple[float, float] | Sequence[tuple[float, float]] | None = ..., offset_transform: transforms.Transform | None = ..., norm: Normalize | None = ..., cmap: Colormap | None = ..., pickradius: float = ..., hatch: str | None = ..., urls: Sequence[str] | None = ..., zorder: float = ..., **kwargs) -> None: - ... - - def get_paths(self) -> Sequence[Path]: - ... - - def set_paths(self, paths: Sequence[Path]) -> None: - ... - - def get_transforms(self) -> Sequence[transforms.Transform]: - ... - - def get_offset_transform(self) -> transforms.Transform: - ... - - def set_offset_transform(self, offset_transform: transforms.Transform) -> None: - ... - - def get_datalim(self, transData: transforms.Transform) -> transforms.Bbox: - ... - - def set_pickradius(self, pickradius: float) -> None: - ... - - def get_pickradius(self) -> float: - ... - - def set_urls(self, urls: Sequence[str | None]) -> None: - ... - - def get_urls(self) -> Sequence[str | None]: - ... - - def set_hatch(self, hatch: str) -> None: - ... - - def get_hatch(self) -> str: - ... - - def set_offsets(self, offsets: ArrayLike) -> None: - ... - - def get_offsets(self) -> ArrayLike: - ... - - def set_linewidth(self, lw: float | Sequence[float]) -> None: - ... - - def set_linestyle(self, ls: LineStyleType | Sequence[LineStyleType]) -> None: - ... - - def set_capstyle(self, cs: CapStyleType) -> None: - ... - - def get_capstyle(self) -> Literal["butt", "projecting", "round"] | None: - ... - - def set_joinstyle(self, js: JoinStyleType) -> None: - ... - - def get_joinstyle(self) -> Literal["miter", "round", "bevel"] | None: - ... - - def set_antialiased(self, aa: bool | Sequence[bool]) -> None: - ... - - def get_antialiased(self) -> NDArray[np.bool_]: - ... - - def set_color(self, c: ColorType | Sequence[ColorType]) -> None: - ... - - def set_facecolor(self, c: ColorType | Sequence[ColorType]) -> None: - ... - - def get_facecolor(self) -> ColorType | Sequence[ColorType]: - ... - - def get_edgecolor(self) -> ColorType | Sequence[ColorType]: - ... - - def set_edgecolor(self, c: ColorType | Sequence[ColorType]) -> None: - ... - - def set_alpha(self, alpha: float | Sequence[float] | None) -> None: - ... - - def get_linewidth(self) -> float | Sequence[float]: - ... - - def get_linestyle(self) -> LineStyleType | Sequence[LineStyleType]: - ... - - def update_scalarmappable(self) -> None: - ... - - def get_fill(self) -> bool: - ... - - def update_from(self, other: Artist) -> None: - ... - - - -class _CollectionWithSizes(Collection): - def get_sizes(self) -> np.ndarray: - ... - - def set_sizes(self, sizes: ArrayLike | None, dpi: float = ...) -> None: - ... - - - -class PathCollection(_CollectionWithSizes): - def __init__(self, paths: Sequence[Path], sizes: ArrayLike | None = ..., **kwargs) -> None: - ... - - def set_paths(self, paths: Sequence[Path]) -> None: - ... - - def get_paths(self) -> Sequence[Path]: - ... - - def legend_elements(self, prop: Literal["colors", "sizes"] = ..., num: int | Literal["auto"] | ArrayLike | Locator = ..., fmt: str | Formatter | None = ..., func: Callable[[ArrayLike], ArrayLike] = ..., **kwargs) -> tuple[list[Line2D], list[str]]: - ... - - - -class PolyCollection(_CollectionWithSizes): - def __init__(self, verts: Sequence[ArrayLike], sizes: ArrayLike | None = ..., *, closed: bool = ..., **kwargs) -> None: - ... - - def set_verts(self, verts: Sequence[ArrayLike | Path], closed: bool = ...) -> None: - ... - - def set_paths(self, verts: Sequence[Path], closed: bool = ...) -> None: - ... - - def set_verts_and_codes(self, verts: Sequence[ArrayLike | Path], codes: Sequence[int]) -> None: - ... - - - -class BrokenBarHCollection(PolyCollection): - def __init__(self, xranges: Iterable[tuple[float, float]], yrange: tuple[float, float], **kwargs) -> None: - ... - - @classmethod - def span_where(cls, x: ArrayLike, ymin: float, ymax: float, where: ArrayLike, **kwargs) -> BrokenBarHCollection: - ... - - - -class RegularPolyCollection(_CollectionWithSizes): - def __init__(self, numsides: int, *, rotation: float = ..., sizes: ArrayLike = ..., **kwargs) -> None: - ... - - def get_numsides(self) -> int: - ... - - def get_rotation(self) -> float: - ... - - - -class StarPolygonCollection(RegularPolyCollection): - ... - - -class AsteriskPolygonCollection(RegularPolyCollection): - ... - - -class LineCollection(Collection): - def __init__(self, segments: Sequence[ArrayLike], *, zorder: float = ..., **kwargs) -> None: - ... - - def set_segments(self, segments: Sequence[ArrayLike] | None) -> None: - ... - - def set_verts(self, segments: Sequence[ArrayLike] | None) -> None: - ... - - def set_paths(self, segments: Sequence[ArrayLike] | None) -> None: - ... - - def get_segments(self) -> list[np.ndarray]: - ... - - def set_color(self, c: ColorType | Sequence[ColorType]) -> None: - ... - - def set_colors(self, c: ColorType | Sequence[ColorType]) -> None: - ... - - def set_gapcolor(self, gapcolor: ColorType | Sequence[ColorType] | None) -> None: - ... - - def get_color(self) -> ColorType | Sequence[ColorType]: - ... - - def get_colors(self) -> ColorType | Sequence[ColorType]: - ... - - def get_gapcolor(self) -> ColorType | Sequence[ColorType] | None: - ... - - - -class EventCollection(LineCollection): - def __init__(self, positions: ArrayLike, orientation: Literal["horizontal", "vertical"] = ..., *, lineoffset: float = ..., linelength: float = ..., linewidth: float | Sequence[float] | None = ..., color: ColorType | Sequence[ColorType] | None = ..., linestyle: LineStyleType | Sequence[LineStyleType] = ..., antialiased: bool | Sequence[bool] | None = ..., **kwargs) -> None: - ... - - def get_positions(self) -> list[float]: - ... - - def set_positions(self, positions: Sequence[float] | None) -> None: - ... - - def add_positions(self, position: Sequence[float] | None) -> None: - ... - - def extend_positions(self, position: Sequence[float] | None) -> None: - ... - - def append_positions(self, position: Sequence[float] | None) -> None: - ... - - def is_horizontal(self) -> bool: - ... - - def get_orientation(self) -> Literal["horizontal", "vertical"]: - ... - - def switch_orientation(self) -> None: - ... - - def set_orientation(self, orientation: Literal["horizontal", "vertical"]) -> None: - ... - - def get_linelength(self) -> float | Sequence[float]: - ... - - def set_linelength(self, linelength: float | Sequence[float]) -> None: - ... - - def get_lineoffset(self) -> float: - ... - - def set_lineoffset(self, lineoffset: float) -> None: - ... - - def get_linewidth(self) -> float: - ... - - def get_linewidths(self) -> Sequence[float]: - ... - - def get_color(self) -> ColorType: - ... - - - -class CircleCollection(_CollectionWithSizes): - def __init__(self, sizes: float | ArrayLike, **kwargs) -> None: - ... - - - -class EllipseCollection(Collection): - def __init__(self, widths: ArrayLike, heights: ArrayLike, angles: ArrayLike, *, units: Literal["points", "inches", "dots", "width", "height", "x", "y", "xy"] = ..., **kwargs) -> None: - ... - - - -class PatchCollection(Collection): - def __init__(self, patches: Iterable[Patch], *, match_original: bool = ..., **kwargs) -> None: - ... - - def set_paths(self, patches: Iterable[Patch]) -> None: - ... - - - -class TriMesh(Collection): - def __init__(self, triangulation: Triangulation, **kwargs) -> None: - ... - - def get_paths(self) -> list[Path]: - ... - - def set_paths(self) -> None: - ... - - @staticmethod - def convert_mesh_to_paths(tri: Triangulation) -> list[Path]: - ... - - - -class _MeshData: - def __init__(self, coordinates: ArrayLike, *, shading: Literal["flat", "gouraud"] = ...) -> None: - ... - - def set_array(self, A: ArrayLike | None) -> None: - ... - - def get_coordinates(self) -> ArrayLike: - ... - - def get_facecolor(self) -> ColorType | Sequence[ColorType]: - ... - - def get_edgecolor(self) -> ColorType | Sequence[ColorType]: - ... - - - -class QuadMesh(_MeshData, Collection): - def __init__(self, coordinates: ArrayLike, *, antialiased: bool = ..., shading: Literal["flat", "gouraud"] = ..., **kwargs) -> None: - ... - - def get_paths(self) -> list[Path]: - ... - - def set_paths(self) -> None: - ... - - def get_datalim(self, transData: transforms.Transform) -> transforms.Bbox: - ... - - def get_cursor_data(self, event: MouseEvent) -> float: - ... - - - -class PolyQuadMesh(_MeshData, PolyCollection): - def __init__(self, coordinates: ArrayLike, **kwargs) -> None: - ... - - - diff --git a/typings/matplotlib/colorbar.pyi b/typings/matplotlib/colorbar.pyi deleted file mode 100644 index b85de94..0000000 --- a/typings/matplotlib/colorbar.pyi +++ /dev/null @@ -1,138 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib.spines as mspines -import numpy as np -from matplotlib import cm, collections, colors, contour -from matplotlib.axes import Axes -from matplotlib.backend_bases import RendererBase -from matplotlib.patches import Patch -from matplotlib.ticker import Formatter, Locator -from matplotlib.transforms import Bbox -from numpy.typing import ArrayLike -from collections.abc import Sequence -from typing import Any, Literal, overload -from .typing import ColorType - -class _ColorbarSpine(mspines.Spines): - def __init__(self, axes: Axes) -> None: - ... - - def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - def set_xy(self, xy: ArrayLike) -> None: - ... - - def draw(self, renderer: RendererBase | None) -> None: - ... - - - -class Colorbar: - n_rasterize: int - mappable: cm.ScalarMappable - ax: Axes - alpha: float | None - cmap: colors.Colormap - norm: colors.Normalize - values: Sequence[float] | None - boundaries: Sequence[float] | None - extend: Literal["neither", "both", "min", "max"] - spacing: Literal["uniform", "proportional"] - orientation: Literal["vertical", "horizontal"] - drawedges: bool - extendfrac: Literal["auto"] | float | Sequence[float] | None - extendrect: bool - solids: None | collections.QuadMesh - solids_patches: list[Patch] - lines: list[collections.LineCollection] - outline: _ColorbarSpine - dividers: collections.LineCollection - ticklocation: Literal["left", "right", "top", "bottom"] - def __init__(self, ax: Axes, mappable: cm.ScalarMappable | None = ..., *, cmap: str | colors.Colormap | None = ..., norm: colors.Normalize | None = ..., alpha: float | None = ..., values: Sequence[float] | None = ..., boundaries: Sequence[float] | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., ticklocation: Literal["auto", "left", "right", "top", "bottom"] = ..., extend: Literal["neither", "both", "min", "max"] | None = ..., spacing: Literal["uniform", "proportional"] = ..., ticks: Sequence[float] | Locator | None = ..., format: str | Formatter | None = ..., drawedges: bool = ..., extendfrac: Literal["auto"] | float | Sequence[float] | None = ..., extendrect: bool = ..., label: str = ..., location: Literal["left", "right", "top", "bottom"] | None = ...) -> None: - ... - - @property - def locator(self) -> Locator: - ... - - @locator.setter - def locator(self, loc: Locator) -> None: - ... - - @property - def minorlocator(self) -> Locator: - ... - - @minorlocator.setter - def minorlocator(self, loc: Locator) -> None: - ... - - @property - def formatter(self) -> Formatter: - ... - - @formatter.setter - def formatter(self, fmt: Formatter) -> None: - ... - - @property - def minorformatter(self) -> Formatter: - ... - - @minorformatter.setter - def minorformatter(self, fmt: Formatter) -> None: - ... - - def update_normal(self, mappable: cm.ScalarMappable) -> None: - ... - - @overload - def add_lines(self, CS: contour.ContourSet, erase: bool = ...) -> None: - ... - - @overload - def add_lines(self, levels: ArrayLike, colors: ColorType | Sequence[ColorType], linewidths: float | ArrayLike, erase: bool = ...) -> None: - ... - - def update_ticks(self) -> None: - ... - - def set_ticks(self, ticks: Sequence[float] | Locator, *, labels: Sequence[str] | None = ..., minor: bool = ..., **kwargs) -> None: - ... - - def get_ticks(self, minor: bool = ...) -> np.ndarray: - ... - - def set_ticklabels(self, ticklabels: Sequence[str], *, minor: bool = ..., **kwargs) -> None: - ... - - def minorticks_on(self) -> None: - ... - - def minorticks_off(self) -> None: - ... - - def set_label(self, label: str, *, loc: str | None = ..., **kwargs) -> None: - ... - - def set_alpha(self, alpha: float | np.ndarray) -> None: - ... - - def remove(self) -> None: - ... - - def drag_pan(self, button: Any, key: Any, x: float, y: float) -> None: - ... - - - -ColorbarBase = Colorbar -def make_axes(parents: Axes | list[Axes] | np.ndarray, location: Literal["left", "right", "top", "bottom"] | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., fraction: float = ..., shrink: float = ..., aspect: float = ..., **kwargs) -> tuple[Axes, dict[str, Any]]: - ... - -def make_axes_gridspec(parent: Axes, *, location: Literal["left", "right", "top", "bottom"] | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., fraction: float = ..., shrink: float = ..., aspect: float = ..., **kwargs) -> tuple[Axes, dict[str, Any]]: - ... - diff --git a/typings/matplotlib/colors.pyi b/typings/matplotlib/colors.pyi deleted file mode 100644 index 8eae2eb..0000000 --- a/typings/matplotlib/colors.pyi +++ /dev/null @@ -1,411 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import re -import numpy as np -from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence -from matplotlib import cbook, scale -from typing import Any, Literal, overload -from .typing import ColorType -from numpy.typing import ArrayLike - -BASE_COLORS: dict[str, ColorType] -CSS4_COLORS: dict[str, ColorType] -TABLEAU_COLORS: dict[str, ColorType] -XKCD_COLORS: dict[str, ColorType] -class _ColorMapping(dict[str, ColorType]): - cache: dict[tuple[ColorType, float | None], tuple[float, float, float, float]] - def __init__(self, mapping) -> None: - ... - - def __setitem__(self, key, value) -> None: - ... - - def __delitem__(self, key) -> None: - ... - - - -def get_named_colors_mapping() -> _ColorMapping: - ... - -class ColorSequenceRegistry(Mapping): - def __init__(self) -> None: - ... - - def __getitem__(self, item: str) -> list[ColorType]: - ... - - def __iter__(self) -> Iterator[str]: - ... - - def __len__(self) -> int: - ... - - def register(self, name: str, color_list: Iterable[ColorType]) -> None: - ... - - def unregister(self, name: str) -> None: - ... - - - -_color_sequences: ColorSequenceRegistry = ... -def is_color_like(c: Any) -> bool: - ... - -def same_color(c1: ColorType, c2: ColorType) -> bool: - ... - -def to_rgba(c: ColorType, alpha: float | None = ...) -> tuple[float, float, float, float]: - ... - -def to_rgba_array(c: ColorType | ArrayLike, alpha: float | ArrayLike | None = ...) -> np.ndarray: - ... - -def to_rgb(c: ColorType) -> tuple[float, float, float]: - ... - -def to_hex(c: ColorType, keep_alpha: bool = ...) -> str: - ... - -cnames: dict[str, ColorType] -hexColorPattern: re.Pattern -rgb2hex = ... -hex2color = ... -class ColorConverter: - colors: _ColorMapping - cache: dict[tuple[ColorType, float | None], tuple[float, float, float, float]] - @staticmethod - def to_rgb(c: ColorType) -> tuple[float, float, float]: - ... - - @staticmethod - def to_rgba(c: ColorType, alpha: float | None = ...) -> tuple[float, float, float, float]: - ... - - @staticmethod - def to_rgba_array(c: ColorType | ArrayLike, alpha: float | ArrayLike | None = ...) -> np.ndarray: - ... - - - -colorConverter: ColorConverter -class Colormap: - name: str - N: int - colorbar_extend: bool - def __init__(self, name: str, N: int = ...) -> None: - ... - - @overload - def __call__(self, X: Sequence[float] | np.ndarray, alpha: ArrayLike | None = ..., bytes: bool = ...) -> np.ndarray: - ... - - @overload - def __call__(self, X: float, alpha: float | None = ..., bytes: bool = ...) -> tuple[float, float, float, float]: - ... - - @overload - def __call__(self, X: ArrayLike, alpha: ArrayLike | None = ..., bytes: bool = ...) -> tuple[float, float, float, float] | np.ndarray: - ... - - def __copy__(self) -> Colormap: - ... - - def __eq__(self, other: object) -> bool: - ... - - def get_bad(self) -> np.ndarray: - ... - - def set_bad(self, color: ColorType = ..., alpha: float | None = ...) -> None: - ... - - def get_under(self) -> np.ndarray: - ... - - def set_under(self, color: ColorType = ..., alpha: float | None = ...) -> None: - ... - - def get_over(self) -> np.ndarray: - ... - - def set_over(self, color: ColorType = ..., alpha: float | None = ...) -> None: - ... - - def set_extremes(self, *, bad: ColorType | None = ..., under: ColorType | None = ..., over: ColorType | None = ...) -> None: - ... - - def with_extremes(self, *, bad: ColorType | None = ..., under: ColorType | None = ..., over: ColorType | None = ...) -> Colormap: - ... - - def is_gray(self) -> bool: - ... - - def resampled(self, lutsize: int) -> Colormap: - ... - - def reversed(self, name: str | None = ...) -> Colormap: - ... - - def copy(self) -> Colormap: - ... - - - -class LinearSegmentedColormap(Colormap): - monochrome: bool - def __init__(self, name: str, segmentdata: dict[Literal["red", "green", "blue", "alpha"], Sequence[tuple[float, ...]]], N: int = ..., gamma: float = ...) -> None: - ... - - def set_gamma(self, gamma: float) -> None: - ... - - @staticmethod - def from_list(name: str, colors: ArrayLike, N: int = ..., gamma: float = ...) -> LinearSegmentedColormap: - ... - - def resampled(self, lutsize: int) -> LinearSegmentedColormap: - ... - - def reversed(self, name: str | None = ...) -> LinearSegmentedColormap: - ... - - - -class ListedColormap(Colormap): - monochrome: bool - colors: ArrayLike | ColorType - def __init__(self, colors: ArrayLike | ColorType, name: str = ..., N: int | None = ...) -> None: - ... - - def resampled(self, lutsize: int) -> ListedColormap: - ... - - def reversed(self, name: str | None = ...) -> ListedColormap: - ... - - - -class Normalize: - callbacks: cbook.CallbackRegistry - def __init__(self, vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None: - ... - - @property - def vmin(self) -> float | None: - ... - - @vmin.setter - def vmin(self, value: float | None) -> None: - ... - - @property - def vmax(self) -> float | None: - ... - - @vmax.setter - def vmax(self, value: float | None) -> None: - ... - - @property - def clip(self) -> bool: - ... - - @clip.setter - def clip(self, value: bool) -> None: - ... - - @staticmethod - def process_value(value: ArrayLike) -> tuple[np.ma.MaskedArray, bool]: - ... - - @overload - def __call__(self, value: float, clip: bool | None = ...) -> float: - ... - - @overload - def __call__(self, value: np.ndarray, clip: bool | None = ...) -> np.ma.MaskedArray: - ... - - @overload - def __call__(self, value: ArrayLike, clip: bool | None = ...) -> ArrayLike: - ... - - @overload - def inverse(self, value: float) -> float: - ... - - @overload - def inverse(self, value: np.ndarray) -> np.ma.MaskedArray: - ... - - @overload - def inverse(self, value: ArrayLike) -> ArrayLike: - ... - - def autoscale(self, A: ArrayLike) -> None: - ... - - def autoscale_None(self, A: ArrayLike) -> None: - ... - - def scaled(self) -> bool: - ... - - - -class TwoSlopeNorm(Normalize): - def __init__(self, vcenter: float, vmin: float | None = ..., vmax: float | None = ...) -> None: - ... - - @property - def vcenter(self) -> float: - ... - - @vcenter.setter - def vcenter(self, value: float) -> None: - ... - - def autoscale_None(self, A: ArrayLike) -> None: - ... - - - -class CenteredNorm(Normalize): - def __init__(self, vcenter: float = ..., halfrange: float | None = ..., clip: bool = ...) -> None: - ... - - @property - def vcenter(self) -> float: - ... - - @vcenter.setter - def vcenter(self, vcenter: float) -> None: - ... - - @property - def halfrange(self) -> float: - ... - - @halfrange.setter - def halfrange(self, halfrange: float) -> None: - ... - - - -@overload -def make_norm_from_scale(scale_cls: type[scale.ScaleBase], base_norm_cls: type[Normalize], *, init: Callable | None = ...) -> type[Normalize]: - ... - -@overload -def make_norm_from_scale(scale_cls: type[scale.ScaleBase], base_norm_cls: None = ..., *, init: Callable | None = ...) -> Callable[[type[Normalize]], type[Normalize]]: - ... - -class FuncNorm(Normalize): - def __init__(self, functions: tuple[Callable, Callable], vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None: - ... - - - -class LogNorm(Normalize): - ... - - -class SymLogNorm(Normalize): - def __init__(self, linthresh: float, linscale: float = ..., vmin: float | None = ..., vmax: float | None = ..., clip: bool = ..., *, base: float = ...) -> None: - ... - - @property - def linthresh(self) -> float: - ... - - @linthresh.setter - def linthresh(self, value: float) -> None: - ... - - - -class AsinhNorm(Normalize): - def __init__(self, linear_width: float = ..., vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None: - ... - - @property - def linear_width(self) -> float: - ... - - @linear_width.setter - def linear_width(self, value: float) -> None: - ... - - - -class PowerNorm(Normalize): - gamma: float - def __init__(self, gamma: float, vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None: - ... - - - -class BoundaryNorm(Normalize): - boundaries: np.ndarray - N: int - Ncmap: int - extend: Literal["neither", "both", "min", "max"] - def __init__(self, boundaries: ArrayLike, ncolors: int, clip: bool = ..., *, extend: Literal["neither", "both", "min", "max"] = ...) -> None: - ... - - - -class NoNorm(Normalize): - ... - - -def rgb_to_hsv(arr: ArrayLike) -> np.ndarray: - ... - -def hsv_to_rgb(hsv: ArrayLike) -> np.ndarray: - ... - -class LightSource: - azdeg: float - altdeg: float - hsv_min_val: float - hsv_max_val: float - hsv_min_sat: float - hsv_max_sat: float - def __init__(self, azdeg: float = ..., altdeg: float = ..., hsv_min_val: float = ..., hsv_max_val: float = ..., hsv_min_sat: float = ..., hsv_max_sat: float = ...) -> None: - ... - - @property - def direction(self) -> np.ndarray: - ... - - def hillshade(self, elevation: ArrayLike, vert_exag: float = ..., dx: float = ..., dy: float = ..., fraction: float = ...) -> np.ndarray: - ... - - def shade_normals(self, normals: np.ndarray, fraction: float = ...) -> np.ndarray: - ... - - def shade(self, data: ArrayLike, cmap: Colormap, norm: Normalize | None = ..., blend_mode: Literal["hsv", "overlay", "soft"] | Callable = ..., vmin: float | None = ..., vmax: float | None = ..., vert_exag: float = ..., dx: float = ..., dy: float = ..., fraction: float = ..., **kwargs) -> np.ndarray: - ... - - def shade_rgb(self, rgb: ArrayLike, elevation: ArrayLike, fraction: float = ..., blend_mode: Literal["hsv", "overlay", "soft"] | Callable = ..., vert_exag: float = ..., dx: float = ..., dy: float = ..., **kwargs) -> np.ndarray: - ... - - def blend_hsv(self, rgb: ArrayLike, intensity: ArrayLike, hsv_max_sat: float | None = ..., hsv_max_val: float | None = ..., hsv_min_val: float | None = ..., hsv_min_sat: float | None = ...) -> ArrayLike: - ... - - def blend_soft_light(self, rgb: np.ndarray, intensity: np.ndarray) -> np.ndarray: - ... - - def blend_overlay(self, rgb: np.ndarray, intensity: np.ndarray) -> np.ndarray: - ... - - - -def from_levels_and_colors(levels: Sequence[float], colors: Sequence[ColorType], extend: Literal["neither", "min", "max", "both"] = ...) -> tuple[ListedColormap, BoundaryNorm]: - ... - diff --git a/typings/matplotlib/container.pyi b/typings/matplotlib/container.pyi deleted file mode 100644 index 22f0998..0000000 --- a/typings/matplotlib/container.pyi +++ /dev/null @@ -1,70 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.artist import Artist -from matplotlib.lines import Line2D -from matplotlib.collections import LineCollection -from matplotlib.patches import Rectangle -from collections.abc import Callable -from typing import Any, Literal -from numpy.typing import ArrayLike - -class Container(tuple): - def __new__(cls, *args, **kwargs): - ... - - def __init__(self, kl, label: Any | None = ...) -> None: - ... - - def remove(self) -> None: - ... - - def get_children(self) -> list[Artist]: - ... - - def get_label(self) -> str | None: - ... - - def set_label(self, s: Any) -> None: - ... - - def add_callback(self, func: Callable[[Artist], Any]) -> int: - ... - - def remove_callback(self, oid: int) -> None: - ... - - def pchanged(self) -> None: - ... - - - -class BarContainer(Container): - patches: list[Rectangle] - errorbar: None | ErrorbarContainer - datavalues: None | ArrayLike - orientation: None | Literal["vertical", "horizontal"] - def __init__(self, patches: list[Rectangle], errorbar: ErrorbarContainer | None = ..., *, datavalues: ArrayLike | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., **kwargs) -> None: - ... - - - -class ErrorbarContainer(Container): - lines: tuple[Line2D, Line2D, LineCollection] - has_xerr: bool - has_yerr: bool - def __init__(self, lines: tuple[Line2D, Line2D, LineCollection], has_xerr: bool = ..., has_yerr: bool = ..., **kwargs) -> None: - ... - - - -class StemContainer(Container): - markerline: Line2D - stemlines: LineCollection - baseline: Line2D - def __init__(self, markerline_stemlines_baseline: tuple[Line2D, LineCollection, Line2D], **kwargs) -> None: - ... - - - diff --git a/typings/matplotlib/contour.pyi b/typings/matplotlib/contour.pyi deleted file mode 100644 index 7bb98d3..0000000 --- a/typings/matplotlib/contour.pyi +++ /dev/null @@ -1,142 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib.cm as cm -import numpy as np -from matplotlib.artist import Artist -from matplotlib.axes import Axes -from matplotlib.collections import Collection, PathCollection -from matplotlib.colors import Colormap, Normalize -from matplotlib.font_manager import FontProperties -from matplotlib.path import Path -from matplotlib.patches import Patch -from matplotlib.text import Text -from matplotlib.transforms import Transform, TransformedPatchPath, TransformedPath -from matplotlib.ticker import Formatter, Locator -from numpy.typing import ArrayLike -from collections.abc import Callable, Iterable, Sequence -from typing import Literal -from .typing import ColorType - -class ClabelText(Text): - ... - - -class ContourLabeler: - labelFmt: str | Formatter | Callable[[float], str] | dict[float, str] - labelManual: bool | Iterable[tuple[float, float]] - rightside_up: bool - labelLevelList: list[float] - labelIndiceList: list[int] - labelMappable: cm.ScalarMappable - labelCValueList: list[ColorType] - labelXYs: list[tuple[float, float]] - def clabel(self, levels: ArrayLike | None = ..., *, fontsize: str | float | None = ..., inline: bool = ..., inline_spacing: float = ..., fmt: str | Formatter | Callable[[float], str] | dict[float, str] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., use_clabeltext: bool = ..., manual: bool | Iterable[tuple[float, float]] = ..., rightside_up: bool = ..., zorder: float | None = ...) -> list[Text]: - ... - - @property - def labelFontProps(self) -> FontProperties: - ... - - @property - def labelFontSizeList(self) -> list[float]: - ... - - @property - def labelTextsList(self) -> list[Text]: - ... - - def print_label(self, linecontour: ArrayLike, labelwidth: float) -> bool: - ... - - def too_close(self, x: float, y: float, lw: float) -> bool: - ... - - def set_label_props(self, label: Text, text: str, color: ColorType) -> None: - ... - - def get_text(self, lev: float, fmt: str | Formatter | Callable[[float], str] | dict[float, str]) -> str: - ... - - def locate_label(self, linecontour: ArrayLike, labelwidth: float) -> tuple[float, float, float]: - ... - - def calc_label_rot_and_inline(self, slc: ArrayLike, ind: int, lw: float, lc: ArrayLike | None = ..., spacing: int = ...) -> tuple[float, list[ArrayLike]]: - ... - - def add_label(self, x: float, y: float, rotation: float, lev: float, cvalue: ColorType) -> None: - ... - - def add_label_clabeltext(self, x: float, y: float, rotation: float, lev: float, cvalue: ColorType) -> None: - ... - - def add_label_near(self, x: float, y: float, inline: bool = ..., inline_spacing: int = ..., transform: Transform | Literal[False] | None = ...) -> None: - ... - - def pop_label(self, index: int = ...) -> None: - ... - - def labels(self, inline: bool, inline_spacing: int) -> None: - ... - - def remove(self) -> None: - ... - - - -class ContourSet(ContourLabeler, Collection): - axes: Axes - levels: Iterable[float] - filled: bool - linewidths: float | ArrayLike | None - hatches: Iterable[str | None] - origin: Literal["upper", "lower", "image"] | None - extent: tuple[float, float, float, float] | None - colors: ColorType | Sequence[ColorType] - extend: Literal["neither", "both", "min", "max"] - nchunk: int - locator: Locator | None - logscale: bool - negative_linestyles: None | Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]] - clip_path: Patch | Path | TransformedPath | TransformedPatchPath | None - labelTexts: list[Text] - labelCValues: list[ColorType] - allkinds: list[np.ndarray] - tcolors: list[tuple[float, float, float, float]] - tlinewidths: list[tuple[float]] - @property - def alpha(self) -> float | None: - ... - - @property - def antialiased(self) -> bool: - ... - - @antialiased.setter - def antialiased(self, aa: bool | Sequence[bool]) -> None: - ... - - @property - def collections(self) -> list[PathCollection]: - ... - - @property - def linestyles(self) -> (None | Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]]): - ... - - def __init__(self, ax: Axes, *args, levels: Iterable[float] | None = ..., filled: bool = ..., linewidths: float | ArrayLike | None = ..., linestyles: Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]] | None = ..., hatches: Iterable[str | None] = ..., alpha: float | None = ..., origin: Literal["upper", "lower", "image"] | None = ..., extent: tuple[float, float, float, float] | None = ..., cmap: str | Colormap | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., extend: Literal["neither", "both", "min", "max"] = ..., antialiased: bool | None = ..., nchunk: int = ..., locator: Locator | None = ..., transform: Transform | None = ..., negative_linestyles: Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]] | None = ..., clip_path: Patch | Path | TransformedPath | TransformedPatchPath | None = ..., **kwargs) -> None: - ... - - def legend_elements(self, variable_name: str = ..., str_format: Callable[[float], str] = ...) -> tuple[list[Artist], list[str]]: - ... - - def find_nearest_contour(self, x: float, y: float, indices: Iterable[int] | None = ..., pixel: bool = ...) -> tuple[Collection, int, int, float, float, float]: - ... - - - -class QuadContourSet(ContourSet): - ... - - diff --git a/typings/matplotlib/dates.pyi b/typings/matplotlib/dates.pyi deleted file mode 100644 index efc837f..0000000 --- a/typings/matplotlib/dates.pyi +++ /dev/null @@ -1,1019 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib import _api, ticker, units - -""" -Matplotlib provides sophisticated date plotting capabilities, standing on the -shoulders of python :mod:`datetime` and the add-on module dateutil_. - -By default, Matplotlib uses the units machinery described in -`~matplotlib.units` to convert `datetime.datetime`, and `numpy.datetime64` -objects when plotted on an x- or y-axis. The user does not -need to do anything for dates to be formatted, but dates often have strict -formatting needs, so this module provides many tick locators and formatters. -A basic example using `numpy.datetime64` is:: - - import numpy as np - - times = np.arange(np.datetime64('2001-01-02'), - np.datetime64('2002-02-03'), np.timedelta64(75, 'm')) - y = np.random.randn(len(times)) - - fig, ax = plt.subplots() - ax.plot(times, y) - -.. seealso:: - - - :doc:`/gallery/text_labels_and_annotations/date` - - :doc:`/gallery/ticks/date_concise_formatter` - - :doc:`/gallery/ticks/date_demo_convert` - -.. _date-format: - -Matplotlib date format ----------------------- - -Matplotlib represents dates using floating point numbers specifying the number -of days since a default epoch of 1970-01-01 UTC; for example, -1970-01-01, 06:00 is the floating point number 0.25. The formatters and -locators require the use of `datetime.datetime` objects, so only dates between -year 0001 and 9999 can be represented. Microsecond precision -is achievable for (approximately) 70 years on either side of the epoch, and -20 microseconds for the rest of the allowable range of dates (year 0001 to -9999). The epoch can be changed at import time via `.dates.set_epoch` or -:rc:`dates.epoch` to other dates if necessary; see -:doc:`/gallery/ticks/date_precision_and_epochs` for a discussion. - -.. note:: - - Before Matplotlib 3.3, the epoch was 0000-12-31 which lost modern - microsecond precision and also made the default axis limit of 0 an invalid - datetime. In 3.3 the epoch was changed as above. To convert old - ordinal floats to the new epoch, users can do:: - - new_ordinal = old_ordinal + mdates.date2num(np.datetime64('0000-12-31')) - - -There are a number of helper functions to convert between :mod:`datetime` -objects and Matplotlib dates: - -.. currentmodule:: matplotlib.dates - -.. autosummary:: - :nosignatures: - - datestr2num - date2num - num2date - num2timedelta - drange - set_epoch - get_epoch - -.. note:: - - Like Python's `datetime.datetime`, Matplotlib uses the Gregorian calendar - for all conversions between dates and floating point numbers. This practice - is not universal, and calendar differences can cause confusing - differences between what Python and Matplotlib give as the number of days - since 0001-01-01 and what other software and databases yield. For - example, the US Naval Observatory uses a calendar that switches - from Julian to Gregorian in October, 1582. Hence, using their - calculator, the number of days between 0001-01-01 and 2006-04-01 is - 732403, whereas using the Gregorian calendar via the datetime - module we find:: - - In [1]: date(2006, 4, 1).toordinal() - date(1, 1, 1).toordinal() - Out[1]: 732401 - -All the Matplotlib date converters, locators and formatters are timezone aware. -If no explicit timezone is provided, :rc:`timezone` is assumed, provided as a -string. If you want to use a different timezone, pass the *tz* keyword -argument of `num2date` to any date tick locators or formatters you create. This -can be either a `datetime.tzinfo` instance or a string with the timezone name -that can be parsed by `~dateutil.tz.gettz`. - -A wide range of specific and general purpose date tick locators and -formatters are provided in this module. See -:mod:`matplotlib.ticker` for general information on tick locators -and formatters. These are described below. - -The dateutil_ module provides additional code to handle date ticking, making it -easy to place ticks on any kinds of dates. See examples below. - -.. _dateutil: https://dateutil.readthedocs.io - -.. _date-locators: - -Date tick locators ------------------- - -Most of the date tick locators can locate single or multiple ticks. For example:: - - # import constants for the days of the week - from matplotlib.dates import MO, TU, WE, TH, FR, SA, SU - - # tick on Mondays every week - loc = WeekdayLocator(byweekday=MO, tz=tz) - - # tick on Mondays and Saturdays - loc = WeekdayLocator(byweekday=(MO, SA)) - -In addition, most of the constructors take an interval argument:: - - # tick on Mondays every second week - loc = WeekdayLocator(byweekday=MO, interval=2) - -The rrule locator allows completely general date ticking:: - - # tick every 5th easter - rule = rrulewrapper(YEARLY, byeaster=1, interval=5) - loc = RRuleLocator(rule) - -The available date tick locators are: - -* `MicrosecondLocator`: Locate microseconds. - -* `SecondLocator`: Locate seconds. - -* `MinuteLocator`: Locate minutes. - -* `HourLocator`: Locate hours. - -* `DayLocator`: Locate specified days of the month. - -* `WeekdayLocator`: Locate days of the week, e.g., MO, TU. - -* `MonthLocator`: Locate months, e.g., 7 for July. - -* `YearLocator`: Locate years that are multiples of base. - -* `RRuleLocator`: Locate using a `rrulewrapper`. - `rrulewrapper` is a simple wrapper around dateutil_'s `dateutil.rrule` - which allow almost arbitrary date tick specifications. - See :doc:`rrule example `. - -* `AutoDateLocator`: On autoscale, this class picks the best `DateLocator` - (e.g., `RRuleLocator`) to set the view limits and the tick locations. If - called with ``interval_multiples=True`` it will make ticks line up with - sensible multiples of the tick intervals. For example, if the interval is - 4 hours, it will pick hours 0, 4, 8, etc. as ticks. This behaviour is not - guaranteed by default. - -.. _date-formatters: - -Date formatters ---------------- - -The available date formatters are: - -* `AutoDateFormatter`: attempts to figure out the best format to use. This is - most useful when used with the `AutoDateLocator`. - -* `ConciseDateFormatter`: also attempts to figure out the best format to use, - and to make the format as compact as possible while still having complete - date information. This is most useful when used with the `AutoDateLocator`. - -* `DateFormatter`: use `~datetime.datetime.strftime` format strings. -""" -__all__ = ('datestr2num', 'date2num', 'num2date', 'num2timedelta', 'drange', 'set_epoch', 'get_epoch', 'DateFormatter', 'ConciseDateFormatter', 'AutoDateFormatter', 'DateLocator', 'RRuleLocator', 'AutoDateLocator', 'YearLocator', 'MonthLocator', 'WeekdayLocator', 'DayLocator', 'HourLocator', 'MinuteLocator', 'SecondLocator', 'MicrosecondLocator', 'rrule', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU', 'YEARLY', 'MONTHLY', 'WEEKLY', 'DAILY', 'HOURLY', 'MINUTELY', 'SECONDLY', 'MICROSECONDLY', 'relativedelta', 'DateConverter', 'ConciseDateConverter', 'rrulewrapper') -_log = ... -UTC = ... -@_api.caching_module_getattr -class __getattr__: - JULIAN_OFFSET = ... - - -EPOCH_OFFSET = ... -MICROSECONDLY = ... -HOURS_PER_DAY = ... -MIN_PER_HOUR = ... -SEC_PER_MIN = ... -MONTHS_PER_YEAR = ... -DAYS_PER_WEEK = ... -DAYS_PER_MONTH = ... -DAYS_PER_YEAR = ... -MINUTES_PER_DAY = ... -SEC_PER_HOUR = ... -SEC_PER_DAY = ... -SEC_PER_WEEK = ... -MUSECONDS_PER_DAY = ... -WEEKDAYS = ... -_epoch = ... -def set_epoch(epoch): # -> None: - """ - Set the epoch (origin for dates) for datetime calculations. - - The default epoch is :rc:`dates.epoch` (by default 1970-01-01T00:00). - - If microsecond accuracy is desired, the date being plotted needs to be - within approximately 70 years of the epoch. Matplotlib internally - represents dates as days since the epoch, so floating point dynamic - range needs to be within a factor of 2^52. - - `~.dates.set_epoch` must be called before any dates are converted - (i.e. near the import section) or a RuntimeError will be raised. - - See also :doc:`/gallery/ticks/date_precision_and_epochs`. - - Parameters - ---------- - epoch : str - valid UTC date parsable by `numpy.datetime64` (do not include - timezone). - - """ - ... - -def get_epoch(): - """ - Get the epoch used by `.dates`. - - Returns - ------- - epoch : str - String for the epoch (parsable by `numpy.datetime64`). - """ - ... - -_from_ordinalf_np_vectorized = ... -_dateutil_parser_parse_np_vectorized = ... -def datestr2num(d, default=...): # -> NDArray[Any] | NDArray[floating[Any]] | Any | NDArray[Unknown]: - """ - Convert a date string to a datenum using `dateutil.parser.parse`. - - Parameters - ---------- - d : str or sequence of str - The dates to convert. - - default : datetime.datetime, optional - The default date to use when fields are missing in *d*. - """ - ... - -def date2num(d): # -> NDArray[Any] | NDArray[floating[Any]] | Any: - """ - Convert datetime objects to Matplotlib dates. - - Parameters - ---------- - d : `datetime.datetime` or `numpy.datetime64` or sequences of these - - Returns - ------- - float or sequence of floats - Number of days since the epoch. See `.get_epoch` for the - epoch, which can be changed by :rc:`date.epoch` or `.set_epoch`. If - the epoch is "1970-01-01T00:00:00" (default) then noon Jan 1 1970 - ("1970-01-01T12:00:00") returns 0.5. - - Notes - ----- - The Gregorian calendar is assumed; this is not universal practice. - For details see the module docstring. - """ - ... - -@_api.deprecated("3.7") -def julian2num(j): # -> Any: - """ - Convert a Julian date (or sequence) to a Matplotlib date (or sequence). - - Parameters - ---------- - j : float or sequence of floats - Julian dates (days relative to 4713 BC Jan 1, 12:00:00 Julian - calendar or 4714 BC Nov 24, 12:00:00, proleptic Gregorian calendar). - - Returns - ------- - float or sequence of floats - Matplotlib dates (days relative to `.get_epoch`). - """ - ... - -@_api.deprecated("3.7") -def num2julian(n): # -> Any: - """ - Convert a Matplotlib date (or sequence) to a Julian date (or sequence). - - Parameters - ---------- - n : float or sequence of floats - Matplotlib dates (days relative to `.get_epoch`). - - Returns - ------- - float or sequence of floats - Julian dates (days relative to 4713 BC Jan 1, 12:00:00). - """ - ... - -def num2date(x, tz=...): # -> Any: - """ - Convert Matplotlib dates to `~datetime.datetime` objects. - - Parameters - ---------- - x : float or sequence of floats - Number of days (fraction part represents hours, minutes, seconds) - since the epoch. See `.get_epoch` for the - epoch, which can be changed by :rc:`date.epoch` or `.set_epoch`. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Timezone of *x*. If a string, *tz* is passed to `dateutil.tz`. - - Returns - ------- - `~datetime.datetime` or sequence of `~datetime.datetime` - Dates are returned in timezone *tz*. - - If *x* is a sequence, a sequence of `~datetime.datetime` objects will - be returned. - - Notes - ----- - The Gregorian calendar is assumed; this is not universal practice. - For details, see the module docstring. - """ - ... - -_ordinalf_to_timedelta_np_vectorized = ... -def num2timedelta(x): # -> Any: - """ - Convert number of days to a `~datetime.timedelta` object. - - If *x* is a sequence, a sequence of `~datetime.timedelta` objects will - be returned. - - Parameters - ---------- - x : float, sequence of floats - Number of days. The fraction part represents hours, minutes, seconds. - - Returns - ------- - `datetime.timedelta` or list[`datetime.timedelta`] - """ - ... - -def drange(dstart, dend, delta): # -> NDArray[floating[Any]]: - """ - Return a sequence of equally spaced Matplotlib dates. - - The dates start at *dstart* and reach up to, but not including *dend*. - They are spaced by *delta*. - - Parameters - ---------- - dstart, dend : `~datetime.datetime` - The date limits. - delta : `datetime.timedelta` - Spacing of the dates. - - Returns - ------- - `numpy.array` - A list floats representing Matplotlib dates. - - """ - ... - -class DateFormatter(ticker.Formatter): - """ - Format a tick (in days since the epoch) with a - `~datetime.datetime.strftime` format string. - """ - def __init__(self, fmt, tz=..., *, usetex=...) -> None: - """ - Parameters - ---------- - fmt : str - `~datetime.datetime.strftime` format string - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - usetex : bool, default: :rc:`text.usetex` - To enable/disable the use of TeX's math mode for rendering the - results of the formatter. - """ - ... - - def __call__(self, x, pos=...): # -> str | Any: - ... - - def set_tzinfo(self, tz): # -> None: - ... - - - -class ConciseDateFormatter(ticker.Formatter): - """ - A `.Formatter` which attempts to figure out the best format to use for the - date, and to make it as compact as possible, but still be complete. This is - most useful when used with the `AutoDateLocator`:: - - >>> locator = AutoDateLocator() - >>> formatter = ConciseDateFormatter(locator) - - Parameters - ---------- - locator : `.ticker.Locator` - Locator that this axis is using. - - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone, passed to `.dates.num2date`. - - formats : list of 6 strings, optional - Format strings for 6 levels of tick labelling: mostly years, - months, days, hours, minutes, and seconds. Strings use - the same format codes as `~datetime.datetime.strftime`. Default is - ``['%Y', '%b', '%d', '%H:%M', '%H:%M', '%S.%f']`` - - zero_formats : list of 6 strings, optional - Format strings for tick labels that are "zeros" for a given tick - level. For instance, if most ticks are months, ticks around 1 Jan 2005 - will be labeled "Dec", "2005", "Feb". The default is - ``['', '%Y', '%b', '%b-%d', '%H:%M', '%H:%M']`` - - offset_formats : list of 6 strings, optional - Format strings for the 6 levels that is applied to the "offset" - string found on the right side of an x-axis, or top of a y-axis. - Combined with the tick labels this should completely specify the - date. The default is:: - - ['', '%Y', '%Y-%b', '%Y-%b-%d', '%Y-%b-%d', '%Y-%b-%d %H:%M'] - - show_offset : bool, default: True - Whether to show the offset or not. - - usetex : bool, default: :rc:`text.usetex` - To enable/disable the use of TeX's math mode for rendering the results - of the formatter. - - Examples - -------- - See :doc:`/gallery/ticks/date_concise_formatter` - - .. plot:: - - import datetime - import matplotlib.dates as mdates - - base = datetime.datetime(2005, 2, 1) - dates = np.array([base + datetime.timedelta(hours=(2 * i)) - for i in range(732)]) - N = len(dates) - np.random.seed(19680801) - y = np.cumsum(np.random.randn(N)) - - fig, ax = plt.subplots(constrained_layout=True) - locator = mdates.AutoDateLocator() - formatter = mdates.ConciseDateFormatter(locator) - ax.xaxis.set_major_locator(locator) - ax.xaxis.set_major_formatter(formatter) - - ax.plot(dates, y) - ax.set_title('Concise Date Formatter') - - """ - def __init__(self, locator, tz=..., formats=..., offset_formats=..., zero_formats=..., show_offset=..., *, usetex=...) -> None: - """ - Autoformat the date labels. The default format is used to form an - initial string, and then redundant elements are removed. - """ - ... - - def __call__(self, x, pos=...): # -> str | Any: - ... - - def format_ticks(self, values): # -> list[str]: - ... - - def get_offset(self): # -> str | Any: - ... - - def format_data_short(self, value): # -> Any: - ... - - - -class AutoDateFormatter(ticker.Formatter): - """ - A `.Formatter` which attempts to figure out the best format to use. This - is most useful when used with the `AutoDateLocator`. - - `.AutoDateFormatter` has a ``.scale`` dictionary that maps tick scales (the - interval in days between one major tick) to format strings; this dictionary - defaults to :: - - self.scaled = { - DAYS_PER_YEAR: rcParams['date.autoformatter.year'], - DAYS_PER_MONTH: rcParams['date.autoformatter.month'], - 1: rcParams['date.autoformatter.day'], - 1 / HOURS_PER_DAY: rcParams['date.autoformatter.hour'], - 1 / MINUTES_PER_DAY: rcParams['date.autoformatter.minute'], - 1 / SEC_PER_DAY: rcParams['date.autoformatter.second'], - 1 / MUSECONDS_PER_DAY: rcParams['date.autoformatter.microsecond'], - } - - The formatter uses the format string corresponding to the lowest key in - the dictionary that is greater or equal to the current scale. Dictionary - entries can be customized:: - - locator = AutoDateLocator() - formatter = AutoDateFormatter(locator) - formatter.scaled[1/(24*60)] = '%M:%S' # only show min and sec - - Custom callables can also be used instead of format strings. The following - example shows how to use a custom format function to strip trailing zeros - from decimal seconds and adds the date to the first ticklabel:: - - def my_format_function(x, pos=None): - x = matplotlib.dates.num2date(x) - if pos == 0: - fmt = '%D %H:%M:%S.%f' - else: - fmt = '%H:%M:%S.%f' - label = x.strftime(fmt) - label = label.rstrip("0") - label = label.rstrip(".") - return label - - formatter.scaled[1/(24*60)] = my_format_function - """ - def __init__(self, locator, tz=..., defaultfmt=..., *, usetex=...) -> None: - """ - Autoformat the date labels. - - Parameters - ---------- - locator : `.ticker.Locator` - Locator that this axis is using. - - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - - defaultfmt : str - The default format to use if none of the values in ``self.scaled`` - are greater than the unit returned by ``locator._get_unit()``. - - usetex : bool, default: :rc:`text.usetex` - To enable/disable the use of TeX's math mode for rendering the - results of the formatter. If any entries in ``self.scaled`` are set - as functions, then it is up to the customized function to enable or - disable TeX's math mode itself. - """ - ... - - def __call__(self, x, pos=...): # -> str | Any: - ... - - - -class rrulewrapper: - """ - A simple wrapper around a `dateutil.rrule` allowing flexible - date tick specifications. - """ - def __init__(self, freq, tzinfo=..., **kwargs) -> None: - """ - Parameters - ---------- - freq : {YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY} - Tick frequency. These constants are defined in `dateutil.rrule`, - but they are accessible from `matplotlib.dates` as well. - tzinfo : `datetime.tzinfo`, optional - Time zone information. The default is None. - **kwargs - Additional keyword arguments are passed to the `dateutil.rrule`. - """ - ... - - def set(self, **kwargs): # -> None: - """Set parameters for an existing wrapper.""" - ... - - def __getattr__(self, name): # -> Any | _Wrapped[..., Unknown, (*args: Unknown, **kwargs: Unknown), Unknown]: - ... - - def __setstate__(self, state): # -> None: - ... - - - -class DateLocator(ticker.Locator): - """ - Determines the tick locations when plotting dates. - - This class is subclassed by other Locators and - is not meant to be used on its own. - """ - hms0d = ... - def __init__(self, tz=...) -> None: - """ - Parameters - ---------- - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - def set_tzinfo(self, tz): # -> None: - """ - Set timezone info. - - Parameters - ---------- - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - def datalim_to_dt(self): # -> tuple[Any, Any]: - """Convert axis data interval to datetime objects.""" - ... - - def viewlim_to_dt(self): # -> tuple[Any, Any]: - """Convert the view interval to datetime objects.""" - ... - - def nonsingular(self, vmin, vmax): # -> tuple[NDArray[Any] | Unknown | NDArray[floating[Any]] | Any, NDArray[Any] | Unknown | NDArray[floating[Any]] | Any] | tuple[Unknown, Unknown]: - """ - Given the proposed upper and lower extent, adjust the range - if it is too close to being singular (i.e. a range of ~0). - """ - ... - - - -class RRuleLocator(DateLocator): - def __init__(self, o, tz=...) -> None: - ... - - def __call__(self): # -> list[Unknown] | NDArray[Any] | NDArray[floating[Any]] | Any | Sequence[float]: - ... - - def tick_values(self, vmin, vmax): # -> NDArray[Any] | NDArray[floating[Any]] | Any | Sequence[float]: - ... - - @staticmethod - def get_unit_generic(freq): # -> float | Literal[-1]: - ... - - - -class AutoDateLocator(DateLocator): - """ - On autoscale, this class picks the best `DateLocator` to set the view - limits and the tick locations. - - Attributes - ---------- - intervald : dict - - Mapping of tick frequencies to multiples allowed for that ticking. - The default is :: - - self.intervald = { - YEARLY : [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500, - 1000, 2000, 4000, 5000, 10000], - MONTHLY : [1, 2, 3, 4, 6], - DAILY : [1, 2, 3, 7, 14, 21], - HOURLY : [1, 2, 3, 4, 6, 12], - MINUTELY: [1, 5, 10, 15, 30], - SECONDLY: [1, 5, 10, 15, 30], - MICROSECONDLY: [1, 2, 5, 10, 20, 50, 100, 200, 500, - 1000, 2000, 5000, 10000, 20000, 50000, - 100000, 200000, 500000, 1000000], - } - - where the keys are defined in `dateutil.rrule`. - - The interval is used to specify multiples that are appropriate for - the frequency of ticking. For instance, every 7 days is sensible - for daily ticks, but for minutes/seconds, 15 or 30 make sense. - - When customizing, you should only modify the values for the existing - keys. You should not add or delete entries. - - Example for forcing ticks every 3 hours:: - - locator = AutoDateLocator() - locator.intervald[HOURLY] = [3] # only show every 3 hours - """ - def __init__(self, tz=..., minticks=..., maxticks=..., interval_multiples=...) -> None: - """ - Parameters - ---------- - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - minticks : int - The minimum number of ticks desired; controls whether ticks occur - yearly, monthly, etc. - maxticks : int - The maximum number of ticks desired; controls the interval between - ticks (ticking every other, every 3, etc.). For fine-grained - control, this can be a dictionary mapping individual rrule - frequency constants (YEARLY, MONTHLY, etc.) to their own maximum - number of ticks. This can be used to keep the number of ticks - appropriate to the format chosen in `AutoDateFormatter`. Any - frequency not specified in this dictionary is given a default - value. - interval_multiples : bool, default: True - Whether ticks should be chosen to be multiple of the interval, - locking them to 'nicer' locations. For example, this will force - the ticks to be at hours 0, 6, 12, 18 when hourly ticking is done - at 6 hour intervals. - """ - ... - - def __call__(self): # -> list[Unknown] | NDArray[Any] | NDArray[floating[Any]] | Any | Sequence[float]: - ... - - def tick_values(self, vmin, vmax): # -> NDArray[Any] | NDArray[floating[Any]] | Any | Sequence[float]: - ... - - def nonsingular(self, vmin, vmax): # -> tuple[NDArray[Any] | Unknown | NDArray[floating[Any]] | Any, NDArray[Any] | Unknown | NDArray[floating[Any]] | Any] | tuple[Unknown, Unknown]: - ... - - def get_locator(self, dmin, dmax): # -> YearLocator | RRuleLocator | MicrosecondLocator: - """Pick the best locator based on a distance.""" - ... - - - -class YearLocator(RRuleLocator): - """ - Make ticks on a given day of each year that is a multiple of base. - - Examples:: - - # Tick every year on Jan 1st - locator = YearLocator() - - # Tick every 5 years on July 4th - locator = YearLocator(5, month=7, day=4) - """ - def __init__(self, base=..., month=..., day=..., tz=...) -> None: - """ - Parameters - ---------- - base : int, default: 1 - Mark ticks every *base* years. - month : int, default: 1 - The month on which to place the ticks, starting from 1. Default is - January. - day : int, default: 1 - The day on which to place the ticks. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - - -class MonthLocator(RRuleLocator): - """ - Make ticks on occurrences of each month, e.g., 1, 3, 12. - """ - def __init__(self, bymonth=..., bymonthday=..., interval=..., tz=...) -> None: - """ - Parameters - ---------- - bymonth : int or list of int, default: all months - Ticks will be placed on every month in *bymonth*. Default is - ``range(1, 13)``, i.e. every month. - bymonthday : int, default: 1 - The day on which to place the ticks. - interval : int, default: 1 - The interval between each iteration. For example, if - ``interval=2``, mark every second occurrence. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - - -class WeekdayLocator(RRuleLocator): - """ - Make ticks on occurrences of each weekday. - """ - def __init__(self, byweekday=..., interval=..., tz=...) -> None: - """ - Parameters - ---------- - byweekday : int or list of int, default: all days - Ticks will be placed on every weekday in *byweekday*. Default is - every day. - - Elements of *byweekday* must be one of MO, TU, WE, TH, FR, SA, - SU, the constants from :mod:`dateutil.rrule`, which have been - imported into the :mod:`matplotlib.dates` namespace. - interval : int, default: 1 - The interval between each iteration. For example, if - ``interval=2``, mark every second occurrence. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - - -class DayLocator(RRuleLocator): - """ - Make ticks on occurrences of each day of the month. For example, - 1, 15, 30. - """ - def __init__(self, bymonthday=..., interval=..., tz=...) -> None: - """ - Parameters - ---------- - bymonthday : int or list of int, default: all days - Ticks will be placed on every day in *bymonthday*. Default is - ``bymonthday=range(1, 32)``, i.e., every day of the month. - interval : int, default: 1 - The interval between each iteration. For example, if - ``interval=2``, mark every second occurrence. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - - -class HourLocator(RRuleLocator): - """ - Make ticks on occurrences of each hour. - """ - def __init__(self, byhour=..., interval=..., tz=...) -> None: - """ - Parameters - ---------- - byhour : int or list of int, default: all hours - Ticks will be placed on every hour in *byhour*. Default is - ``byhour=range(24)``, i.e., every hour. - interval : int, default: 1 - The interval between each iteration. For example, if - ``interval=2``, mark every second occurrence. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - - -class MinuteLocator(RRuleLocator): - """ - Make ticks on occurrences of each minute. - """ - def __init__(self, byminute=..., interval=..., tz=...) -> None: - """ - Parameters - ---------- - byminute : int or list of int, default: all minutes - Ticks will be placed on every minute in *byminute*. Default is - ``byminute=range(60)``, i.e., every minute. - interval : int, default: 1 - The interval between each iteration. For example, if - ``interval=2``, mark every second occurrence. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - - -class SecondLocator(RRuleLocator): - """ - Make ticks on occurrences of each second. - """ - def __init__(self, bysecond=..., interval=..., tz=...) -> None: - """ - Parameters - ---------- - bysecond : int or list of int, default: all seconds - Ticks will be placed on every second in *bysecond*. Default is - ``bysecond = range(60)``, i.e., every second. - interval : int, default: 1 - The interval between each iteration. For example, if - ``interval=2``, mark every second occurrence. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - - -class MicrosecondLocator(DateLocator): - """ - Make ticks on regular intervals of one or more microsecond(s). - - .. note:: - - By default, Matplotlib uses a floating point representation of time in - days since the epoch, so plotting data with - microsecond time resolution does not work well for - dates that are far (about 70 years) from the epoch (check with - `~.dates.get_epoch`). - - If you want sub-microsecond resolution time plots, it is strongly - recommended to use floating point seconds, not datetime-like - time representation. - - If you really must use datetime.datetime() or similar and still - need microsecond precision, change the time origin via - `.dates.set_epoch` to something closer to the dates being plotted. - See :doc:`/gallery/ticks/date_precision_and_epochs`. - - """ - def __init__(self, interval=..., tz=...) -> None: - """ - Parameters - ---------- - interval : int, default: 1 - The interval between each iteration. For example, if - ``interval=2``, mark every second occurrence. - tz : str or `~datetime.tzinfo`, default: :rc:`timezone` - Ticks timezone. If a string, *tz* is passed to `dateutil.tz`. - """ - ... - - def set_axis(self, axis): # -> None: - ... - - def __call__(self): # -> list[Unknown]: - ... - - def tick_values(self, vmin, vmax): - ... - - - -class DateConverter(units.ConversionInterface): - """ - Converter for `datetime.date` and `datetime.datetime` data, or for - date/time data represented as it would be converted by `date2num`. - - The 'unit' tag for such data is None or a `~datetime.tzinfo` instance. - """ - def __init__(self, *, interval_multiples=...) -> None: - ... - - def axisinfo(self, unit, axis): # -> AxisInfo: - """ - Return the `~matplotlib.units.AxisInfo` for *unit*. - - *unit* is a `~datetime.tzinfo` instance or None. - The *axis* argument is required but not used. - """ - ... - - @staticmethod - def convert(value, unit, axis): # -> NDArray[Any] | NDArray[floating[Any]] | Any: - """ - If *value* is not already a number or sequence of numbers, convert it - with `date2num`. - - The *unit* and *axis* arguments are not used. - """ - ... - - @staticmethod - def default_units(x, axis): # -> None: - """ - Return the `~datetime.tzinfo` instance of *x* or of its first element, - or None - """ - ... - - - -class ConciseDateConverter(DateConverter): - def __init__(self, formats=..., zero_formats=..., offset_formats=..., show_offset=..., *, interval_multiples=...) -> None: - ... - - def axisinfo(self, unit, axis): # -> AxisInfo: - ... - - - -class _SwitchableDateConverter: - """ - Helper converter-like object that generates and dispatches to - temporary ConciseDateConverter or DateConverter instances based on - :rc:`date.converter` and :rc:`date.interval_multiples`. - """ - def axisinfo(self, *args, **kwargs): - ... - - def default_units(self, *args, **kwargs): - ... - - def convert(self, *args, **kwargs): - ... - - - diff --git a/typings/matplotlib/dviread.pyi b/typings/matplotlib/dviread.pyi deleted file mode 100644 index 314f612..0000000 --- a/typings/matplotlib/dviread.pyi +++ /dev/null @@ -1,139 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import io -import os -from pathlib import Path -from enum import Enum -from collections.abc import Generator -from typing import NamedTuple - -class _dvistate(Enum): - pre: int - outer: int - inpage: int - post_post: int - finale: int - ... - - -class Page(NamedTuple): - text: list[Text] - boxes: list[Box] - height: int - width: int - descent: int - ... - - -class Box(NamedTuple): - x: int - y: int - height: int - width: int - ... - - -class Text(NamedTuple): - x: int - y: int - font: DviFont - glyph: int - width: int - @property - def font_path(self) -> Path: - ... - - @property - def font_size(self) -> float: - ... - - @property - def font_effects(self) -> dict[str, float]: - ... - - @property - def glyph_name_or_index(self) -> int | str: - ... - - - -class Dvi: - file: io.BufferedReader - dpi: float | None - fonts: dict[int, DviFont] - state: _dvistate - def __init__(self, filename: str | os.PathLike, dpi: float | None) -> None: - ... - - def __enter__(self) -> Dvi: - ... - - def __exit__(self, etype, evalue, etrace) -> None: - ... - - def __iter__(self) -> Generator[Page, None, None]: - ... - - def close(self) -> None: - ... - - - -class DviFont: - texname: bytes - size: float - widths: list[int] - def __init__(self, scale: float, tfm: Tfm, texname: bytes, vf: Vf | None) -> None: - ... - - def __eq__(self, other: object) -> bool: - ... - - def __ne__(self, other: object) -> bool: - ... - - - -class Vf(Dvi): - def __init__(self, filename: str | os.PathLike) -> None: - ... - - def __getitem__(self, code: int) -> Page: - ... - - - -class Tfm: - checksum: int - design_size: int - width: dict[int, int] - height: dict[int, int] - depth: dict[int, int] - def __init__(self, filename: str | os.PathLike) -> None: - ... - - - -class PsFont(NamedTuple): - texname: bytes - psname: bytes - effects: dict[str, float] - encoding: None | bytes - filename: str - ... - - -class PsfontsMap: - def __new__(cls, filename: str | os.PathLike) -> PsfontsMap: - ... - - def __getitem__(self, texname: bytes) -> PsFont: - ... - - - -def find_tex_file(filename: str | os.PathLike) -> str: - ... - diff --git a/typings/matplotlib/figure.pyi b/typings/matplotlib/figure.pyi deleted file mode 100644 index fc74795..0000000 --- a/typings/matplotlib/figure.pyi +++ /dev/null @@ -1,394 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import numpy as np -from collections.abc import Callable, Hashable, Iterable -from typing import Any, IO, Literal, TypeVar, overload -from numpy.typing import ArrayLike -from matplotlib.artist import Artist -from matplotlib.axes import Axes, SubplotBase -from matplotlib.backend_bases import FigureCanvasBase, MouseButton, MouseEvent, RendererBase -from matplotlib.colors import Colormap, Normalize -from matplotlib.colorbar import Colorbar -from matplotlib.cm import ScalarMappable -from matplotlib.gridspec import GridSpec, SubplotSpec -from matplotlib.image import FigureImage, _ImageBase -from matplotlib.layout_engine import LayoutEngine -from matplotlib.legend import Legend -from matplotlib.lines import Line2D -from matplotlib.patches import Patch, Rectangle -from matplotlib.text import Text -from matplotlib.transforms import Affine2D, Bbox, BboxBase, Transform -from .typing import ColorType, HashableList - -_T = TypeVar("_T") -class SubplotParams: - def __init__(self, left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ...) -> None: - ... - - left: float - right: float - bottom: float - top: float - wspace: float - hspace: float - def update(self, left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ...) -> None: - ... - - - -class FigureBase(Artist): - artists: list[Artist] - lines: list[Line2D] - patches: list[Patch] - texts: list[Text] - images: list[_ImageBase] - legends: list[Legend] - subfigs: list[SubFigure] - stale: bool - suppressComposite: bool | None - def __init__(self, **kwargs) -> None: - ... - - def autofmt_xdate(self, bottom: float = ..., rotation: int = ..., ha: Literal["left", "center", "right"] = ..., which: Literal["major", "minor", "both"] = ...) -> None: - ... - - def get_children(self) -> list[Artist]: - ... - - def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict[Any, Any]]: - ... - - def suptitle(self, t: str, **kwargs) -> Text: - ... - - def get_suptitle(self) -> str: - ... - - def supxlabel(self, t: str, **kwargs) -> Text: - ... - - def get_supxlabel(self) -> str: - ... - - def supylabel(self, t: str, **kwargs) -> Text: - ... - - def get_supylabel(self) -> str: - ... - - def get_edgecolor(self) -> ColorType: - ... - - def get_facecolor(self) -> ColorType: - ... - - def get_frameon(self) -> bool: - ... - - def set_linewidth(self, linewidth: float) -> None: - ... - - def get_linewidth(self) -> float: - ... - - def set_edgecolor(self, color: ColorType) -> None: - ... - - def set_facecolor(self, color: ColorType) -> None: - ... - - def set_frameon(self, b: bool) -> None: - ... - - @property - def frameon(self) -> bool: - ... - - @frameon.setter - def frameon(self, b: bool) -> None: - ... - - def add_artist(self, artist: Artist, clip: bool = ...) -> Artist: - ... - - @overload - def add_axes(self, ax: Axes) -> Axes: - ... - - @overload - def add_axes(self, rect: tuple[float, float, float, float], projection: None | str = ..., polar: bool = ..., **kwargs) -> Axes: - ... - - @overload - def add_subplot(self, nrows: int, ncols: int, index: int | tuple[int, int], **kwargs) -> Axes: - ... - - @overload - def add_subplot(self, pos: int, **kwargs) -> Axes: - ... - - @overload - def add_subplot(self, ax: Axes, **kwargs) -> Axes: - ... - - @overload - def add_subplot(self, ax: SubplotSpec, **kwargs) -> Axes: - ... - - @overload - def add_subplot(self, **kwargs) -> Axes: - ... - - @overload - def subplots(self, nrows: int = ..., ncols: int = ..., *, sharex: bool | Literal["none", "all", "row", "col"] = ..., sharey: bool | Literal["none", "all", "row", "col"] = ..., squeeze: Literal[False], width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> np.ndarray: - ... - - @overload - def subplots(self, nrows: int = ..., ncols: int = ..., *, sharex: bool | Literal["none", "all", "row", "col"] = ..., sharey: bool | Literal["none", "all", "row", "col"] = ..., squeeze: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> np.ndarray | SubplotBase | Axes: - ... - - def delaxes(self, ax: Axes) -> None: - ... - - def clear(self, keep_observers: bool = ...) -> None: - ... - - def clf(self, keep_observers: bool = ...) -> None: - ... - - @overload - def legend(self) -> Legend: - ... - - @overload - def legend(self, handles: Iterable[Artist], labels: Iterable[str], **kwargs) -> Legend: - ... - - @overload - def legend(self, *, handles: Iterable[Artist], **kwargs) -> Legend: - ... - - @overload - def legend(self, labels: Iterable[str], **kwargs) -> Legend: - ... - - @overload - def legend(self, **kwargs) -> Legend: - ... - - def text(self, x: float, y: float, s: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text: - ... - - def colorbar(self, mappable: ScalarMappable, cax: Axes | None = ..., ax: Axes | Iterable[Axes] | None = ..., use_gridspec: bool = ..., **kwargs) -> Colorbar: - ... - - def subplots_adjust(self, left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ...) -> None: - ... - - def align_xlabels(self, axs: Iterable[Axes] | None = ...) -> None: - ... - - def align_ylabels(self, axs: Iterable[Axes] | None = ...) -> None: - ... - - def align_labels(self, axs: Iterable[Axes] | None = ...) -> None: - ... - - def add_gridspec(self, nrows: int = ..., ncols: int = ..., **kwargs) -> GridSpec: - ... - - @overload - def subfigures(self, nrows: int = ..., ncols: int = ..., squeeze: Literal[False] = ..., wspace: float | None = ..., hspace: float | None = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., **kwargs) -> np.ndarray: - ... - - @overload - def subfigures(self, nrows: int = ..., ncols: int = ..., squeeze: Literal[True] = ..., wspace: float | None = ..., hspace: float | None = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., **kwargs) -> np.ndarray | SubFigure: - ... - - def add_subfigure(self, subplotspec: SubplotSpec, **kwargs) -> SubFigure: - ... - - def sca(self, a: Axes) -> Axes: - ... - - def gca(self) -> Axes: - ... - - def get_default_bbox_extra_artists(self) -> list[Artist]: - ... - - def get_tightbbox(self, renderer: RendererBase | None = ..., *, bbox_extra_artists: Iterable[Artist] | None = ...) -> Bbox: - ... - - @overload - def subplot_mosaic(self, mosaic: str, *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: str = ..., subplot_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[str | tuple[str, ...], dict[str, Any]] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[str, Axes]: - ... - - @overload - def subplot_mosaic(self, mosaic: list[HashableList[_T]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: _T = ..., subplot_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[_T | tuple[_T, ...], dict[str, Any]] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[_T, Axes]: - ... - - @overload - def subplot_mosaic(self, mosaic: list[HashableList[Hashable]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: Any = ..., subplot_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[Hashable | tuple[Hashable, ...], dict[str, Any]] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[Hashable, Axes]: - ... - - - -class SubFigure(FigureBase): - figure: Figure - subplotpars: SubplotParams - dpi_scale_trans: Affine2D - canvas: FigureCanvasBase - transFigure: Transform - bbox_relative: Bbox - figbbox: BboxBase - bbox: BboxBase - transSubfigure: Transform - patch: Rectangle - def __init__(self, parent: Figure | SubFigure, subplotspec: SubplotSpec, *, facecolor: ColorType | None = ..., edgecolor: ColorType | None = ..., linewidth: float = ..., frameon: bool | None = ..., **kwargs) -> None: - ... - - @property - def dpi(self) -> float: - ... - - @dpi.setter - def dpi(self, value: float) -> None: - ... - - def get_dpi(self) -> float: - ... - - def set_dpi(self, val) -> None: - ... - - def get_constrained_layout(self) -> bool: - ... - - def get_constrained_layout_pads(self, relative: bool = ...) -> tuple[float, float, float, float]: - ... - - def get_layout_engine(self) -> LayoutEngine: - ... - - @property - def axes(self) -> list[Axes]: - ... - - def get_axes(self) -> list[Axes]: - ... - - - -class Figure(FigureBase): - figure: Figure - bbox_inches: Bbox - dpi_scale_trans: Affine2D - bbox: BboxBase - figbbox: BboxBase - transFigure: Transform - transSubfigure: Transform - patch: Rectangle - subplotpars: SubplotParams - def __init__(self, figsize: tuple[float, float] | None = ..., dpi: float | None = ..., *, facecolor: ColorType | None = ..., edgecolor: ColorType | None = ..., linewidth: float = ..., frameon: bool | None = ..., subplotpars: SubplotParams | None = ..., tight_layout: bool | dict[str, Any] | None = ..., constrained_layout: bool | dict[str, Any] | None = ..., layout: Literal["constrained", "compressed", "tight"] | LayoutEngine | None = ..., **kwargs) -> None: - ... - - def pick(self, mouseevent: MouseEvent) -> None: - ... - - def set_layout_engine(self, layout: Literal["constrained", "compressed", "tight", "none"] | LayoutEngine | None = ..., **kwargs) -> None: - ... - - def get_layout_engine(self) -> LayoutEngine | None: - ... - - def show(self, warn: bool = ...) -> None: - ... - - @property - def axes(self) -> list[Axes]: - ... - - def get_axes(self) -> list[Axes]: - ... - - @property - def dpi(self) -> float: - ... - - @dpi.setter - def dpi(self, dpi: float) -> None: - ... - - def get_tight_layout(self) -> bool: - ... - - def get_constrained_layout_pads(self, relative: bool = ...) -> tuple[float, float, float, float]: - ... - - def get_constrained_layout(self) -> bool: - ... - - canvas: FigureCanvasBase - def set_canvas(self, canvas: FigureCanvasBase) -> None: - ... - - def figimage(self, X: ArrayLike, xo: int = ..., yo: int = ..., alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., origin: Literal["upper", "lower"] | None = ..., resize: bool = ..., **kwargs) -> FigureImage: - ... - - def set_size_inches(self, w: float | tuple[float, float], h: float | None = ..., forward: bool = ...) -> None: - ... - - def get_size_inches(self) -> np.ndarray: - ... - - def get_figwidth(self) -> float: - ... - - def get_figheight(self) -> float: - ... - - def get_dpi(self) -> float: - ... - - def set_dpi(self, val: float) -> None: - ... - - def set_figwidth(self, val: float, forward: bool = ...) -> None: - ... - - def set_figheight(self, val: float, forward: bool = ...) -> None: - ... - - def clear(self, keep_observers: bool = ...) -> None: - ... - - def draw_without_rendering(self) -> None: - ... - - def draw_artist(self, a: Artist) -> None: - ... - - def add_axobserver(self, func: Callable[[Figure], Any]) -> None: - ... - - def savefig(self, fname: str | os.PathLike | IO, *, transparent: bool | None = ..., **kwargs) -> None: - ... - - def ginput(self, n: int = ..., timeout: float = ..., show_clicks: bool = ..., mouse_add: MouseButton = ..., mouse_pop: MouseButton = ..., mouse_stop: MouseButton = ...) -> list[tuple[int, int]]: - ... - - def waitforbuttonpress(self, timeout: float = ...) -> None | bool: - ... - - def tight_layout(self, *, pad: float = ..., h_pad: float | None = ..., w_pad: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None: - ... - - - -def figaspect(arg: float | ArrayLike) -> tuple[float, float]: - ... - diff --git a/typings/matplotlib/font_manager.pyi b/typings/matplotlib/font_manager.pyi deleted file mode 100644 index cf992d1..0000000 --- a/typings/matplotlib/font_manager.pyi +++ /dev/null @@ -1,197 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -from dataclasses import dataclass -from matplotlib._afm import AFM -from matplotlib import ft2font -from pathlib import Path -from collections.abc import Iterable -from typing import Any, Literal - -font_scalings: dict[str | None, float] -stretch_dict: dict[str, int] -weight_dict: dict[str, int] -font_family_aliases: set[str] -MSFolders: str -MSFontDirectories: list[str] -MSUserFontDirectories: list[str] -X11FontDirectories: list[str] -OSXFontDirectories: list[str] -def get_fontext_synonyms(fontext: str) -> list[str]: - ... - -def list_fonts(directory: str, extensions: Iterable[str]) -> list[str]: - ... - -def win32FontDirectory() -> str: - ... - -def findSystemFonts(fontpaths: Iterable[str | os.PathLike | Path] | None = ..., fontext: str = ...) -> list[str]: - ... - -@dataclass -class FontEntry: - fname: str = ... - name: str = ... - style: str = ... - variant: str = ... - weight: str | int = ... - stretch: str = ... - size: str = ... - - -def ttfFontProperty(font: ft2font.FT2Font) -> FontEntry: - ... - -def afmFontProperty(fontpath: str, font: AFM) -> FontEntry: - ... - -class FontProperties: - def __init__(self, family: str | Iterable[str] | None = ..., style: Literal["normal", "italic", "oblique"] | None = ..., variant: Literal["normal", "small-caps"] | None = ..., weight: int | str | None = ..., stretch: int | str | None = ..., size: float | str | None = ..., fname: str | os.PathLike | Path | None = ..., math_fontfamily: str | None = ...) -> None: - ... - - def __hash__(self) -> int: - ... - - def __eq__(self, other: object) -> bool: - ... - - def get_family(self) -> list[str]: - ... - - def get_name(self) -> str: - ... - - def get_style(self) -> Literal["normal", "italic", "oblique"]: - ... - - def get_variant(self) -> Literal["normal", "small-caps"]: - ... - - def get_weight(self) -> int | str: - ... - - def get_stretch(self) -> int | str: - ... - - def get_size(self) -> float: - ... - - def get_file(self) -> str | bytes | None: - ... - - def get_fontconfig_pattern(self) -> dict[str, list[Any]]: - ... - - def set_family(self, family: str | Iterable[str] | None) -> None: - ... - - def set_style(self, style: Literal["normal", "italic", "oblique"] | None) -> None: - ... - - def set_variant(self, variant: Literal["normal", "small-caps"] | None) -> None: - ... - - def set_weight(self, weight: int | str | None) -> None: - ... - - def set_stretch(self, stretch: int | str | None) -> None: - ... - - def set_size(self, size: float | str | None) -> None: - ... - - def set_file(self, file: str | os.PathLike | Path | None) -> None: - ... - - def set_fontconfig_pattern(self, pattern: str) -> None: - ... - - def get_math_fontfamily(self) -> str: - ... - - def set_math_fontfamily(self, fontfamily: str | None) -> None: - ... - - def copy(self) -> FontProperties: - ... - - set_name = ... - get_slant = ... - set_slant = ... - get_size_in_points = ... - - -def json_dump(data: FontManager, filename: str | Path | os.PathLike) -> None: - ... - -def json_load(filename: str | Path | os.PathLike) -> FontManager: - ... - -class FontManager: - __version__: int - default_size: float | None - defaultFamily: dict[str, str] - afmlist: list[FontEntry] - ttflist: list[FontEntry] - def __init__(self, size: float | None = ..., weight: str = ...) -> None: - ... - - def addfont(self, path: str | Path | os.PathLike) -> None: - ... - - @property - def defaultFont(self) -> dict[str, str]: - ... - - def get_default_weight(self) -> str: - ... - - @staticmethod - def get_default_size() -> float: - ... - - def set_default_weight(self, weight: str) -> None: - ... - - def score_family(self, families: str | list[str] | tuple[str], family2: str) -> float: - ... - - def score_style(self, style1: str, style2: str) -> float: - ... - - def score_variant(self, variant1: str, variant2: str) -> float: - ... - - def score_stretch(self, stretch1: str | int, stretch2: str | int) -> float: - ... - - def score_weight(self, weight1: str | float, weight2: str | float) -> float: - ... - - def score_size(self, size1: str | float, size2: str | float) -> float: - ... - - def findfont(self, prop: str | FontProperties, fontext: Literal["ttf", "afm"] = ..., directory: str | None = ..., fallback_to_default: bool = ..., rebuild_if_missing: bool = ...) -> str: - ... - - def get_font_names(self) -> list[str]: - ... - - - -def is_opentype_cff_font(filename: str) -> bool: - ... - -def get_font(font_filepaths: Iterable[str | Path | bytes] | str | Path | bytes, hinting_factor: int | None = ...) -> ft2font.FT2Font: - ... - -fontManager: FontManager -def findfont(prop: str | FontProperties, fontext: Literal["ttf", "afm"] = ..., directory: str | None = ..., fallback_to_default: bool = ..., rebuild_if_missing: bool = ...) -> str: - ... - -def get_font_names() -> list[str]: - ... - diff --git a/typings/matplotlib/ft2font.pyi b/typings/matplotlib/ft2font.pyi deleted file mode 100644 index beb4185..0000000 --- a/typings/matplotlib/ft2font.pyi +++ /dev/null @@ -1,327 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from typing import BinaryIO, Literal, TypedDict, overload -from numpy.typing import NDArray - -__freetype_build_type__: str -__freetype_version__: str -BOLD: int -EXTERNAL_STREAM: int -FAST_GLYPHS: int -FIXED_SIZES: int -FIXED_WIDTH: int -GLYPH_NAMES: int -HORIZONTAL: int -ITALIC: int -KERNING: int -KERNING_DEFAULT: int -KERNING_UNFITTED: int -KERNING_UNSCALED: int -LOAD_CROP_BITMAP: int -LOAD_DEFAULT: int -LOAD_FORCE_AUTOHINT: int -LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH: int -LOAD_IGNORE_TRANSFORM: int -LOAD_LINEAR_DESIGN: int -LOAD_MONOCHROME: int -LOAD_NO_AUTOHINT: int -LOAD_NO_BITMAP: int -LOAD_NO_HINTING: int -LOAD_NO_RECURSE: int -LOAD_NO_SCALE: int -LOAD_PEDANTIC: int -LOAD_RENDER: int -LOAD_TARGET_LCD: int -LOAD_TARGET_LCD_V: int -LOAD_TARGET_LIGHT: int -LOAD_TARGET_MONO: int -LOAD_TARGET_NORMAL: int -LOAD_VERTICAL_LAYOUT: int -MULTIPLE_MASTERS: int -SCALABLE: int -SFNT: int -VERTICAL: int -class _SfntHeadDict(TypedDict): - version: tuple[int, int] - fontRevision: tuple[int, int] - checkSumAdjustment: int - magicNumber: int - flags: int - unitsPerEm: int - created: tuple[int, int] - modified: tuple[int, int] - xMin: int - yMin: int - xMax: int - yMax: int - macStyle: int - lowestRecPPEM: int - fontDirectionHint: int - indexToLocFormat: int - glyphDataFormat: int - ... - - -class _SfntMaxpDict(TypedDict): - version: tuple[int, int] - numGlyphs: int - maxPoints: int - maxContours: int - maxComponentPoints: int - maxComponentContours: int - maxZones: int - maxTwilightPoints: int - maxStorage: int - maxFunctionDefs: int - maxInstructionDefs: int - maxStackElements: int - maxSizeOfInstructions: int - maxComponentElements: int - maxComponentDepth: int - ... - - -class _SfntOs2Dict(TypedDict): - version: int - xAvgCharWidth: int - usWeightClass: int - usWidthClass: int - fsType: int - ySubscriptXSize: int - ySubscriptYSize: int - ySubscriptXOffset: int - ySubscriptYOffset: int - ySuperscriptXSize: int - ySuperscriptYSize: int - ySuperscriptXOffset: int - ySuperscriptYOffset: int - yStrikeoutSize: int - yStrikeoutPosition: int - sFamilyClass: int - panose: bytes - ulCharRange: tuple[int, int, int, int] - achVendID: bytes - fsSelection: int - fsFirstCharIndex: int - fsLastCharIndex: int - ... - - -class _SfntHheaDict(TypedDict): - version: tuple[int, int] - ascent: int - descent: int - lineGap: int - advanceWidthMax: int - minLeftBearing: int - minRightBearing: int - xMaxExtent: int - caretSlopeRise: int - caretSlopeRun: int - caretOffset: int - metricDataFormat: int - numOfLongHorMetrics: int - ... - - -class _SfntVheaDict(TypedDict): - version: tuple[int, int] - vertTypoAscender: int - vertTypoDescender: int - vertTypoLineGap: int - advanceHeightMax: int - minTopSideBearing: int - minBottomSizeBearing: int - yMaxExtent: int - caretSlopeRise: int - caretSlopeRun: int - caretOffset: int - metricDataFormat: int - numOfLongVerMetrics: int - ... - - -class _SfntPostDict(TypedDict): - format: tuple[int, int] - italicAngle: tuple[int, int] - underlinePosition: int - underlineThickness: int - isFixedPitch: int - minMemType42: int - maxMemType42: int - minMemType1: int - maxMemType1: int - ... - - -class _SfntPcltDict(TypedDict): - version: tuple[int, int] - fontNumber: int - pitch: int - xHeight: int - style: int - typeFamily: int - capHeight: int - symbolSet: int - typeFace: bytes - characterComplement: bytes - strokeWeight: int - widthType: int - serifStyle: int - ... - - -class FT2Font: - ascender: int - bbox: tuple[int, int, int, int] - descender: int - face_flags: int - family_name: str - fname: str - height: int - max_advance_height: int - max_advance_width: int - num_charmaps: int - num_faces: int - num_fixed_sizes: int - num_glyphs: int - postscript_name: str - scalable: bool - style_flags: int - style_name: str - underline_position: int - underline_thickness: int - units_per_EM: int - def __init__(self, filename: str | BinaryIO, hinting_factor: int = ..., *, _fallback_list: list[FT2Font] | None = ..., _kerning_factor: int = ...) -> None: - ... - - def clear(self) -> None: - ... - - def draw_glyph_to_bitmap(self, image: FT2Image, x: float, y: float, glyph: Glyph, antialiased: bool = ...) -> None: - ... - - def draw_glyphs_to_bitmap(self, antialiased: bool = ...) -> None: - ... - - def get_bitmap_offset(self) -> tuple[int, int]: - ... - - def get_char_index(self, codepoint: int) -> int: - ... - - def get_charmap(self) -> dict[int, int]: - ... - - def get_descent(self) -> int: - ... - - def get_glyph_name(self, index: int) -> str: - ... - - def get_image(self) -> NDArray[np.uint8]: - ... - - def get_kerning(self, left: int, right: int, mode: int) -> int: - ... - - def get_name_index(self, name: str) -> int: - ... - - def get_num_glyphs(self) -> int: - ... - - def get_path(self) -> tuple[NDArray[np.float64], NDArray[np.int8]]: - ... - - def get_ps_font_info(self) -> tuple[str, str, str, str, str, int, int, int, int]: - ... - - def get_sfnt(self) -> dict[tuple[int, int, int, int], bytes]: - ... - - @overload - def get_sfnt_table(self, name: Literal["head"]) -> _SfntHeadDict | None: - ... - - @overload - def get_sfnt_table(self, name: Literal["maxp"]) -> _SfntMaxpDict | None: - ... - - @overload - def get_sfnt_table(self, name: Literal["OS/2"]) -> _SfntOs2Dict | None: - ... - - @overload - def get_sfnt_table(self, name: Literal["hhea"]) -> _SfntHheaDict | None: - ... - - @overload - def get_sfnt_table(self, name: Literal["vhea"]) -> _SfntVheaDict | None: - ... - - @overload - def get_sfnt_table(self, name: Literal["post"]) -> _SfntPostDict | None: - ... - - @overload - def get_sfnt_table(self, name: Literal["pclt"]) -> _SfntPcltDict | None: - ... - - def get_width_height(self) -> tuple[int, int]: - ... - - def get_xys(self, antialiased: bool = ...) -> NDArray[np.float64]: - ... - - def load_char(self, charcode: int, flags: int = ...) -> Glyph: - ... - - def load_glyph(self, glyphindex: int, flags: int = ...) -> Glyph: - ... - - def select_charmap(self, i: int) -> None: - ... - - def set_charmap(self, i: int) -> None: - ... - - def set_size(self, ptsize: float, dpi: float) -> None: - ... - - def set_text(self, string: str, angle: float = ..., flags: int = ...) -> NDArray[np.float64]: - ... - - - -class FT2Image: - def __init__(self, width: float, height: float) -> None: - ... - - def draw_rect(self, x0: float, y0: float, x1: float, y1: float) -> None: - ... - - def draw_rect_filled(self, x0: float, y0: float, x1: float, y1: float) -> None: - ... - - - -class Glyph: - width: int - height: int - horiBearingX: int - horiBearingY: int - horiAdvance: int - linearHoriAdvance: int - vertBearingX: int - vertBearingY: int - vertAdvance: int - @property - def bbox(self) -> tuple[int, int, int, int]: - ... - - - diff --git a/typings/matplotlib/gridspec.pyi b/typings/matplotlib/gridspec.pyi deleted file mode 100644 index 523601e..0000000 --- a/typings/matplotlib/gridspec.pyi +++ /dev/null @@ -1,149 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from typing import Any, Literal, overload -from numpy.typing import ArrayLike -from matplotlib.axes import Axes, SubplotBase -from matplotlib.backend_bases import RendererBase -from matplotlib.figure import Figure, SubplotParams -from matplotlib.transforms import Bbox - -class GridSpecBase: - def __init__(self, nrows: int, ncols: int, height_ratios: ArrayLike | None = ..., width_ratios: ArrayLike | None = ...) -> None: - ... - - @property - def nrows(self) -> int: - ... - - @property - def ncols(self) -> int: - ... - - def get_geometry(self) -> tuple[int, int]: - ... - - def get_subplot_params(self, figure: Figure | None = ...) -> SubplotParams: - ... - - def new_subplotspec(self, loc: tuple[int, int], rowspan: int = ..., colspan: int = ...) -> SubplotSpec: - ... - - def set_width_ratios(self, width_ratios: ArrayLike | None) -> None: - ... - - def get_width_ratios(self) -> ArrayLike: - ... - - def set_height_ratios(self, height_ratios: ArrayLike | None) -> None: - ... - - def get_height_ratios(self) -> ArrayLike: - ... - - def get_grid_positions(self, fig: Figure, raw: bool = ...) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: - ... - - def __getitem__(self, key: tuple[int | slice, int | slice] | slice | int) -> SubplotSpec: - ... - - @overload - def subplots(self, *, sharex: bool | Literal["all", "row", "col", "none"] = ..., sharey: bool | Literal["all", "row", "col", "none"] = ..., squeeze: Literal[False], subplot_kw: dict[str, Any] | None = ...) -> np.ndarray: - ... - - @overload - def subplots(self, *, sharex: bool | Literal["all", "row", "col", "none"] = ..., sharey: bool | Literal["all", "row", "col", "none"] = ..., squeeze: Literal[True] = ..., subplot_kw: dict[str, Any] | None = ...) -> np.ndarray | SubplotBase | Axes: - ... - - - -class GridSpec(GridSpecBase): - left: float | None - bottom: float | None - right: float | None - top: float | None - wspace: float | None - hspace: float | None - figure: Figure | None - def __init__(self, nrows: int, ncols: int, figure: Figure | None = ..., left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ...) -> None: - ... - - def update(self, **kwargs: float | None) -> None: - ... - - def locally_modified_subplot_params(self) -> list[str]: - ... - - def tight_layout(self, figure: Figure, renderer: RendererBase | None = ..., pad: float = ..., h_pad: float | None = ..., w_pad: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None: - ... - - - -class GridSpecFromSubplotSpec(GridSpecBase): - figure: Figure | None - def __init__(self, nrows: int, ncols: int, subplot_spec: SubplotSpec, wspace: float | None = ..., hspace: float | None = ..., height_ratios: ArrayLike | None = ..., width_ratios: ArrayLike | None = ...) -> None: - ... - - def get_topmost_subplotspec(self) -> SubplotSpec: - ... - - - -class SubplotSpec: - num1: int - def __init__(self, gridspec: GridSpecBase, num1: int, num2: int | None = ...) -> None: - ... - - @property - def num2(self) -> int: - ... - - @num2.setter - def num2(self, value: int) -> None: - ... - - def get_gridspec(self) -> GridSpec: - ... - - def get_geometry(self) -> tuple[int, int, int, int]: - ... - - @property - def rowspan(self) -> range: - ... - - @property - def colspan(self) -> range: - ... - - def is_first_row(self) -> bool: - ... - - def is_last_row(self) -> bool: - ... - - def is_first_col(self) -> bool: - ... - - def is_last_col(self) -> bool: - ... - - def get_position(self, figure: Figure) -> Bbox: - ... - - def get_topmost_subplotspec(self) -> SubplotSpec: - ... - - def __eq__(self, other: object) -> bool: - ... - - def __hash__(self) -> int: - ... - - def subgridspec(self, nrows: int, ncols: int, **kwargs) -> GridSpecFromSubplotSpec: - ... - - - diff --git a/typings/matplotlib/hatch.pyi b/typings/matplotlib/hatch.pyi deleted file mode 100644 index 710c8cd..0000000 --- a/typings/matplotlib/hatch.pyi +++ /dev/null @@ -1,115 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from matplotlib.path import Path -from numpy.typing import ArrayLike - -class HatchPatternBase: - ... - - -class HorizontalHatch(HatchPatternBase): - num_lines: int - num_vertices: int - def __init__(self, hatch: str, density: int) -> None: - ... - - def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None: - ... - - - -class VerticalHatch(HatchPatternBase): - num_lines: int - num_vertices: int - def __init__(self, hatch: str, density: int) -> None: - ... - - def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None: - ... - - - -class NorthEastHatch(HatchPatternBase): - num_lines: int - num_vertices: int - def __init__(self, hatch: str, density: int) -> None: - ... - - def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None: - ... - - - -class SouthEastHatch(HatchPatternBase): - num_lines: int - num_vertices: int - def __init__(self, hatch: str, density: int) -> None: - ... - - def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None: - ... - - - -class Shapes(HatchPatternBase): - filled: bool - num_shapes: int - num_vertices: int - def __init__(self, hatch: str, density: int) -> None: - ... - - def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None: - ... - - - -class Circles(Shapes): - shape_vertices: np.ndarray - shape_codes: np.ndarray - def __init__(self, hatch: str, density: int) -> None: - ... - - - -class SmallCircles(Circles): - size: float - num_rows: int - def __init__(self, hatch: str, density: int) -> None: - ... - - - -class LargeCircles(Circles): - size: float - num_rows: int - def __init__(self, hatch: str, density: int) -> None: - ... - - - -class SmallFilledCircles(Circles): - size: float - filled: bool - num_rows: int - def __init__(self, hatch: str, density: int) -> None: - ... - - - -class Stars(Shapes): - size: float - filled: bool - num_rows: int - shape_vertices: np.ndarray - shape_codes: np.ndarray - def __init__(self, hatch: str, density: int) -> None: - ... - - - -def get_path(hatchpattern: str, density: int = ...) -> Path: - ... - diff --git a/typings/matplotlib/image.pyi b/typings/matplotlib/image.pyi deleted file mode 100644 index a51ddb8..0000000 --- a/typings/matplotlib/image.pyi +++ /dev/null @@ -1,188 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import pathlib -import numpy as np -import PIL.Image -import matplotlib.artist as martist -from collections.abc import Callable, Sequence -from typing import Any, BinaryIO, Literal -from numpy.typing import ArrayLike, NDArray -from matplotlib.axes import Axes -from matplotlib import cm -from matplotlib.backend_bases import MouseEvent, RendererBase -from matplotlib.colors import Colormap, Normalize -from matplotlib.figure import Figure -from matplotlib.transforms import Affine2D, Bbox, BboxBase, Transform - -BESSEL: int -BICUBIC: int -BILINEAR: int -BLACKMAN: int -CATROM: int -GAUSSIAN: int -HAMMING: int -HANNING: int -HERMITE: int -KAISER: int -LANCZOS: int -MITCHELL: int -NEAREST: int -QUADRIC: int -SINC: int -SPLINE16: int -SPLINE36: int -def resample(input_array: NDArray[np.float32] | NDArray[np.float64] | NDArray[np.int8], output_array: NDArray[np.float32] | NDArray[np.float64] | NDArray[np.int8], transform: Transform, interpolation: int = ..., resample: bool = ..., alpha: float = ..., norm: bool = ..., radius: float = ...) -> None: - ... - -interpolations_names: set[str] -def composite_images(images: Sequence[_ImageBase], renderer: RendererBase, magnification: float = ...) -> tuple[np.ndarray, float, float]: - ... - -class _ImageBase(martist.Artist, cm.ScalarMappable): - zorder: float - origin: Literal["upper", "lower"] - axes: Axes - def __init__(self, ax: Axes, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool | None = ..., *, interpolation_stage: Literal["data", "rgba"] | None = ..., **kwargs) -> None: - ... - - def get_size(self) -> tuple[int, int]: - ... - - def set_alpha(self, alpha: float | ArrayLike | None) -> None: - ... - - def changed(self) -> None: - ... - - def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled: bool = ...) -> tuple[np.ndarray, float, float, Affine2D]: - ... - - def draw(self, renderer: RendererBase, *args, **kwargs) -> None: - ... - - def write_png(self, fname: str | pathlib.Path | BinaryIO) -> None: - ... - - def set_data(self, A: ArrayLike | None) -> None: - ... - - def set_array(self, A: ArrayLike | None) -> None: - ... - - def get_shape(self) -> tuple[int, int, int]: - ... - - def get_interpolation(self) -> str: - ... - - def set_interpolation(self, s: str | None) -> None: - ... - - def set_interpolation_stage(self, s: Literal["data", "rgba"]) -> None: - ... - - def can_composite(self) -> bool: - ... - - def set_resample(self, v: bool | None) -> None: - ... - - def get_resample(self) -> bool: - ... - - def set_filternorm(self, filternorm: bool) -> None: - ... - - def get_filternorm(self) -> bool: - ... - - def set_filterrad(self, filterrad: float) -> None: - ... - - def get_filterrad(self) -> float: - ... - - - -class AxesImage(_ImageBase): - def __init__(self, ax: Axes, *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., extent: tuple[float, float, float, float] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool = ..., interpolation_stage: Literal["data", "rgba"] | None = ..., **kwargs) -> None: - ... - - def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled: bool = ...) -> tuple[np.ndarray, float, float, Affine2D]: - ... - - def set_extent(self, extent: tuple[float, float, float, float], **kwargs) -> None: - ... - - def get_extent(self) -> tuple[float, float, float, float]: - ... - - def get_cursor_data(self, event: MouseEvent) -> None | float: - ... - - - -class NonUniformImage(AxesImage): - mouseover: bool - def __init__(self, ax: Axes, *, interpolation: Literal["nearest", "bilinear"] = ..., **kwargs) -> None: - ... - - def set_data(self, x: ArrayLike, y: ArrayLike, A: ArrayLike) -> None: - ... - - def set_interpolation(self, s: Literal["nearest", "bilinear"]) -> None: - ... - - - -class PcolorImage(AxesImage): - def __init__(self, ax: Axes, x: ArrayLike | None = ..., y: ArrayLike | None = ..., A: ArrayLike | None = ..., *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., **kwargs) -> None: - ... - - def set_data(self, x: ArrayLike, y: ArrayLike, A: ArrayLike) -> None: - ... - - - -class FigureImage(_ImageBase): - zorder: float - figure: Figure - ox: float - oy: float - magnification: float - def __init__(self, fig: Figure, *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., offsetx: int = ..., offsety: int = ..., origin: Literal["upper", "lower"] | None = ..., **kwargs) -> None: - ... - - def get_extent(self) -> tuple[float, float, float, float]: - ... - - - -class BboxImage(_ImageBase): - bbox: BboxBase - def __init__(self, bbox: BboxBase | Callable[[RendererBase | None], Bbox], *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool = ..., **kwargs) -> None: - ... - - def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - - -def imread(fname: str | pathlib.Path | BinaryIO, format: str | None = ...) -> np.ndarray: - ... - -def imsave(fname: str | os.PathLike | BinaryIO, arr: ArrayLike, vmin: float | None = ..., vmax: float | None = ..., cmap: str | Colormap | None = ..., format: str | None = ..., origin: Literal["upper", "lower"] | None = ..., dpi: float = ..., *, metadata: dict[str, str] | None = ..., pil_kwargs: dict[str, Any] | None = ...) -> None: - ... - -def pil_to_array(pilImage: PIL.Image.Image) -> np.ndarray: - ... - -def thumbnail(infile: str | BinaryIO, thumbfile: str | BinaryIO, scale: float = ..., interpolation: str = ..., preview: bool = ...) -> Figure: - ... - diff --git a/typings/matplotlib/layout_engine.pyi b/typings/matplotlib/layout_engine.pyi deleted file mode 100644 index ae1977c..0000000 --- a/typings/matplotlib/layout_engine.pyi +++ /dev/null @@ -1,63 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.figure import Figure -from typing import Any - -class LayoutEngine: - def __init__(self, **kwargs: Any) -> None: - ... - - def set(self) -> None: - ... - - @property - def colorbar_gridspec(self) -> bool: - ... - - @property - def adjust_compatible(self) -> bool: - ... - - def get(self) -> dict[str, Any]: - ... - - def execute(self, fig: Figure) -> None: - ... - - - -class PlaceHolderLayoutEngine(LayoutEngine): - def __init__(self, adjust_compatible: bool, colorbar_gridspec: bool, **kwargs: Any) -> None: - ... - - def execute(self, fig: Figure) -> None: - ... - - - -class TightLayoutEngine(LayoutEngine): - def __init__(self, *, pad: float = ..., h_pad: float | None = ..., w_pad: float | None = ..., rect: tuple[float, float, float, float] = ..., **kwargs: Any) -> None: - ... - - def execute(self, fig: Figure) -> None: - ... - - def set(self, *, pad: float | None = ..., w_pad: float | None = ..., h_pad: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None: - ... - - - -class ConstrainedLayoutEngine(LayoutEngine): - def __init__(self, *, h_pad: float | None = ..., w_pad: float | None = ..., hspace: float | None = ..., wspace: float | None = ..., rect: tuple[float, float, float, float] = ..., compress: bool = ..., **kwargs: Any) -> None: - ... - - def execute(self, fig: Figure) -> Any: - ... - - def set(self, *, h_pad: float | None = ..., w_pad: float | None = ..., hspace: float | None = ..., wspace: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None: - ... - - - diff --git a/typings/matplotlib/legend.pyi b/typings/matplotlib/legend.pyi deleted file mode 100644 index 6e81a69..0000000 --- a/typings/matplotlib/legend.pyi +++ /dev/null @@ -1,139 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import pathlib -from matplotlib.axes import Axes -from matplotlib.artist import Artist -from matplotlib.backend_bases import MouseEvent -from matplotlib.figure import Figure -from matplotlib.font_manager import FontProperties -from matplotlib.legend_handler import HandlerBase -from matplotlib.lines import Line2D -from matplotlib.offsetbox import DraggableOffsetBox -from matplotlib.patches import FancyBboxPatch, Patch, Rectangle -from matplotlib.text import Text -from matplotlib.transforms import BboxBase, Transform -from collections.abc import Iterable -from typing import Any, Literal, overload -from .typing import ColorType - -class DraggableLegend(DraggableOffsetBox): - legend: Legend - def __init__(self, legend: Legend, use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> None: - ... - - def finalize_offset(self) -> None: - ... - - - -class Legend(Artist): - codes: dict[str, int] - zorder: float - prop: FontProperties - texts: list[Text] - legend_handles: list[Artist | None] - numpoints: int - markerscale: float - scatterpoints: int - borderpad: float - labelspacing: float - handlelength: float - handleheight: float - handletextpad: float - borderaxespad: float - columnspacing: float - shadow: bool - isaxes: bool - axes: Axes - parent: Axes | Figure - legendPatch: FancyBboxPatch - def __init__(self, parent: Axes | Figure, handles: Iterable[Artist | tuple[Artist, ...]], labels: Iterable[str], *, loc: str | tuple[float, float] | int | None = ..., numpoints: int | None = ..., markerscale: float | None = ..., markerfirst: bool = ..., reverse: bool = ..., scatterpoints: int | None = ..., scatteryoffsets: Iterable[float] | None = ..., prop: FontProperties | dict[str, Any] | None = ..., fontsize: float | str | None = ..., labelcolor: ColorType | Iterable[ColorType] | Literal["linecolor", "markerfacecolor", "mfc", "markeredgecolor", "mec"] | None = ..., borderpad: float | None = ..., labelspacing: float | None = ..., handlelength: float | None = ..., handleheight: float | None = ..., handletextpad: float | None = ..., borderaxespad: float | None = ..., columnspacing: float | None = ..., ncols: int = ..., mode: Literal["expand"] | None = ..., fancybox: bool | None = ..., shadow: bool | dict[str, Any] | None = ..., title: str | None = ..., title_fontsize: float | None = ..., framealpha: float | None = ..., edgecolor: Literal["inherit"] | ColorType | None = ..., facecolor: Literal["inherit"] | ColorType | None = ..., bbox_to_anchor: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None = ..., bbox_transform: Transform | None = ..., frameon: bool | None = ..., handler_map: dict[Artist | type, HandlerBase] | None = ..., title_fontproperties: FontProperties | dict[str, Any] | None = ..., alignment: Literal["center", "left", "right"] = ..., ncol: int = ..., draggable: bool = ...) -> None: - ... - - def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict[Any, Any]]: - ... - - def set_ncols(self, ncols: int) -> None: - ... - - @classmethod - def get_default_handler_map(cls) -> dict[type, HandlerBase]: - ... - - @classmethod - def set_default_handler_map(cls, handler_map: dict[type, HandlerBase]) -> None: - ... - - @classmethod - def update_default_handler_map(cls, handler_map: dict[type, HandlerBase]) -> None: - ... - - def get_legend_handler_map(self) -> dict[type, HandlerBase]: - ... - - @staticmethod - def get_legend_handler(legend_handler_map: dict[type, HandlerBase], orig_handle: Any) -> HandlerBase | None: - ... - - def get_children(self) -> list[Artist]: - ... - - def get_frame(self) -> Rectangle: - ... - - def get_lines(self) -> list[Line2D]: - ... - - def get_patches(self) -> list[Patch]: - ... - - def get_texts(self) -> list[Text]: - ... - - def set_alignment(self, alignment: Literal["center", "left", "right"]) -> None: - ... - - def get_alignment(self) -> Literal["center", "left", "right"]: - ... - - def set_loc(self, loc: str | tuple[float, float] | int | None = ...) -> None: - ... - - def set_title(self, title: str, prop: FontProperties | str | pathlib.Path | None = ...) -> None: - ... - - def get_title(self) -> Text: - ... - - def get_frame_on(self) -> bool: - ... - - def set_frame_on(self, b: bool) -> None: - ... - - draw_frame = ... - def get_bbox_to_anchor(self) -> BboxBase: - ... - - def set_bbox_to_anchor(self, bbox: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None, transform: Transform | None = ...) -> None: - ... - - @overload - def set_draggable(self, state: Literal[True], use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> DraggableLegend: - ... - - @overload - def set_draggable(self, state: Literal[False], use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> None: - ... - - def get_draggable(self) -> bool: - ... - - @property - def legendHandles(self) -> list[Artist | None]: - ... - - - diff --git a/typings/matplotlib/legend_handler.pyi b/typings/matplotlib/legend_handler.pyi deleted file mode 100644 index e8261c8..0000000 --- a/typings/matplotlib/legend_handler.pyi +++ /dev/null @@ -1,163 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable, Sequence -from matplotlib.artist import Artist -from matplotlib.legend import Legend -from matplotlib.offsetbox import OffsetBox -from matplotlib.transforms import Transform -from typing import TypeVar -from numpy.typing import ArrayLike - -def update_from_first_child(tgt: Artist, src: Artist) -> None: - ... - -class HandlerBase: - def __init__(self, xpad: float = ..., ypad: float = ..., update_func: Callable[[Artist, Artist], None] | None = ...) -> None: - ... - - def update_prop(self, legend_handle: Artist, orig_handle: Artist, legend: Legend) -> None: - ... - - def adjust_drawing_area(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> tuple[float, float, float, float]: - ... - - def legend_artist(self, legend: Legend, orig_handle: Artist, fontsize: float, handlebox: OffsetBox) -> Artist: - ... - - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerNpoints(HandlerBase): - def __init__(self, marker_pad: float = ..., numpoints: int | None = ..., **kwargs) -> None: - ... - - def get_numpoints(self, legend: Legend) -> int | None: - ... - - def get_xdata(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> tuple[ArrayLike, ArrayLike]: - ... - - - -class HandlerNpointsYoffsets(HandlerNpoints): - def __init__(self, numpoints: int | None = ..., yoffsets: Sequence[float] | None = ..., **kwargs) -> None: - ... - - def get_ydata(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> ArrayLike: - ... - - - -class HandlerLine2DCompound(HandlerNpoints): - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerLine2D(HandlerNpoints): - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerPatch(HandlerBase): - def __init__(self, patch_func: Callable | None = ..., **kwargs) -> None: - ... - - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerStepPatch(HandlerBase): - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerLineCollection(HandlerLine2D): - def get_numpoints(self, legend: Legend) -> int: - ... - - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -_T = TypeVar("_T", bound=Artist) -class HandlerRegularPolyCollection(HandlerNpointsYoffsets): - def __init__(self, yoffsets: Sequence[float] | None = ..., sizes: Sequence[float] | None = ..., **kwargs) -> None: - ... - - def get_numpoints(self, legend: Legend) -> int: - ... - - def get_sizes(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> Sequence[float]: - ... - - def update_prop(self, legend_handle, orig_handle: Artist, legend: Legend) -> None: - ... - - def create_collection(self, orig_handle: _T, sizes: Sequence[float] | None, offsets: Sequence[float] | None, offset_transform: Transform) -> _T: - ... - - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerPathCollection(HandlerRegularPolyCollection): - def create_collection(self, orig_handle: _T, sizes: Sequence[float] | None, offsets: Sequence[float] | None, offset_transform: Transform) -> _T: - ... - - - -class HandlerCircleCollection(HandlerRegularPolyCollection): - def create_collection(self, orig_handle: _T, sizes: Sequence[float] | None, offsets: Sequence[float] | None, offset_transform: Transform) -> _T: - ... - - - -class HandlerErrorbar(HandlerLine2D): - def __init__(self, xerr_size: float = ..., yerr_size: float | None = ..., marker_pad: float = ..., numpoints: int | None = ..., **kwargs) -> None: - ... - - def get_err_size(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> tuple[float, float]: - ... - - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerStem(HandlerNpointsYoffsets): - def __init__(self, marker_pad: float = ..., numpoints: int | None = ..., bottom: float | None = ..., yoffsets: Sequence[float] | None = ..., **kwargs) -> None: - ... - - def get_ydata(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> ArrayLike: - ... - - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerTuple(HandlerBase): - def __init__(self, ndivide: int | None = ..., pad: float | None = ..., **kwargs) -> None: - ... - - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - -class HandlerPolyCollection(HandlerBase): - def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]: - ... - - - diff --git a/typings/matplotlib/lines.pyi b/typings/matplotlib/lines.pyi deleted file mode 100644 index db18f40..0000000 --- a/typings/matplotlib/lines.pyi +++ /dev/null @@ -1,248 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .artist import Artist -from .axes import Axes -from .backend_bases import FigureCanvasBase, MouseEvent -from .path import Path -from .transforms import Bbox -from collections.abc import Callable, Sequence -from typing import Any, Literal, overload -from .typing import CapStyleType, ColorType, DrawStyleType, FillStyleType, JoinStyleType, LineStyleType, MarkEveryType, MarkerType -from numpy.typing import ArrayLike - -def segment_hits(cx: ArrayLike, cy: ArrayLike, x: ArrayLike, y: ArrayLike, radius: ArrayLike) -> ArrayLike: - ... - -class Line2D(Artist): - lineStyles: dict[str, str] - drawStyles: dict[str, str] - drawStyleKeys: list[str] - markers: dict[str | int, str] - filled_markers: tuple[str, ...] - fillStyles: tuple[str, ...] - zorder: float - ind_offset: float - def __init__(self, xdata: ArrayLike, ydata: ArrayLike, *, linewidth: float | None = ..., linestyle: LineStyleType | None = ..., color: ColorType | None = ..., gapcolor: ColorType | None = ..., marker: MarkerType | None = ..., markersize: float | None = ..., markeredgewidth: float | None = ..., markeredgecolor: ColorType | None = ..., markerfacecolor: ColorType | None = ..., markerfacecoloralt: ColorType = ..., fillstyle: FillStyleType | None = ..., antialiased: bool | None = ..., dash_capstyle: CapStyleType | None = ..., solid_capstyle: CapStyleType | None = ..., dash_joinstyle: JoinStyleType | None = ..., solid_joinstyle: JoinStyleType | None = ..., pickradius: float = ..., drawstyle: DrawStyleType | None = ..., markevery: MarkEveryType | None = ..., **kwargs) -> None: - ... - - def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict]: - ... - - def get_pickradius(self) -> float: - ... - - def set_pickradius(self, pickradius: float) -> None: - ... - - pickradius: float - def get_fillstyle(self) -> FillStyleType: - ... - - stale: bool - def set_fillstyle(self, fs: FillStyleType) -> None: - ... - - def set_markevery(self, every: MarkEveryType) -> None: - ... - - def get_markevery(self) -> MarkEveryType: - ... - - def set_picker(self, p: None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict]]) -> None: - ... - - def get_bbox(self) -> Bbox: - ... - - @overload - def set_data(self, args: ArrayLike) -> None: - ... - - @overload - def set_data(self, x: ArrayLike, y: ArrayLike) -> None: - ... - - def recache_always(self) -> None: - ... - - def recache(self, always: bool = ...) -> None: - ... - - def get_antialiased(self) -> bool: - ... - - def get_color(self) -> ColorType: - ... - - def get_drawstyle(self) -> DrawStyleType: - ... - - def get_gapcolor(self) -> ColorType: - ... - - def get_linestyle(self) -> LineStyleType: - ... - - def get_linewidth(self) -> float: - ... - - def get_marker(self) -> MarkerType: - ... - - def get_markeredgecolor(self) -> ColorType: - ... - - def get_markeredgewidth(self) -> float: - ... - - def get_markerfacecolor(self) -> ColorType: - ... - - def get_markerfacecoloralt(self) -> ColorType: - ... - - def get_markersize(self) -> float: - ... - - def get_data(self, orig: bool = ...) -> tuple[ArrayLike, ArrayLike]: - ... - - def get_xdata(self, orig: bool = ...) -> ArrayLike: - ... - - def get_ydata(self, orig: bool = ...) -> ArrayLike: - ... - - def get_path(self) -> Path: - ... - - def get_xydata(self) -> ArrayLike: - ... - - def set_antialiased(self, b: bool) -> None: - ... - - def set_color(self, color: ColorType) -> None: - ... - - def set_drawstyle(self, drawstyle: DrawStyleType | None) -> None: - ... - - def set_gapcolor(self, gapcolor: ColorType | None) -> None: - ... - - def set_linewidth(self, w: float) -> None: - ... - - def set_linestyle(self, ls: LineStyleType) -> None: - ... - - def set_marker(self, marker: MarkerType) -> None: - ... - - def set_markeredgecolor(self, ec: ColorType | None) -> None: - ... - - def set_markerfacecolor(self, fc: ColorType | None) -> None: - ... - - def set_markerfacecoloralt(self, fc: ColorType | None) -> None: - ... - - def set_markeredgewidth(self, ew: float | None) -> None: - ... - - def set_markersize(self, sz: float) -> None: - ... - - def set_xdata(self, x: ArrayLike) -> None: - ... - - def set_ydata(self, y: ArrayLike) -> None: - ... - - def set_dashes(self, seq: Sequence[float] | tuple[None, None]) -> None: - ... - - def update_from(self, other: Artist) -> None: - ... - - def set_dash_joinstyle(self, s: JoinStyleType) -> None: - ... - - def set_solid_joinstyle(self, s: JoinStyleType) -> None: - ... - - def get_dash_joinstyle(self) -> Literal["miter", "round", "bevel"]: - ... - - def get_solid_joinstyle(self) -> Literal["miter", "round", "bevel"]: - ... - - def set_dash_capstyle(self, s: CapStyleType) -> None: - ... - - def set_solid_capstyle(self, s: CapStyleType) -> None: - ... - - def get_dash_capstyle(self) -> Literal["butt", "projecting", "round"]: - ... - - def get_solid_capstyle(self) -> Literal["butt", "projecting", "round"]: - ... - - def is_dashed(self) -> bool: - ... - - - -class AxLine(Line2D): - def __init__(self, xy1: tuple[float, float], xy2: tuple[float, float] | None, slope: float | None, **kwargs) -> None: - ... - - def get_xy1(self) -> tuple[float, float] | None: - ... - - def get_xy2(self) -> tuple[float, float] | None: - ... - - def get_slope(self) -> float: - ... - - def set_xy1(self, x: float, y: float) -> None: - ... - - def set_xy2(self, x: float, y: float) -> None: - ... - - def set_slope(self, slope: float) -> None: - ... - - - -class VertexSelector: - axes: Axes - line: Line2D - cid: int - ind: set[int] - def __init__(self, line: Line2D) -> None: - ... - - @property - def canvas(self) -> FigureCanvasBase: - ... - - def process_selected(self, ind: Sequence[int], xs: ArrayLike, ys: ArrayLike) -> None: - ... - - def onpick(self, event: Any) -> None: - ... - - - -lineStyles: dict[str, str] -lineMarkers: dict[str | int, str] -drawStyles: dict[str, str] -fillStyles: tuple[FillStyleType, ...] diff --git a/typings/matplotlib/markers.pyi b/typings/matplotlib/markers.pyi deleted file mode 100644 index 8a094e7..0000000 --- a/typings/matplotlib/markers.pyi +++ /dev/null @@ -1,76 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Literal -from .path import Path -from .transforms import Affine2D, Transform -from numpy.typing import ArrayLike -from .typing import CapStyleType, FillStyleType, JoinStyleType - -TICKLEFT: int -TICKRIGHT: int -TICKUP: int -TICKDOWN: int -CARETLEFT: int -CARETRIGHT: int -CARETUP: int -CARETDOWN: int -CARETLEFTBASE: int -CARETRIGHTBASE: int -CARETUPBASE: int -CARETDOWNBASE: int -class MarkerStyle: - markers: dict[str | int, str] - filled_markers: tuple[str, ...] - fillstyles: tuple[FillStyleType, ...] - def __init__(self, marker: str | ArrayLike | Path | MarkerStyle | None, fillstyle: FillStyleType | None = ..., transform: Transform | None = ..., capstyle: CapStyleType | None = ..., joinstyle: JoinStyleType | None = ...) -> None: - ... - - def __bool__(self) -> bool: - ... - - def is_filled(self) -> bool: - ... - - def get_fillstyle(self) -> FillStyleType: - ... - - def get_joinstyle(self) -> Literal["miter", "round", "bevel"]: - ... - - def get_capstyle(self) -> Literal["butt", "projecting", "round"]: - ... - - def get_marker(self) -> str | ArrayLike | Path | None: - ... - - def get_path(self) -> Path: - ... - - def get_transform(self) -> Transform: - ... - - def get_alt_path(self) -> Path | None: - ... - - def get_alt_transform(self) -> Transform: - ... - - def get_snap_threshold(self) -> float | None: - ... - - def get_user_transform(self) -> Transform | None: - ... - - def transformed(self, transform: Affine2D) -> MarkerStyle: - ... - - def rotated(self, *, deg: float | None = ..., rad: float | None = ...) -> MarkerStyle: - ... - - def scaled(self, sx: float, sy: float | None = ...) -> MarkerStyle: - ... - - - diff --git a/typings/matplotlib/mathtext.pyi b/typings/matplotlib/mathtext.pyi deleted file mode 100644 index a712cab..0000000 --- a/typings/matplotlib/mathtext.pyi +++ /dev/null @@ -1,28 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -from typing import Generic, IO, Literal, TypeVar, overload -from matplotlib.font_manager import FontProperties -from matplotlib.typing import ColorType -from ._mathtext import RasterParse as RasterParse, VectorParse as VectorParse - -_ParseType = TypeVar("_ParseType", RasterParse, VectorParse) -class MathTextParser(Generic[_ParseType]): - @overload - def __init__(self: MathTextParser[VectorParse], output: Literal["path"]) -> None: - ... - - @overload - def __init__(self: MathTextParser[RasterParse], output: Literal["agg", "raster", "macosx"]) -> None: - ... - - def parse(self, s: str, dpi: float = ..., prop: FontProperties | None = ..., *, antialiased: bool | None = ...) -> _ParseType: - ... - - - -def math_to_image(s: str, filename_or_obj: str | os.PathLike | IO, prop: FontProperties | None = ..., dpi: float | None = ..., format: str | None = ..., *, color: ColorType | None = ...) -> float: - ... - diff --git a/typings/matplotlib/mlab.pyi b/typings/matplotlib/mlab.pyi deleted file mode 100644 index 95929bc..0000000 --- a/typings/matplotlib/mlab.pyi +++ /dev/null @@ -1,73 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from collections.abc import Callable -from typing import Literal -from numpy.typing import ArrayLike - -def window_hanning(x: ArrayLike) -> ArrayLike: - ... - -def window_none(x: ArrayLike) -> ArrayLike: - ... - -def detrend(x: ArrayLike, key: Literal["default", "constant", "mean", "linear", "none"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., axis: int | None = ...) -> ArrayLike: - ... - -def detrend_mean(x: ArrayLike, axis: int | None = ...) -> ArrayLike: - ... - -def detrend_none(x: ArrayLike, axis: int | None = ...) -> ArrayLike: - ... - -def detrend_linear(y: ArrayLike) -> ArrayLike: - ... - -def psd(x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ...) -> tuple[ArrayLike, ArrayLike]: - ... - -def csd(x: ArrayLike, y: ArrayLike | None, NFFT: int | None = ..., Fs: float | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ...) -> tuple[ArrayLike, ArrayLike]: - ... - -complex_spectrum = ... -magnitude_spectrum = ... -angle_spectrum = ... -phase_spectrum = ... -def specgram(x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., mode: Literal["psd", "complex", "magnitude", "angle", "phase"] | None = ...) -> tuple[ArrayLike, ArrayLike, ArrayLike]: - ... - -def cohere(x: ArrayLike, y: ArrayLike, NFFT: int = ..., Fs: float = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike = ..., noverlap: int = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] = ..., scale_by_freq: bool | None = ...) -> tuple[ArrayLike, ArrayLike]: - ... - -class GaussianKDE: - dataset: ArrayLike - dim: int - num_dp: int - factor: float - data_covariance: ArrayLike - data_inv_cov: ArrayLike - covariance: ArrayLike - inv_cov: ArrayLike - norm_factor: float - def __init__(self, dataset: ArrayLike, bw_method: Literal["scott", "silverman"] | float | Callable[[GaussianKDE], float] | None = ...) -> None: - ... - - def scotts_factor(self) -> float: - ... - - def silverman_factor(self) -> float: - ... - - def covariance_factor(self) -> float: - ... - - def evaluate(self, points: ArrayLike) -> np.ndarray: - ... - - def __call__(self, points: ArrayLike) -> np.ndarray: - ... - - - diff --git a/typings/matplotlib/offsetbox.pyi b/typings/matplotlib/offsetbox.pyi deleted file mode 100644 index 42ac52e..0000000 --- a/typings/matplotlib/offsetbox.pyi +++ /dev/null @@ -1,354 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib.artist as martist -import matplotlib.text as mtext -from matplotlib.backend_bases import Event, FigureCanvasBase, RendererBase -from matplotlib.colors import Colormap, Normalize -from matplotlib.figure import Figure -from matplotlib.font_manager import FontProperties -from matplotlib.image import BboxImage -from matplotlib.patches import FancyArrowPatch, FancyBboxPatch -from matplotlib.transforms import Bbox, BboxBase, Transform -from numpy.typing import ArrayLike -from collections.abc import Callable -from typing import Any, Literal, overload - -DEBUG: bool -def bbox_artist(*args, **kwargs) -> None: - ... - -class OffsetBox(martist.Artist): - width: float | None - height: float | None - def __init__(self, *args, **kwargs) -> None: - ... - - def set_figure(self, fig: Figure) -> None: - ... - - def set_offset(self, xy: tuple[float, float] | Callable[[float, float, float, float, RendererBase], tuple[float, float]]) -> None: - ... - - @overload - def get_offset(self, bbox: Bbox, renderer: RendererBase) -> tuple[float, float]: - ... - - @overload - def get_offset(self, width: float, height: float, xdescent: float, ydescent: float, renderer: RendererBase) -> tuple[float, float]: - ... - - def set_width(self, width: float) -> None: - ... - - def set_height(self, height: float) -> None: - ... - - def get_visible_children(self) -> list[martist.Artist]: - ... - - def get_children(self) -> list[martist.Artist]: - ... - - def get_bbox(self, renderer: RendererBase) -> Bbox: - ... - - def get_extent_offsets(self, renderer: RendererBase) -> tuple[float, float, float, float, list[tuple[float, float]]]: - ... - - def get_extent(self, renderer: RendererBase) -> tuple[float, float, float, float]: - ... - - def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - - -class PackerBase(OffsetBox): - height: float | None - width: float | None - sep: float | None - pad: float | None - mode: Literal["fixed", "expand", "equal"] - align: Literal["top", "bottom", "left", "right", "center", "baseline"] - def __init__(self, pad: float | None = ..., sep: float | None = ..., width: float | None = ..., height: float | None = ..., align: Literal["top", "bottom", "left", "right", "center", "baseline"] = ..., mode: Literal["fixed", "expand", "equal"] = ..., children: list[martist.Artist] | None = ...) -> None: - ... - - - -class VPacker(PackerBase): - ... - - -class HPacker(PackerBase): - ... - - -class PaddedBox(OffsetBox): - pad: float | None - patch: FancyBboxPatch - def __init__(self, child: martist.Artist, pad: float | None = ..., *, draw_frame: bool = ..., patch_attrs: dict[str, Any] | None = ...) -> None: - ... - - def update_frame(self, bbox: Bbox, fontsize: float | None = ...) -> None: - ... - - def draw_frame(self, renderer: RendererBase) -> None: - ... - - - -class DrawingArea(OffsetBox): - width: float - height: float - xdescent: float - ydescent: float - offset_transform: Transform - dpi_transform: Transform - def __init__(self, width: float, height: float, xdescent: float = ..., ydescent: float = ..., clip: bool = ...) -> None: - ... - - @property - def clip_children(self) -> bool: - ... - - @clip_children.setter - def clip_children(self, val: bool) -> None: - ... - - def get_transform(self) -> Transform: - ... - - def set_offset(self, xy: tuple[float, float]) -> None: - ... - - def get_offset(self) -> tuple[float, float]: - ... - - def add_artist(self, a: martist.Artist) -> None: - ... - - - -class TextArea(OffsetBox): - offset_transform: Transform - def __init__(self, s: str, *, textprops: dict[str, Any] | None = ..., multilinebaseline: bool = ...) -> None: - ... - - def set_text(self, s: str) -> None: - ... - - def get_text(self) -> str: - ... - - def set_multilinebaseline(self, t: bool) -> None: - ... - - def get_multilinebaseline(self) -> bool: - ... - - def set_offset(self, xy: tuple[float, float]) -> None: - ... - - def get_offset(self) -> tuple[float, float]: - ... - - - -class AuxTransformBox(OffsetBox): - aux_transform: Transform - offset_transform: Transform - ref_offset_transform: Transform - def __init__(self, aux_transform: Transform) -> None: - ... - - def add_artist(self, a: martist.Artist) -> None: - ... - - def get_transform(self) -> Transform: - ... - - def set_offset(self, xy: tuple[float, float]) -> None: - ... - - def get_offset(self) -> tuple[float, float]: - ... - - - -class AnchoredOffsetbox(OffsetBox): - zorder: float - codes: dict[str, int] - loc: int - borderpad: float - pad: float - prop: FontProperties - patch: FancyBboxPatch - def __init__(self, loc: str, *, pad: float = ..., borderpad: float = ..., child: OffsetBox | None = ..., prop: FontProperties | None = ..., frameon: bool = ..., bbox_to_anchor: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None = ..., bbox_transform: Transform | None = ..., **kwargs) -> None: - ... - - def set_child(self, child: OffsetBox | None) -> None: - ... - - def get_child(self) -> OffsetBox | None: - ... - - def get_children(self) -> list[martist.Artist]: - ... - - def get_bbox_to_anchor(self) -> Bbox: - ... - - def set_bbox_to_anchor(self, bbox: BboxBase, transform: Transform | None = ...) -> None: - ... - - def update_frame(self, bbox: Bbox, fontsize: float | None = ...) -> None: - ... - - - -class AnchoredText(AnchoredOffsetbox): - txt: TextArea - def __init__(self, s: str, loc: str, *, pad: float = ..., borderpad: float = ..., prop: dict[str, Any] | None = ..., **kwargs) -> None: - ... - - - -class OffsetImage(OffsetBox): - image: BboxImage - def __init__(self, arr: ArrayLike, *, zoom: float = ..., cmap: Colormap | str | None = ..., norm: Normalize | str | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool = ..., dpi_cor: bool = ..., **kwargs) -> None: - ... - - stale: bool - def set_data(self, arr: ArrayLike | None) -> None: - ... - - def get_data(self) -> ArrayLike | None: - ... - - def set_zoom(self, zoom: float) -> None: - ... - - def get_zoom(self) -> float: - ... - - def get_children(self) -> list[martist.Artist]: - ... - - def get_offset(self) -> tuple[float, float]: - ... - - - -class AnnotationBbox(martist.Artist, mtext._AnnotationBase): - zorder: float - offsetbox: OffsetBox - arrowprops: dict[str, Any] | None - xybox: tuple[float, float] - boxcoords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform] - arrow_patch: FancyArrowPatch | None - patch: FancyBboxPatch - prop: FontProperties - def __init__(self, offsetbox: OffsetBox, xy: tuple[float, float], xybox: tuple[float, float] | None = ..., xycoords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform] = ..., boxcoords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform] | None = ..., *, frameon: bool = ..., pad: float = ..., annotation_clip: bool | None = ..., box_alignment: tuple[float, float] = ..., bboxprops: dict[str, Any] | None = ..., arrowprops: dict[str, Any] | None = ..., fontsize: float | str | None = ..., **kwargs) -> None: - ... - - @property - def xyann(self) -> tuple[float, float]: - ... - - @xyann.setter - def xyann(self, xyann: tuple[float, float]) -> None: - ... - - @property - def anncoords(self) -> str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform]: - ... - - @anncoords.setter - def anncoords(self, coords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform]) -> None: - ... - - def get_children(self) -> list[martist.Artist]: - ... - - def set_figure(self, fig: Figure) -> None: - ... - - def set_fontsize(self, s: str | float | None = ...) -> None: - ... - - def get_fontsize(self) -> float: - ... - - def get_tightbbox(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - def update_positions(self, renderer: RendererBase) -> None: - ... - - - -class DraggableBase: - ref_artist: martist.Artist - got_artist: bool - canvas: FigureCanvasBase - cids: list[int] - mouse_x: int - mouse_y: int - background: Any - def __init__(self, ref_artist: martist.Artist, use_blit: bool = ...) -> None: - ... - - def on_motion(self, evt: Event) -> None: - ... - - def on_pick(self, evt: Event) -> None: - ... - - def on_release(self, event: Event) -> None: - ... - - def disconnect(self) -> None: - ... - - def save_offset(self) -> None: - ... - - def update_offset(self, dx: float, dy: float) -> None: - ... - - def finalize_offset(self) -> None: - ... - - - -class DraggableOffsetBox(DraggableBase): - offsetbox: OffsetBox - def __init__(self, ref_artist: martist.Artist, offsetbox: OffsetBox, use_blit: bool = ...) -> None: - ... - - def save_offset(self) -> None: - ... - - def update_offset(self, dx: float, dy: float) -> None: - ... - - def get_loc_in_canvas(self) -> tuple[float, float]: - ... - - - -class DraggableAnnotation(DraggableBase): - annotation: mtext.Annotation - def __init__(self, annotation: mtext.Annotation, use_blit: bool = ...) -> None: - ... - - def save_offset(self) -> None: - ... - - def update_offset(self, dx: float, dy: float) -> None: - ... - - - diff --git a/typings/matplotlib/patches.pyi b/typings/matplotlib/patches.pyi deleted file mode 100644 index 3fefb3b..0000000 --- a/typings/matplotlib/patches.pyi +++ /dev/null @@ -1,829 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from . import artist -from .axes import Axes -from .backend_bases import MouseEvent, RendererBase -from .path import Path -from .transforms import Bbox, Transform -from typing import Any, Literal, overload -from numpy.typing import ArrayLike -from .typing import CapStyleType, ColorType, JoinStyleType, LineStyleType - -class Patch(artist.Artist): - zorder: float - def __init__(self, *, edgecolor: ColorType | None = ..., facecolor: ColorType | None = ..., color: ColorType | None = ..., linewidth: float | None = ..., linestyle: LineStyleType | None = ..., antialiased: bool | None = ..., hatch: str | None = ..., fill: bool = ..., capstyle: CapStyleType | None = ..., joinstyle: JoinStyleType | None = ..., **kwargs) -> None: - ... - - def get_verts(self) -> ArrayLike: - ... - - def contains(self, mouseevent: MouseEvent, radius: float | None = ...) -> tuple[bool, dict[Any, Any]]: - ... - - def contains_point(self, point: tuple[float, float], radius: float | None = ...) -> bool: - ... - - def contains_points(self, points: ArrayLike, radius: float | None = ...) -> np.ndarray: - ... - - def get_extents(self) -> Bbox: - ... - - def get_transform(self) -> Transform: - ... - - def get_data_transform(self) -> Transform: - ... - - def get_patch_transform(self) -> Transform: - ... - - def get_antialiased(self) -> bool: - ... - - def get_edgecolor(self) -> ColorType: - ... - - def get_facecolor(self) -> ColorType: - ... - - def get_linewidth(self) -> float: - ... - - def get_linestyle(self) -> LineStyleType: - ... - - def set_antialiased(self, aa: bool | None) -> None: - ... - - def set_edgecolor(self, color: ColorType | None) -> None: - ... - - def set_facecolor(self, color: ColorType | None) -> None: - ... - - def set_color(self, c: ColorType | None) -> None: - ... - - def set_alpha(self, alpha: float | None) -> None: - ... - - def set_linewidth(self, w: float | None) -> None: - ... - - def set_linestyle(self, ls: LineStyleType | None) -> None: - ... - - def set_fill(self, b: bool) -> None: - ... - - def get_fill(self) -> bool: - ... - - fill = ... - def set_capstyle(self, s: CapStyleType) -> None: - ... - - def get_capstyle(self) -> Literal["butt", "projecting", "round"]: - ... - - def set_joinstyle(self, s: JoinStyleType) -> None: - ... - - def get_joinstyle(self) -> Literal["miter", "round", "bevel"]: - ... - - def set_hatch(self, hatch: str) -> None: - ... - - def get_hatch(self) -> str: - ... - - def get_path(self) -> Path: - ... - - - -class Shadow(Patch): - patch: Patch - def __init__(self, patch: Patch, ox: float, oy: float, *, shade: float = ..., **kwargs) -> None: - ... - - - -class Rectangle(Patch): - angle: float - def __init__(self, xy: tuple[float, float], width: float, height: float, *, angle: float = ..., rotation_point: Literal["xy", "center"] | tuple[float, float] = ..., **kwargs) -> None: - ... - - @property - def rotation_point(self) -> Literal["xy", "center"] | tuple[float, float]: - ... - - @rotation_point.setter - def rotation_point(self, value: Literal["xy", "center"] | tuple[float, float]) -> None: - ... - - def get_x(self) -> float: - ... - - def get_y(self) -> float: - ... - - def get_xy(self) -> tuple[float, float]: - ... - - def get_corners(self) -> np.ndarray: - ... - - def get_center(self) -> np.ndarray: - ... - - def get_width(self) -> float: - ... - - def get_height(self) -> float: - ... - - def get_angle(self) -> float: - ... - - def set_x(self, x: float) -> None: - ... - - def set_y(self, y: float) -> None: - ... - - def set_angle(self, angle: float) -> None: - ... - - def set_xy(self, xy: tuple[float, float]) -> None: - ... - - def set_width(self, w: float) -> None: - ... - - def set_height(self, h: float) -> None: - ... - - @overload - def set_bounds(self, args: tuple[float, float, float, float], /) -> None: - ... - - @overload - def set_bounds(self, left: float, bottom: float, width: float, height: float, /) -> None: - ... - - def get_bbox(self) -> Bbox: - ... - - xy = ... - - -class RegularPolygon(Patch): - xy: tuple[float, float] - numvertices: int - orientation: float - radius: float - def __init__(self, xy: tuple[float, float], numVertices: int, *, radius: float = ..., orientation: float = ..., **kwargs) -> None: - ... - - - -class PathPatch(Patch): - def __init__(self, path: Path, **kwargs) -> None: - ... - - def set_path(self, path: Path) -> None: - ... - - - -class StepPatch(PathPatch): - orientation: Literal["vertical", "horizontal"] - def __init__(self, values: ArrayLike, edges: ArrayLike, *, orientation: Literal["vertical", "horizontal"] = ..., baseline: float = ..., **kwargs) -> None: - ... - - def get_data(self) -> tuple[np.ndarray, np.ndarray, float]: - ... - - def set_data(self, values: ArrayLike | None = ..., edges: ArrayLike | None = ..., baseline: float | None = ...) -> None: - ... - - - -class Polygon(Patch): - def __init__(self, xy: ArrayLike, *, closed: bool = ..., **kwargs) -> None: - ... - - def get_closed(self) -> bool: - ... - - def set_closed(self, closed: bool) -> None: - ... - - def get_xy(self) -> np.ndarray: - ... - - def set_xy(self, xy: ArrayLike) -> None: - ... - - xy = ... - - -class Wedge(Patch): - center: tuple[float, float] - r: float - theta1: float - theta2: float - width: float | None - def __init__(self, center: tuple[float, float], r: float, theta1: float, theta2: float, *, width: float | None = ..., **kwargs) -> None: - ... - - def set_center(self, center: tuple[float, float]) -> None: - ... - - def set_radius(self, radius: float) -> None: - ... - - def set_theta1(self, theta1: float) -> None: - ... - - def set_theta2(self, theta2: float) -> None: - ... - - def set_width(self, width: float | None) -> None: - ... - - - -class Arrow(Patch): - def __init__(self, x: float, y: float, dx: float, dy: float, *, width: float = ..., **kwargs) -> None: - ... - - - -class FancyArrow(Polygon): - def __init__(self, x: float, y: float, dx: float, dy: float, *, width: float = ..., length_includes_head: bool = ..., head_width: float | None = ..., head_length: float | None = ..., shape: Literal["full", "left", "right"] = ..., overhang: float = ..., head_starts_at_zero: bool = ..., **kwargs) -> None: - ... - - def set_data(self, *, x: float | None = ..., y: float | None = ..., dx: float | None = ..., dy: float | None = ..., width: float | None = ..., head_width: float | None = ..., head_length: float | None = ...) -> None: - ... - - - -class CirclePolygon(RegularPolygon): - def __init__(self, xy: tuple[float, float], radius: float = ..., *, resolution: int = ..., **kwargs) -> None: - ... - - - -class Ellipse(Patch): - def __init__(self, xy: tuple[float, float], width: float, height: float, *, angle: float = ..., **kwargs) -> None: - ... - - def set_center(self, xy: tuple[float, float]) -> None: - ... - - def get_center(self) -> float: - ... - - center = ... - def set_width(self, width: float) -> None: - ... - - def get_width(self) -> float: - ... - - width = ... - def set_height(self, height: float) -> None: - ... - - def get_height(self) -> float: - ... - - height = ... - def set_angle(self, angle: float) -> None: - ... - - def get_angle(self) -> float: - ... - - angle = ... - def get_corners(self) -> np.ndarray: - ... - - def get_vertices(self) -> list[tuple[float, float]]: - ... - - def get_co_vertices(self) -> list[tuple[float, float]]: - ... - - - -class Annulus(Patch): - a: float - b: float - def __init__(self, xy: tuple[float, float], r: float | tuple[float, float], width: float, angle: float = ..., **kwargs) -> None: - ... - - def set_center(self, xy: tuple[float, float]) -> None: - ... - - def get_center(self) -> tuple[float, float]: - ... - - center = ... - def set_width(self, width: float) -> None: - ... - - def get_width(self) -> float: - ... - - width = ... - def set_angle(self, angle: float) -> None: - ... - - def get_angle(self) -> float: - ... - - angle = ... - def set_semimajor(self, a: float) -> None: - ... - - def set_semiminor(self, b: float) -> None: - ... - - def set_radii(self, r: float | tuple[float, float]) -> None: - ... - - def get_radii(self) -> tuple[float, float]: - ... - - radii = ... - - -class Circle(Ellipse): - def __init__(self, xy: tuple[float, float], radius: float = ..., **kwargs) -> None: - ... - - def set_radius(self, radius: float) -> None: - ... - - def get_radius(self) -> float: - ... - - radius = ... - - -class Arc(Ellipse): - theta1: float - theta2: float - def __init__(self, xy: tuple[float, float], width: float, height: float, *, angle: float = ..., theta1: float = ..., theta2: float = ..., **kwargs) -> None: - ... - - - -def bbox_artist(artist: artist.Artist, renderer: RendererBase, props: dict[str, Any] | None = ..., fill: bool = ...) -> None: - ... - -def draw_bbox(bbox: Bbox, renderer: RendererBase, color: ColorType = ..., trans: Transform | None = ...) -> None: - ... - -class _Style: - def __new__(cls, stylename, **kwargs): - ... - - @classmethod - def get_styles(cls) -> dict[str, type]: - ... - - @classmethod - def pprint_styles(cls) -> str: - ... - - @classmethod - def register(cls, name: str, style: type) -> None: - ... - - - -class BoxStyle(_Style): - class Square(BoxStyle): - pad: float - def __init__(self, pad: float = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class Circle(BoxStyle): - pad: float - def __init__(self, pad: float = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class Ellipse(BoxStyle): - pad: float - def __init__(self, pad: float = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class LArrow(BoxStyle): - pad: float - def __init__(self, pad: float = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class RArrow(LArrow): - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class DArrow(BoxStyle): - pad: float - def __init__(self, pad: float = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class Round(BoxStyle): - pad: float - rounding_size: float | None - def __init__(self, pad: float = ..., rounding_size: float | None = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class Round4(BoxStyle): - pad: float - rounding_size: float | None - def __init__(self, pad: float = ..., rounding_size: float | None = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class Sawtooth(BoxStyle): - pad: float - tooth_size: float | None - def __init__(self, pad: float = ..., tooth_size: float | None = ...) -> None: - ... - - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - class Roundtooth(Sawtooth): - def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path: - ... - - - - - -class ConnectionStyle(_Style): - class _Base(ConnectionStyle): - class SimpleEvent: - def __init__(self, xy: tuple[float, float]) -> None: - ... - - - - def __call__(self, posA: tuple[float, float], posB: tuple[float, float], shrinkA: float = ..., shrinkB: float = ..., patchA: Patch | None = ..., patchB: Patch | None = ...) -> Path: - ... - - - - class Arc3(_Base): - rad: float - def __init__(self, rad: float = ...) -> None: - ... - - def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path: - ... - - - - class Angle3(_Base): - angleA: float - angleB: float - def __init__(self, angleA: float = ..., angleB: float = ...) -> None: - ... - - def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path: - ... - - - - class Angle(_Base): - angleA: float - angleB: float - rad: float - def __init__(self, angleA: float = ..., angleB: float = ..., rad: float = ...) -> None: - ... - - def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path: - ... - - - - class Arc(_Base): - angleA: float - angleB: float - armA: float | None - armB: float | None - rad: float - def __init__(self, angleA: float = ..., angleB: float = ..., armA: float | None = ..., armB: float | None = ..., rad: float = ...) -> None: - ... - - def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path: - ... - - - - class Bar(_Base): - armA: float - armB: float - fraction: float - angle: float | None - def __init__(self, armA: float = ..., armB: float = ..., fraction: float = ..., angle: float | None = ...) -> None: - ... - - def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path: - ... - - - - - -class ArrowStyle(_Style): - class _Base(ArrowStyle): - @staticmethod - def ensure_quadratic_bezier(path: Path) -> list[float]: - ... - - def transmute(self, path: Path, mutation_size: float, linewidth: float) -> tuple[Path, bool]: - ... - - def __call__(self, path: Path, mutation_size: float, linewidth: float, aspect_ratio: float = ...) -> tuple[Path, bool]: - ... - - - - class _Curve(_Base): - arrow: str - fillbegin: bool - fillend: bool - def __init__(self, head_length: float = ..., head_width: float = ..., widthA: float = ..., widthB: float = ..., lengthA: float = ..., lengthB: float = ..., angleA: float | None = ..., angleB: float | None = ..., scaleA: float | None = ..., scaleB: float | None = ...) -> None: - ... - - - - class Curve(_Curve): - def __init__(self) -> None: - ... - - - - class CurveA(_Curve): - arrow: str - ... - - - class CurveB(_Curve): - arrow: str - ... - - - class CurveAB(_Curve): - arrow: str - ... - - - class CurveFilledA(_Curve): - arrow: str - ... - - - class CurveFilledB(_Curve): - arrow: str - ... - - - class CurveFilledAB(_Curve): - arrow: str - ... - - - class BracketA(_Curve): - arrow: str - def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float = ...) -> None: - ... - - - - class BracketB(_Curve): - arrow: str - def __init__(self, widthB: float = ..., lengthB: float = ..., angleB: float = ...) -> None: - ... - - - - class BracketAB(_Curve): - arrow: str - def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float = ..., widthB: float = ..., lengthB: float = ..., angleB: float = ...) -> None: - ... - - - - class BarAB(_Curve): - arrow: str - def __init__(self, widthA: float = ..., angleA: float = ..., widthB: float = ..., angleB: float = ...) -> None: - ... - - - - class BracketCurve(_Curve): - arrow: str - def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float | None = ...) -> None: - ... - - - - class CurveBracket(_Curve): - arrow: str - def __init__(self, widthB: float = ..., lengthB: float = ..., angleB: float | None = ...) -> None: - ... - - - - class Simple(_Base): - def __init__(self, head_length: float = ..., head_width: float = ..., tail_width: float = ...) -> None: - ... - - - - class Fancy(_Base): - def __init__(self, head_length: float = ..., head_width: float = ..., tail_width: float = ...) -> None: - ... - - - - class Wedge(_Base): - tail_width: float - shrink_factor: float - def __init__(self, tail_width: float = ..., shrink_factor: float = ...) -> None: - ... - - - - - -class FancyBboxPatch(Patch): - def __init__(self, xy: tuple[float, float], width: float, height: float, boxstyle: str | BoxStyle = ..., *, mutation_scale: float = ..., mutation_aspect: float = ..., **kwargs) -> None: - ... - - def set_boxstyle(self, boxstyle: str | BoxStyle | None = ..., **kwargs) -> None: - ... - - def get_boxstyle(self) -> BoxStyle: - ... - - def set_mutation_scale(self, scale: float) -> None: - ... - - def get_mutation_scale(self) -> float: - ... - - def set_mutation_aspect(self, aspect: float) -> None: - ... - - def get_mutation_aspect(self) -> float: - ... - - def get_x(self) -> float: - ... - - def get_y(self) -> float: - ... - - def get_width(self) -> float: - ... - - def get_height(self) -> float: - ... - - def set_x(self, x: float) -> None: - ... - - def set_y(self, y: float) -> None: - ... - - def set_width(self, w: float) -> None: - ... - - def set_height(self, h: float) -> None: - ... - - @overload - def set_bounds(self, args: tuple[float, float, float, float], /) -> None: - ... - - @overload - def set_bounds(self, left: float, bottom: float, width: float, height: float, /) -> None: - ... - - def get_bbox(self) -> Bbox: - ... - - - -class FancyArrowPatch(Patch): - patchA: Patch - patchB: Patch - shrinkA: float - shrinkB: float - def __init__(self, posA: tuple[float, float] | None = ..., posB: tuple[float, float] | None = ..., *, path: Path | None = ..., arrowstyle: str | ArrowStyle = ..., connectionstyle: str | ConnectionStyle = ..., patchA: Patch | None = ..., patchB: Patch | None = ..., shrinkA: float = ..., shrinkB: float = ..., mutation_scale: float = ..., mutation_aspect: float | None = ..., **kwargs) -> None: - ... - - def set_positions(self, posA: tuple[float, float], posB: tuple[float, float]) -> None: - ... - - def set_patchA(self, patchA: Patch) -> None: - ... - - def set_patchB(self, patchB: Patch) -> None: - ... - - def set_connectionstyle(self, connectionstyle: str | ConnectionStyle | None = ..., **kwargs) -> None: - ... - - def get_connectionstyle(self) -> ConnectionStyle: - ... - - def set_arrowstyle(self, arrowstyle: str | ArrowStyle | None = ..., **kwargs) -> None: - ... - - def get_arrowstyle(self) -> ArrowStyle: - ... - - def set_mutation_scale(self, scale: float) -> None: - ... - - def get_mutation_scale(self) -> float: - ... - - def set_mutation_aspect(self, aspect: float | None) -> None: - ... - - def get_mutation_aspect(self) -> float: - ... - - - -class ConnectionPatch(FancyArrowPatch): - xy1: tuple[float, float] - xy2: tuple[float, float] - coords1: str | Transform - coords2: str | Transform | None - axesA: Axes | None - axesB: Axes | None - def __init__(self, xyA: tuple[float, float], xyB: tuple[float, float], coordsA: str | Transform, coordsB: str | Transform | None = ..., *, axesA: Axes | None = ..., axesB: Axes | None = ..., arrowstyle: str | ArrowStyle = ..., connectionstyle: str | ConnectionStyle = ..., patchA: Patch | None = ..., patchB: Patch | None = ..., shrinkA: float = ..., shrinkB: float = ..., mutation_scale: float = ..., mutation_aspect: float | None = ..., clip_on: bool = ..., **kwargs) -> None: - ... - - def set_annotation_clip(self, b: bool | None) -> None: - ... - - def get_annotation_clip(self) -> bool | None: - ... - - - diff --git a/typings/matplotlib/path.pyi b/typings/matplotlib/path.pyi deleted file mode 100644 index a1440c8..0000000 --- a/typings/matplotlib/path.pyi +++ /dev/null @@ -1,167 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from .bezier import BezierSegment -from .transforms import Affine2D, Bbox, Transform -from collections.abc import Generator, Iterable, Sequence -from numpy.typing import ArrayLike -from typing import Any, overload - -class Path: - code_type: type[np.uint8] - STOP: np.uint8 - MOVETO: np.uint8 - LINETO: np.uint8 - CURVE3: np.uint8 - CURVE4: np.uint8 - CLOSEPOLY: np.uint8 - NUM_VERTICES_FOR_CODE: dict[np.uint8, int] - def __init__(self, vertices: ArrayLike, codes: ArrayLike | None = ..., _interpolation_steps: int = ..., closed: bool = ..., readonly: bool = ...) -> None: - ... - - @property - def vertices(self) -> ArrayLike: - ... - - @vertices.setter - def vertices(self, vertices: ArrayLike) -> None: - ... - - @property - def codes(self) -> ArrayLike: - ... - - @codes.setter - def codes(self, codes: ArrayLike) -> None: - ... - - @property - def simplify_threshold(self) -> float: - ... - - @simplify_threshold.setter - def simplify_threshold(self, threshold: float) -> None: - ... - - @property - def should_simplify(self) -> bool: - ... - - @should_simplify.setter - def should_simplify(self, should_simplify: bool) -> None: - ... - - @property - def readonly(self) -> bool: - ... - - def copy(self) -> Path: - ... - - def __deepcopy__(self, memo: dict[int, Any] | None = ...) -> Path: - ... - - deepcopy = ... - @classmethod - def make_compound_path_from_polys(cls, XY: ArrayLike) -> Path: - ... - - @classmethod - def make_compound_path(cls, *args: Path) -> Path: - ... - - def __len__(self) -> int: - ... - - def iter_segments(self, transform: Transform | None = ..., remove_nans: bool = ..., clip: tuple[float, float, float, float] | None = ..., snap: bool | None = ..., stroke_width: float = ..., simplify: bool | None = ..., curves: bool = ..., sketch: tuple[float, float, float] | None = ...) -> Generator[tuple[np.ndarray, np.uint8], None, None]: - ... - - def iter_bezier(self, **kwargs) -> Generator[BezierSegment, None, None]: - ... - - def cleaned(self, transform: Transform | None = ..., remove_nans: bool = ..., clip: tuple[float, float, float, float] | None = ..., *, simplify: bool | None = ..., curves: bool = ..., stroke_width: float = ..., snap: bool | None = ..., sketch: tuple[float, float, float] | None = ...) -> Path: - ... - - def transformed(self, transform: Transform) -> Path: - ... - - def contains_point(self, point: tuple[float, float], transform: Transform | None = ..., radius: float = ...) -> bool: - ... - - def contains_points(self, points: ArrayLike, transform: Transform | None = ..., radius: float = ...) -> np.ndarray: - ... - - def contains_path(self, path: Path, transform: Transform | None = ...) -> bool: - ... - - def get_extents(self, transform: Transform | None = ..., **kwargs) -> Bbox: - ... - - def intersects_path(self, other: Path, filled: bool = ...) -> bool: - ... - - def intersects_bbox(self, bbox: Bbox, filled: bool = ...) -> bool: - ... - - def interpolated(self, steps: int) -> Path: - ... - - def to_polygons(self, transform: Transform | None = ..., width: float = ..., height: float = ..., closed_only: bool = ...) -> list[ArrayLike]: - ... - - @classmethod - def unit_rectangle(cls) -> Path: - ... - - @classmethod - def unit_regular_polygon(cls, numVertices: int) -> Path: - ... - - @classmethod - def unit_regular_star(cls, numVertices: int, innerCircle: float = ...) -> Path: - ... - - @classmethod - def unit_regular_asterisk(cls, numVertices: int) -> Path: - ... - - @classmethod - def unit_circle(cls) -> Path: - ... - - @classmethod - def circle(cls, center: tuple[float, float] = ..., radius: float = ..., readonly: bool = ...) -> Path: - ... - - @classmethod - def unit_circle_righthalf(cls) -> Path: - ... - - @classmethod - def arc(cls, theta1: float, theta2: float, n: int | None = ..., is_wedge: bool = ...) -> Path: - ... - - @classmethod - def wedge(cls, theta1: float, theta2: float, n: int | None = ...) -> Path: - ... - - @overload - @staticmethod - def hatch(hatchpattern: str, density: float = ...) -> Path: - ... - - @overload - @staticmethod - def hatch(hatchpattern: None, density: float = ...) -> None: - ... - - def clip_to_bbox(self, bbox: Bbox, inside: bool = ...) -> Path: - ... - - - -def get_path_collection_extents(master_transform: Transform, paths: Sequence[Path], transforms: Iterable[Affine2D], offsets: ArrayLike, offset_transform: Affine2D) -> Bbox: - ... - diff --git a/typings/matplotlib/patheffects.pyi b/typings/matplotlib/patheffects.pyi deleted file mode 100644 index f167703..0000000 --- a/typings/matplotlib/patheffects.pyi +++ /dev/null @@ -1,104 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Iterable, Sequence -from typing import Any -from matplotlib.backend_bases import GraphicsContextBase, RendererBase -from matplotlib.path import Path -from matplotlib.patches import Patch -from matplotlib.transforms import Transform -from matplotlib.typing import ColorType - -class AbstractPathEffect: - def __init__(self, offset: tuple[float, float] = ...) -> None: - ... - - def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType | None = ...) -> None: - ... - - - -class PathEffectRenderer(RendererBase): - def __init__(self, path_effects: Iterable[AbstractPathEffect], renderer: RendererBase) -> None: - ... - - def copy_with_path_effect(self, path_effects: Iterable[AbstractPathEffect]) -> PathEffectRenderer: - ... - - def draw_path(self, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType | None = ...) -> None: - ... - - def draw_markers(self, gc: GraphicsContextBase, marker_path: Path, marker_trans: Transform, path: Path, *args, **kwargs) -> None: - ... - - def draw_path_collection(self, gc: GraphicsContextBase, master_transform: Transform, paths: Sequence[Path], *args, **kwargs) -> None: - ... - - def __getattribute__(self, name: str) -> Any: - ... - - - -class Normal(AbstractPathEffect): - ... - - -class Stroke(AbstractPathEffect): - def __init__(self, offset: tuple[float, float] = ..., **kwargs) -> None: - ... - - def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None: - ... - - - -class withStroke(Stroke): - ... - - -class SimplePatchShadow(AbstractPathEffect): - def __init__(self, offset: tuple[float, float] = ..., shadow_rgbFace: ColorType | None = ..., alpha: float | None = ..., rho: float = ..., **kwargs) -> None: - ... - - def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None: - ... - - - -class withSimplePatchShadow(SimplePatchShadow): - ... - - -class SimpleLineShadow(AbstractPathEffect): - def __init__(self, offset: tuple[float, float] = ..., shadow_color: ColorType = ..., alpha: float = ..., rho: float = ..., **kwargs) -> None: - ... - - def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None: - ... - - - -class PathPatchEffect(AbstractPathEffect): - patch: Patch - def __init__(self, offset: tuple[float, float] = ..., **kwargs) -> None: - ... - - def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None: - ... - - - -class TickedStroke(AbstractPathEffect): - def __init__(self, offset: tuple[float, float] = ..., spacing: float = ..., angle: float = ..., length: float = ..., **kwargs) -> None: - ... - - def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None: - ... - - - -class withTickedStroke(TickedStroke): - ... - - diff --git a/typings/matplotlib/projections/__init__.pyi b/typings/matplotlib/projections/__init__.pyi deleted file mode 100644 index f8763e8..0000000 --- a/typings/matplotlib/projections/__init__.pyi +++ /dev/null @@ -1,33 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .geo import AitoffAxes, HammerAxes, LambertAxes, MollweideAxes -from .polar import PolarAxes -from ..axes import Axes - -class ProjectionRegistry: - def __init__(self) -> None: - ... - - def register(self, *projections: type[Axes]) -> None: - ... - - def get_projection_class(self, name: str) -> type[Axes]: - ... - - def get_projection_names(self) -> list[str]: - ... - - - -projection_registry: ProjectionRegistry -def register_projection(cls: type[Axes]) -> None: - ... - -def get_projection_class(projection: str | None = ...) -> type[Axes]: - ... - -def get_projection_names() -> list[str]: - ... - diff --git a/typings/matplotlib/projections/geo.pyi b/typings/matplotlib/projections/geo.pyi deleted file mode 100644 index 4f99d8c..0000000 --- a/typings/matplotlib/projections/geo.pyi +++ /dev/null @@ -1,157 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.axes import Axes -from matplotlib.ticker import Formatter -from matplotlib.transforms import Transform -from typing import Any, Literal - -class GeoAxes(Axes): - class ThetaFormatter(Formatter): - def __init__(self, round_to: float = ...) -> None: - ... - - def __call__(self, x: float, pos: Any | None = ...): - ... - - - - RESOLUTION: float - def get_xaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> Transform: - ... - - def get_xaxis_text1_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_xaxis_text2_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_yaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> Transform: - ... - - def get_yaxis_text1_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_yaxis_text2_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def set_xlim(self, *args, **kwargs) -> tuple[float, float]: - ... - - def set_ylim(self, *args, **kwargs) -> tuple[float, float]: - ... - - def format_coord(self, lon: float, lat: float) -> str: - ... - - def set_longitude_grid(self, degrees: float) -> None: - ... - - def set_latitude_grid(self, degrees: float) -> None: - ... - - def set_longitude_grid_ends(self, degrees: float) -> None: - ... - - def get_data_ratio(self) -> float: - ... - - def can_zoom(self) -> bool: - ... - - def can_pan(self) -> bool: - ... - - def start_pan(self, x, y, button) -> None: - ... - - def end_pan(self) -> None: - ... - - def drag_pan(self, button, key, x, y) -> None: - ... - - - -class _GeoTransform(Transform): - input_dims: int - output_dims: int - def __init__(self, resolution: int) -> None: - ... - - - -class AitoffAxes(GeoAxes): - name: str - class AitoffTransform(_GeoTransform): - def inverted(self) -> AitoffAxes.InvertedAitoffTransform: - ... - - - - class InvertedAitoffTransform(_GeoTransform): - def inverted(self) -> AitoffAxes.AitoffTransform: - ... - - - - - -class HammerAxes(GeoAxes): - name: str - class HammerTransform(_GeoTransform): - def inverted(self) -> HammerAxes.InvertedHammerTransform: - ... - - - - class InvertedHammerTransform(_GeoTransform): - def inverted(self) -> HammerAxes.HammerTransform: - ... - - - - - -class MollweideAxes(GeoAxes): - name: str - class MollweideTransform(_GeoTransform): - def inverted(self) -> MollweideAxes.InvertedMollweideTransform: - ... - - - - class InvertedMollweideTransform(_GeoTransform): - def inverted(self) -> MollweideAxes.MollweideTransform: - ... - - - - - -class LambertAxes(GeoAxes): - name: str - class LambertTransform(_GeoTransform): - def __init__(self, center_longitude: float, center_latitude: float, resolution: int) -> None: - ... - - def inverted(self) -> LambertAxes.InvertedLambertTransform: - ... - - - - class InvertedLambertTransform(_GeoTransform): - def __init__(self, center_longitude: float, center_latitude: float, resolution: int) -> None: - ... - - def inverted(self) -> LambertAxes.LambertTransform: - ... - - - - def __init__(self, *args, center_longitude: float = ..., center_latitude: float = ..., **kwargs) -> None: - ... - - - diff --git a/typings/matplotlib/projections/polar.pyi b/typings/matplotlib/projections/polar.pyi deleted file mode 100644 index a5fe868..0000000 --- a/typings/matplotlib/projections/polar.pyi +++ /dev/null @@ -1,242 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib.axis as maxis -import matplotlib.ticker as mticker -import matplotlib.transforms as mtransforms -import numpy as np -from matplotlib.axes import Axes -from matplotlib.lines import Line2D -from matplotlib.text import Text -from numpy.typing import ArrayLike -from collections.abc import Sequence -from typing import Any, ClassVar, Literal, overload - -class PolarTransform(mtransforms.Transform): - input_dims: int - output_dims: int - def __init__(self, axis: PolarAxes | None = ..., use_rmin: bool = ..., _apply_theta_transforms: bool = ..., *, scale_transform: mtransforms.Transform | None = ...) -> None: - ... - - def inverted(self) -> InvertedPolarTransform: - ... - - - -class PolarAffine(mtransforms.Affine2DBase): - def __init__(self, scale_transform: mtransforms.Transform, limits: mtransforms.BboxBase) -> None: - ... - - - -class InvertedPolarTransform(mtransforms.Transform): - input_dims: int - output_dims: int - def __init__(self, axis: PolarAxes | None = ..., use_rmin: bool = ..., _apply_theta_transforms: bool = ...) -> None: - ... - - def inverted(self) -> PolarTransform: - ... - - - -class ThetaFormatter(mticker.Formatter): - ... - - -class _AxisWrapper: - def __init__(self, axis: maxis.Axis) -> None: - ... - - def get_view_interval(self) -> np.ndarray: - ... - - def set_view_interval(self, vmin: float, vmax: float) -> None: - ... - - def get_minpos(self) -> float: - ... - - def get_data_interval(self) -> np.ndarray: - ... - - def set_data_interval(self, vmin: float, vmax: float) -> None: - ... - - def get_tick_space(self) -> int: - ... - - - -class ThetaLocator(mticker.Locator): - base: mticker.Locator - axis: _AxisWrapper | None - def __init__(self, base: mticker.Locator) -> None: - ... - - - -class ThetaTick(maxis.XTick): - def __init__(self, axes: PolarAxes, *args, **kwargs) -> None: - ... - - - -class ThetaAxis(maxis.XAxis): - axis_name: str - ... - - -class RadialLocator(mticker.Locator): - base: mticker.Locator - def __init__(self, base, axes: PolarAxes | None = ...) -> None: - ... - - - -class RadialTick(maxis.YTick): - ... - - -class RadialAxis(maxis.YAxis): - axis_name: str - ... - - -class _WedgeBbox(mtransforms.Bbox): - def __init__(self, center: tuple[float, float], viewLim: mtransforms.Bbox, originLim: mtransforms.Bbox, **kwargs) -> None: - ... - - - -class PolarAxes(Axes): - PolarTransform: ClassVar[type] = ... - PolarAffine: ClassVar[type] = ... - InvertedPolarTransform: ClassVar[type] = ... - ThetaFormatter: ClassVar[type] = ... - RadialLocator: ClassVar[type] = ... - ThetaLocator: ClassVar[type] = ... - name: str - use_sticky_edges: bool - def __init__(self, *args, theta_offset: float = ..., theta_direction: float = ..., rlabel_position: float = ..., **kwargs) -> None: - ... - - def get_xaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> mtransforms.Transform: - ... - - def get_xaxis_text1_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_xaxis_text2_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_yaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> mtransforms.Transform: - ... - - def get_yaxis_text1_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def get_yaxis_text2_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]: - ... - - def set_thetamax(self, thetamax: float) -> None: - ... - - def get_thetamax(self) -> float: - ... - - def set_thetamin(self, thetamin: float) -> None: - ... - - def get_thetamin(self) -> float: - ... - - @overload - def set_thetalim(self, minval: float, maxval: float, /) -> tuple[float, float]: - ... - - @overload - def set_thetalim(self, *, thetamin: float, thetamax: float) -> tuple[float, float]: - ... - - def set_theta_offset(self, offset: float) -> None: - ... - - def get_theta_offset(self) -> float: - ... - - def set_theta_zero_location(self, loc: Literal["N", "NW", "W", "SW", "S", "SE", "E", "NE"], offset: float = ...) -> None: - ... - - def set_theta_direction(self, direction: Literal[-1, 1, "clockwise", "counterclockwise", "anticlockwise"]) -> None: - ... - - def get_theta_direction(self) -> Literal[-1, 1]: - ... - - def set_rmax(self, rmax: float) -> None: - ... - - def get_rmax(self) -> float: - ... - - def set_rmin(self, rmin: float) -> None: - ... - - def get_rmin(self) -> float: - ... - - def set_rorigin(self, rorigin: float | None) -> None: - ... - - def get_rorigin(self) -> float: - ... - - def get_rsign(self) -> float: - ... - - def set_rlim(self, bottom: float | tuple[float, float] | None = ..., top: float | None = ..., *, emit: bool = ..., auto: bool = ..., **kwargs) -> tuple[float, float]: - ... - - def get_rlabel_position(self) -> float: - ... - - def set_rlabel_position(self, value: float) -> None: - ... - - def set_rscale(self, *args, **kwargs) -> None: - ... - - def set_rticks(self, *args, **kwargs) -> None: - ... - - def set_thetagrids(self, angles: ArrayLike, labels: Sequence[str | Text] | None = ..., fmt: str | None = ..., **kwargs) -> tuple[list[Line2D], list[Text]]: - ... - - def set_rgrids(self, radii: ArrayLike, labels: Sequence[str | Text] | None = ..., angle: float | None = ..., fmt: str | None = ..., **kwargs) -> tuple[list[Line2D], list[Text]]: - ... - - def format_coord(self, theta: float, r: float) -> str: - ... - - def get_data_ratio(self) -> float: - ... - - def can_zoom(self) -> bool: - ... - - def can_pan(self) -> bool: - ... - - def start_pan(self, x: float, y: float, button: int) -> None: - ... - - def end_pan(self) -> None: - ... - - def drag_pan(self, button: Any, key: Any, x: float, y: float) -> None: - ... - - - diff --git a/typings/matplotlib/pylab.pyi b/typings/matplotlib/pylab.pyi deleted file mode 100644 index 4e868fb..0000000 --- a/typings/matplotlib/pylab.pyi +++ /dev/null @@ -1,37 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.pyplot import * -from numpy import * -from numpy.fft import * -from numpy.random import * -from numpy.linalg import * - -""" -`pylab` is a historic interface and its use is strongly discouraged. The equivalent -replacement is `matplotlib.pyplot`. See :ref:`api_interfaces` for a full overview -of Matplotlib interfaces. - -`pylab` was designed to support a MATLAB-like way of working with all plotting related -functions directly available in the global namespace. This was achieved through a -wildcard import (``from pylab import *``). - -.. warning:: - The use of `pylab` is discouraged for the following reasons: - - ``from pylab import *`` imports all the functions from `matplotlib.pyplot`, `numpy`, - `numpy.fft`, `numpy.linalg`, and `numpy.random`, and some additional functions into - the global namespace. - - Such a pattern is considered bad practice in modern python, as it clutters the global - namespace. Even more severely, in the case of `pylab`, this will overwrite some - builtin functions (e.g. the builtin `sum` will be replaced by `numpy.sum`), which - can lead to unexpected behavior. - -""" -bytes = ... -abs = ... -max = ... -min = ... -round = ... diff --git a/typings/matplotlib/pyplot.pyi b/typings/matplotlib/pyplot.pyi deleted file mode 100644 index d0b73be..0000000 --- a/typings/matplotlib/pyplot.pyi +++ /dev/null @@ -1,2052 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib -import matplotlib.image -import numpy as np -import datetime -import pathlib -import os -import PIL.Image -from contextlib import AbstractContextManager, ExitStack -from typing import Any, BinaryIO, Literal, TYPE_CHECKING, TypeVar, overload -from matplotlib import _api, _docstring, cbook, rcParams as rcParams, rcsetup -from matplotlib.backend_bases import Event, FigureCanvasBase, FigureManagerBase, MouseButton, RendererBase -from matplotlib.figure import Figure, SubFigure -from matplotlib.artist import Artist -from matplotlib.axes import Axes -from matplotlib.scale import ScaleBase -from matplotlib.cm import ScalarMappable -from matplotlib.colors import Colormap, Normalize -from collections.abc import Callable, Hashable, Iterable, Sequence -from typing_extensions import ParamSpec -from numpy.typing import ArrayLike -from matplotlib.axis import Tick -from matplotlib.axes._base import _AxesBase -from matplotlib.contour import ContourSet, QuadContourSet -from matplotlib.collections import BrokenBarHCollection, Collection, EventCollection, LineCollection, PathCollection, PolyCollection, QuadMesh -from matplotlib.colorbar import Colorbar -from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer -from matplotlib.legend import Legend -from matplotlib.mlab import GaussianKDE -from matplotlib.image import AxesImage, FigureImage -from matplotlib.patches import FancyArrow, Polygon, StepPatch, Wedge -from matplotlib.quiver import Barbs, Quiver, QuiverKey -from matplotlib.transforms import Bbox, Transform -from matplotlib.typing import ColorType, HashableList, LineStyleType, MarkerType -from matplotlib.widgets import SubplotTool -from matplotlib.lines import Line2D -from matplotlib.text import Annotation, Text - -""" -`matplotlib.pyplot` is a state-based interface to matplotlib. It provides -an implicit, MATLAB-like, way of plotting. It also opens figures on your -screen, and acts as the figure GUI manager. - -pyplot is mainly intended for interactive plots and simple cases of -programmatic plot generation:: - - import numpy as np - import matplotlib.pyplot as plt - - x = np.arange(0, 5, 0.1) - y = np.sin(x) - plt.plot(x, y) - -The explicit object-oriented API is recommended for complex plots, though -pyplot is still usually used to create the figure and often the axes in the -figure. See `.pyplot.figure`, `.pyplot.subplots`, and -`.pyplot.subplot_mosaic` to create figures, and -:doc:`Axes API ` for the plotting methods on an Axes:: - - import numpy as np - import matplotlib.pyplot as plt - - x = np.arange(0, 5, 0.1) - y = np.sin(x) - fig, ax = plt.subplots() - ax.plot(x, y) - - -See :ref:`api_interfaces` for an explanation of the tradeoffs between the -implicit and explicit interfaces. -""" -if TYPE_CHECKING: - _P = ParamSpec('_P') - _R = TypeVar('_R') - _T = TypeVar('_T') -_log = ... -colormaps = ... -color_sequences = ... -_ReplDisplayHook = ... -_REPL_DISPLAYHOOK = ... -def install_repl_displayhook() -> None: - """ - Connect to the display hook of the current shell. - - The display hook gets called when the read-evaluate-print-loop (REPL) of - the shell has finished the execution of a command. We use this callback - to be able to automatically update a figure in interactive mode. - - This works both with IPython and with vanilla python shells. - """ - ... - -def uninstall_repl_displayhook() -> None: - """Disconnect from the display hook of the current shell.""" - ... - -draw_all = ... -@_copy_docstring_and_deprecators(matplotlib.set_loglevel) -def set_loglevel(*args, **kwargs) -> None: - ... - -@_copy_docstring_and_deprecators(Artist.findobj) -def findobj(o: Artist | None = ..., match: Callable[[Artist], bool] | type[Artist] | None = ..., include_self: bool = ...) -> list[Artist]: - ... - -_backend_mod: type[matplotlib.backend_bases._Backend] | None = ... -def switch_backend(newbackend: str) -> None: - """ - Set the pyplot backend. - - Switching to an interactive backend is possible only if no event loop for - another interactive backend has started. Switching to and from - non-interactive backends is always possible. - - If the new backend is different than the current backend then all open - Figures will be closed via ``plt.close('all')``. - - Parameters - ---------- - newbackend : str - The case-insensitive name of the backend to use. - - """ - class backend_mod(matplotlib.backend_bases._Backend): - ... - - - -def new_figure_manager(*args, **kwargs): - """Create a new figure manager instance.""" - ... - -def draw_if_interactive(*args, **kwargs): - """ - Redraw the current figure if in interactive mode. - - .. warning:: - - End users will typically not have to call this function because the - the interactive mode takes care of this. - """ - ... - -def show(*args, **kwargs): - """ - Display all open figures. - - Parameters - ---------- - block : bool, optional - Whether to wait for all figures to be closed before returning. - - If `True` block and run the GUI main loop until all figure windows - are closed. - - If `False` ensure that all figure windows are displayed and return - immediately. In this case, you are responsible for ensuring - that the event loop is running to have responsive figures. - - Defaults to True in non-interactive mode and to False in interactive - mode (see `.pyplot.isinteractive`). - - See Also - -------- - ion : Enable interactive mode, which shows / updates the figure after - every plotting command, so that calling ``show()`` is not necessary. - ioff : Disable interactive mode. - savefig : Save the figure to an image file instead of showing it on screen. - - Notes - ----- - **Saving figures to file and showing a window at the same time** - - If you want an image file as well as a user interface window, use - `.pyplot.savefig` before `.pyplot.show`. At the end of (a blocking) - ``show()`` the figure is closed and thus unregistered from pyplot. Calling - `.pyplot.savefig` afterwards would save a new and thus empty figure. This - limitation of command order does not apply if the show is non-blocking or - if you keep a reference to the figure and use `.Figure.savefig`. - - **Auto-show in jupyter notebooks** - - The jupyter backends (activated via ``%matplotlib inline``, - ``%matplotlib notebook``, or ``%matplotlib widget``), call ``show()`` at - the end of every cell by default. Thus, you usually don't have to call it - explicitly there. - """ - ... - -def isinteractive() -> bool: - """ - Return whether plots are updated after every plotting command. - - The interactive mode is mainly useful if you build plots from the command - line and want to see the effect of each command while you are building the - figure. - - In interactive mode: - - - newly created figures will be shown immediately; - - figures will automatically redraw on change; - - `.pyplot.show` will not block by default. - - In non-interactive mode: - - - newly created figures and changes to figures will not be reflected until - explicitly asked to be; - - `.pyplot.show` will block by default. - - See Also - -------- - ion : Enable interactive mode. - ioff : Disable interactive mode. - show : Show all figures (and maybe block). - pause : Show all figures, and block for a time. - """ - ... - -def ioff() -> ExitStack: - """ - Disable interactive mode. - - See `.pyplot.isinteractive` for more details. - - See Also - -------- - ion : Enable interactive mode. - isinteractive : Whether interactive mode is enabled. - show : Show all figures (and maybe block). - pause : Show all figures, and block for a time. - - Notes - ----- - For a temporary change, this can be used as a context manager:: - - # if interactive mode is on - # then figures will be shown on creation - plt.ion() - # This figure will be shown immediately - fig = plt.figure() - - with plt.ioff(): - # interactive mode will be off - # figures will not automatically be shown - fig2 = plt.figure() - # ... - - To enable optional usage as a context manager, this function returns a - `~contextlib.ExitStack` object, which is not intended to be stored or - accessed by the user. - """ - ... - -def ion() -> ExitStack: - """ - Enable interactive mode. - - See `.pyplot.isinteractive` for more details. - - See Also - -------- - ioff : Disable interactive mode. - isinteractive : Whether interactive mode is enabled. - show : Show all figures (and maybe block). - pause : Show all figures, and block for a time. - - Notes - ----- - For a temporary change, this can be used as a context manager:: - - # if interactive mode is off - # then figures will not be shown on creation - plt.ioff() - # This figure will not be shown immediately - fig = plt.figure() - - with plt.ion(): - # interactive mode will be on - # figures will automatically be shown - fig2 = plt.figure() - # ... - - To enable optional usage as a context manager, this function returns a - `~contextlib.ExitStack` object, which is not intended to be stored or - accessed by the user. - """ - ... - -def pause(interval: float) -> None: - """ - Run the GUI event loop for *interval* seconds. - - If there is an active figure, it will be updated and displayed before the - pause, and the GUI event loop (if any) will run during the pause. - - This can be used for crude animation. For more complex animation use - :mod:`matplotlib.animation`. - - If there is no active figure, sleep for *interval* seconds instead. - - See Also - -------- - matplotlib.animation : Proper animations - show : Show all figures and optional block until all figures are closed. - """ - ... - -@_copy_docstring_and_deprecators(matplotlib.rc) -def rc(group: str, **kwargs) -> None: - ... - -@_copy_docstring_and_deprecators(matplotlib.rc_context) -def rc_context(rc: dict[str, Any] | None = ..., fname: str | pathlib.Path | os.PathLike | None = ...) -> AbstractContextManager[None]: - ... - -@_copy_docstring_and_deprecators(matplotlib.rcdefaults) -def rcdefaults() -> None: - ... - -@_copy_docstring_and_deprecators(matplotlib.artist.getp) -def getp(obj, *args, **kwargs): - ... - -@_copy_docstring_and_deprecators(matplotlib.artist.get) -def get(obj, *args, **kwargs): - ... - -@_copy_docstring_and_deprecators(matplotlib.artist.setp) -def setp(obj, *args, **kwargs): - ... - -def xkcd(scale: float = ..., length: float = ..., randomness: float = ...) -> ExitStack: - """ - Turn on `xkcd `_ sketch-style drawing mode. This will - only have effect on things drawn after this function is called. - - For best results, the "Humor Sans" font should be installed: it is - not included with Matplotlib. - - Parameters - ---------- - scale : float, optional - The amplitude of the wiggle perpendicular to the source line. - length : float, optional - The length of the wiggle along the line. - randomness : float, optional - The scale factor by which the length is shrunken or expanded. - - Notes - ----- - This function works by a number of rcParams, so it will probably - override others you have set before. - - If you want the effects of this function to be temporary, it can - be used as a context manager, for example:: - - with plt.xkcd(): - # This figure will be in XKCD-style - fig1 = plt.figure() - # ... - - # This figure will be in regular style - fig2 = plt.figure() - """ - ... - -def figure(num: int | str | Figure | SubFigure | None = ..., figsize: tuple[float, float] | None = ..., dpi: float | None = ..., *, facecolor: ColorType | None = ..., edgecolor: ColorType | None = ..., frameon: bool = ..., FigureClass: type[Figure] = ..., clear: bool = ..., **kwargs) -> Figure: - """ - Create a new figure, or activate an existing figure. - - Parameters - ---------- - num : int or str or `.Figure` or `.SubFigure`, optional - A unique identifier for the figure. - - If a figure with that identifier already exists, this figure is made - active and returned. An integer refers to the ``Figure.number`` - attribute, a string refers to the figure label. - - If there is no figure with the identifier or *num* is not given, a new - figure is created, made active and returned. If *num* is an int, it - will be used for the ``Figure.number`` attribute, otherwise, an - auto-generated integer value is used (starting at 1 and incremented - for each new figure). If *num* is a string, the figure label and the - window title is set to this value. If num is a ``SubFigure``, its - parent ``Figure`` is activated. - - figsize : (float, float), default: :rc:`figure.figsize` - Width, height in inches. - - dpi : float, default: :rc:`figure.dpi` - The resolution of the figure in dots-per-inch. - - facecolor : color, default: :rc:`figure.facecolor` - The background color. - - edgecolor : color, default: :rc:`figure.edgecolor` - The border color. - - frameon : bool, default: True - If False, suppress drawing the figure frame. - - FigureClass : subclass of `~matplotlib.figure.Figure` - If set, an instance of this subclass will be created, rather than a - plain `.Figure`. - - clear : bool, default: False - If True and the figure already exists, then it is cleared. - - layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}, \ -default: None - The layout mechanism for positioning of plot elements to avoid - overlapping Axes decorations (labels, ticks, etc). Note that layout - managers can measurably slow down figure display. - - - 'constrained': The constrained layout solver adjusts axes sizes - to avoid overlapping axes decorations. Can handle complex plot - layouts and colorbars, and is thus recommended. - - See :ref:`constrainedlayout_guide` - for examples. - - - 'compressed': uses the same algorithm as 'constrained', but - removes extra space between fixed-aspect-ratio Axes. Best for - simple grids of axes. - - - 'tight': Use the tight layout mechanism. This is a relatively - simple algorithm that adjusts the subplot parameters so that - decorations do not overlap. See `.Figure.set_tight_layout` for - further details. - - - 'none': Do not use a layout engine. - - - A `.LayoutEngine` instance. Builtin layout classes are - `.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily - accessible by 'constrained' and 'tight'. Passing an instance - allows third parties to provide their own layout engine. - - If not given, fall back to using the parameters *tight_layout* and - *constrained_layout*, including their config defaults - :rc:`figure.autolayout` and :rc:`figure.constrained_layout.use`. - - **kwargs - Additional keyword arguments are passed to the `.Figure` constructor. - - Returns - ------- - `~matplotlib.figure.Figure` - - Notes - ----- - A newly created figure is passed to the `~.FigureCanvasBase.new_manager` - method or the `new_figure_manager` function provided by the current - backend, which install a canvas and a manager on the figure. - - Once this is done, :rc:`figure.hooks` are called, one at a time, on the - figure; these hooks allow arbitrary customization of the figure (e.g., - attaching callbacks) or of associated elements (e.g., modifying the - toolbar). See :doc:`/gallery/user_interfaces/mplcvd` for an example of - toolbar customization. - - If you are creating many figures, make sure you explicitly call - `.pyplot.close` on the figures you are not using, because this will - enable pyplot to properly clean up the memory. - - `~matplotlib.rcParams` defines the default values, which can be modified - in the matplotlibrc file. - """ - ... - -def gcf() -> Figure: - """ - Get the current figure. - - If there is currently no figure on the pyplot figure stack, a new one is - created using `~.pyplot.figure()`. (To test whether there is currently a - figure on the pyplot figure stack, check whether `~.pyplot.get_fignums()` - is empty.) - """ - ... - -def fignum_exists(num: int) -> bool: - """Return whether the figure with the given id exists.""" - ... - -def get_fignums() -> list[int]: - """Return a list of existing figure numbers.""" - ... - -def get_figlabels() -> list[Any]: - """Return a list of existing figure labels.""" - ... - -def get_current_fig_manager() -> FigureManagerBase | None: - """ - Return the figure manager of the current figure. - - The figure manager is a container for the actual backend-depended window - that displays the figure on screen. - - If no current figure exists, a new one is created, and its figure - manager is returned. - - Returns - ------- - `.FigureManagerBase` or backend-dependent subclass thereof - """ - ... - -@_copy_docstring_and_deprecators(FigureCanvasBase.mpl_connect) -def connect(s: str, func: Callable[[Event], Any]) -> int: - ... - -@_copy_docstring_and_deprecators(FigureCanvasBase.mpl_disconnect) -def disconnect(cid: int) -> None: - ... - -def close(fig: None | int | str | Figure | Literal["all"] = ...) -> None: - """ - Close a figure window. - - Parameters - ---------- - fig : None or int or str or `.Figure` - The figure to close. There are a number of ways to specify this: - - - *None*: the current figure - - `.Figure`: the given `.Figure` instance - - ``int``: a figure number - - ``str``: a figure name - - 'all': all figures - - """ - ... - -def clf() -> None: - """Clear the current figure.""" - ... - -def draw() -> None: - """ - Redraw the current figure. - - This is used to update a figure that has been altered, but not - automatically re-drawn. If interactive mode is on (via `.ion()`), this - should be only rarely needed, but there may be ways to modify the state of - a figure without marking it as "stale". Please report these cases as bugs. - - This is equivalent to calling ``fig.canvas.draw_idle()``, where ``fig`` is - the current figure. - - See Also - -------- - .FigureCanvasBase.draw_idle - .FigureCanvasBase.draw - """ - ... - -@_copy_docstring_and_deprecators(Figure.savefig) -def savefig(*args, **kwargs) -> None: - ... - -def figlegend(*args, **kwargs) -> Legend: - ... - -if Figure.legend.__doc__: - ... -@_docstring.dedent_interpd -def axes(arg: None | tuple[float, float, float, float] = ..., **kwargs) -> matplotlib.axes.Axes: - """ - Add an Axes to the current figure and make it the current Axes. - - Call signatures:: - - plt.axes() - plt.axes(rect, projection=None, polar=False, **kwargs) - plt.axes(ax) - - Parameters - ---------- - arg : None or 4-tuple - The exact behavior of this function depends on the type: - - - *None*: A new full window Axes is added using - ``subplot(**kwargs)``. - - 4-tuple of floats *rect* = ``(left, bottom, width, height)``. - A new Axes is added with dimensions *rect* in normalized - (0, 1) units using `~.Figure.add_axes` on the current figure. - - projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \ -'polar', 'rectilinear', str}, optional - The projection type of the `~.axes.Axes`. *str* is the name of - a custom projection, see `~matplotlib.projections`. The default - None results in a 'rectilinear' projection. - - polar : bool, default: False - If True, equivalent to projection='polar'. - - sharex, sharey : `~matplotlib.axes.Axes`, optional - Share the x or y `~matplotlib.axis` with sharex and/or sharey. - The axis will have the same limits, ticks, and scale as the axis - of the shared Axes. - - label : str - A label for the returned Axes. - - Returns - ------- - `~.axes.Axes`, or a subclass of `~.axes.Axes` - The returned axes class depends on the projection used. It is - `~.axes.Axes` if rectilinear projection is used and - `.projections.polar.PolarAxes` if polar projection is used. - - Other Parameters - ---------------- - **kwargs - This method also takes the keyword arguments for - the returned Axes class. The keyword arguments for the - rectilinear Axes class `~.axes.Axes` can be found in - the following table but there might also be other keyword - arguments if another projection is used, see the actual Axes - class. - - %(Axes:kwdoc)s - - See Also - -------- - .Figure.add_axes - .pyplot.subplot - .Figure.add_subplot - .Figure.subplots - .pyplot.subplots - - Examples - -------- - :: - - # Creating a new full window Axes - plt.axes() - - # Creating a new Axes with specified dimensions and a grey background - plt.axes((left, bottom, width, height), facecolor='grey') - """ - ... - -def delaxes(ax: matplotlib.axes.Axes | None = ...) -> None: - """ - Remove an `~.axes.Axes` (defaulting to the current axes) from its figure. - """ - ... - -def sca(ax: Axes) -> None: - """ - Set the current Axes to *ax* and the current Figure to the parent of *ax*. - """ - ... - -def cla() -> None: - """Clear the current axes.""" - ... - -@_docstring.dedent_interpd -def subplot(*args, **kwargs) -> Axes: - """ - Add an Axes to the current figure or retrieve an existing Axes. - - This is a wrapper of `.Figure.add_subplot` which provides additional - behavior when working with the implicit API (see the notes section). - - Call signatures:: - - subplot(nrows, ncols, index, **kwargs) - subplot(pos, **kwargs) - subplot(**kwargs) - subplot(ax) - - Parameters - ---------- - *args : int, (int, int, *index*), or `.SubplotSpec`, default: (1, 1, 1) - The position of the subplot described by one of - - - Three integers (*nrows*, *ncols*, *index*). The subplot will take the - *index* position on a grid with *nrows* rows and *ncols* columns. - *index* starts at 1 in the upper left corner and increases to the - right. *index* can also be a two-tuple specifying the (*first*, - *last*) indices (1-based, and including *last*) of the subplot, e.g., - ``fig.add_subplot(3, 1, (1, 2))`` makes a subplot that spans the - upper 2/3 of the figure. - - A 3-digit integer. The digits are interpreted as if given separately - as three single-digit integers, i.e. ``fig.add_subplot(235)`` is the - same as ``fig.add_subplot(2, 3, 5)``. Note that this can only be used - if there are no more than 9 subplots. - - A `.SubplotSpec`. - - projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \ -'polar', 'rectilinear', str}, optional - The projection type of the subplot (`~.axes.Axes`). *str* is the name - of a custom projection, see `~matplotlib.projections`. The default - None results in a 'rectilinear' projection. - - polar : bool, default: False - If True, equivalent to projection='polar'. - - sharex, sharey : `~matplotlib.axes.Axes`, optional - Share the x or y `~matplotlib.axis` with sharex and/or sharey. The - axis will have the same limits, ticks, and scale as the axis of the - shared axes. - - label : str - A label for the returned axes. - - Returns - ------- - `~.axes.Axes` - - The Axes of the subplot. The returned Axes can actually be an instance - of a subclass, such as `.projections.polar.PolarAxes` for polar - projections. - - Other Parameters - ---------------- - **kwargs - This method also takes the keyword arguments for the returned axes - base class; except for the *figure* argument. The keyword arguments - for the rectilinear base class `~.axes.Axes` can be found in - the following table but there might also be other keyword - arguments if another projection is used. - - %(Axes:kwdoc)s - - Notes - ----- - Creating a new Axes will delete any preexisting Axes that - overlaps with it beyond sharing a boundary:: - - import matplotlib.pyplot as plt - # plot a line, implicitly creating a subplot(111) - plt.plot([1, 2, 3]) - # now create a subplot which represents the top plot of a grid - # with 2 rows and 1 column. Since this subplot will overlap the - # first, the plot (and its axes) previously created, will be removed - plt.subplot(211) - - If you do not want this behavior, use the `.Figure.add_subplot` method - or the `.pyplot.axes` function instead. - - If no *kwargs* are passed and there exists an Axes in the location - specified by *args* then that Axes will be returned rather than a new - Axes being created. - - If *kwargs* are passed and there exists an Axes in the location - specified by *args*, the projection type is the same, and the - *kwargs* match with the existing Axes, then the existing Axes is - returned. Otherwise a new Axes is created with the specified - parameters. We save a reference to the *kwargs* which we use - for this comparison. If any of the values in *kwargs* are - mutable we will not detect the case where they are mutated. - In these cases we suggest using `.Figure.add_subplot` and the - explicit Axes API rather than the implicit pyplot API. - - See Also - -------- - .Figure.add_subplot - .pyplot.subplots - .pyplot.axes - .Figure.subplots - - Examples - -------- - :: - - plt.subplot(221) - - # equivalent but more general - ax1 = plt.subplot(2, 2, 1) - - # add a subplot with no frame - ax2 = plt.subplot(222, frameon=False) - - # add a polar subplot - plt.subplot(223, projection='polar') - - # add a red subplot that shares the x-axis with ax1 - plt.subplot(224, sharex=ax1, facecolor='red') - - # delete ax2 from the figure - plt.delaxes(ax2) - - # add ax2 to the figure again - plt.subplot(ax2) - - # make the first axes "current" again - plt.subplot(221) - - """ - ... - -def subplots(nrows: int = ..., ncols: int = ..., *, sharex: bool | Literal["none", "all", "row", "col"] = ..., sharey: bool | Literal["none", "all", "row", "col"] = ..., squeeze: bool = ..., width_ratios: Sequence[float] | None = ..., height_ratios: Sequence[float] | None = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ..., **fig_kw) -> tuple[Figure, Any]: - """ - Create a figure and a set of subplots. - - This utility wrapper makes it convenient to create common layouts of - subplots, including the enclosing figure object, in a single call. - - Parameters - ---------- - nrows, ncols : int, default: 1 - Number of rows/columns of the subplot grid. - - sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False - Controls sharing of properties among x (*sharex*) or y (*sharey*) - axes: - - - True or 'all': x- or y-axis will be shared among all subplots. - - False or 'none': each subplot x- or y-axis will be independent. - - 'row': each subplot row will share an x- or y-axis. - - 'col': each subplot column will share an x- or y-axis. - - When subplots have a shared x-axis along a column, only the x tick - labels of the bottom subplot are created. Similarly, when subplots - have a shared y-axis along a row, only the y tick labels of the first - column subplot are created. To later turn other subplots' ticklabels - on, use `~matplotlib.axes.Axes.tick_params`. - - When subplots have a shared axis that has units, calling - `~matplotlib.axis.Axis.set_units` will update each axis with the - new units. - - squeeze : bool, default: True - - If True, extra dimensions are squeezed out from the returned - array of `~matplotlib.axes.Axes`: - - - if only one subplot is constructed (nrows=ncols=1), the - resulting single Axes object is returned as a scalar. - - for Nx1 or 1xM subplots, the returned object is a 1D numpy - object array of Axes objects. - - for NxM, subplots with N>1 and M>1 are returned as a 2D array. - - - If False, no squeezing at all is done: the returned Axes object is - always a 2D array containing Axes instances, even if it ends up - being 1x1. - - width_ratios : array-like of length *ncols*, optional - Defines the relative widths of the columns. Each column gets a - relative width of ``width_ratios[i] / sum(width_ratios)``. - If not given, all columns will have the same width. Equivalent - to ``gridspec_kw={'width_ratios': [...]}``. - - height_ratios : array-like of length *nrows*, optional - Defines the relative heights of the rows. Each row gets a - relative height of ``height_ratios[i] / sum(height_ratios)``. - If not given, all rows will have the same height. Convenience - for ``gridspec_kw={'height_ratios': [...]}``. - - subplot_kw : dict, optional - Dict with keywords passed to the - `~matplotlib.figure.Figure.add_subplot` call used to create each - subplot. - - gridspec_kw : dict, optional - Dict with keywords passed to the `~matplotlib.gridspec.GridSpec` - constructor used to create the grid the subplots are placed on. - - **fig_kw - All additional keyword arguments are passed to the - `.pyplot.figure` call. - - Returns - ------- - fig : `.Figure` - - ax : `~matplotlib.axes.Axes` or array of Axes - *ax* can be either a single `~.axes.Axes` object, or an array of Axes - objects if more than one subplot was created. The dimensions of the - resulting array can be controlled with the squeeze keyword, see above. - - Typical idioms for handling the return value are:: - - # using the variable ax for single a Axes - fig, ax = plt.subplots() - - # using the variable axs for multiple Axes - fig, axs = plt.subplots(2, 2) - - # using tuple unpacking for multiple Axes - fig, (ax1, ax2) = plt.subplots(1, 2) - fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2) - - The names ``ax`` and pluralized ``axs`` are preferred over ``axes`` - because for the latter it's not clear if it refers to a single - `~.axes.Axes` instance or a collection of these. - - See Also - -------- - .pyplot.figure - .pyplot.subplot - .pyplot.axes - .Figure.subplots - .Figure.add_subplot - - Examples - -------- - :: - - # First create some toy data: - x = np.linspace(0, 2*np.pi, 400) - y = np.sin(x**2) - - # Create just a figure and only one subplot - fig, ax = plt.subplots() - ax.plot(x, y) - ax.set_title('Simple plot') - - # Create two subplots and unpack the output array immediately - f, (ax1, ax2) = plt.subplots(1, 2, sharey=True) - ax1.plot(x, y) - ax1.set_title('Sharing Y axis') - ax2.scatter(x, y) - - # Create four polar axes and access them through the returned array - fig, axs = plt.subplots(2, 2, subplot_kw=dict(projection="polar")) - axs[0, 0].plot(x, y) - axs[1, 1].scatter(x, y) - - # Share a X axis with each column of subplots - plt.subplots(2, 2, sharex='col') - - # Share a Y axis with each row of subplots - plt.subplots(2, 2, sharey='row') - - # Share both X and Y axes with all subplots - plt.subplots(2, 2, sharex='all', sharey='all') - - # Note that this is the same as - plt.subplots(2, 2, sharex=True, sharey=True) - - # Create figure number 10 with a single subplot - # and clears it if it already exists. - fig, ax = plt.subplots(num=10, clear=True) - - """ - ... - -@overload -def subplot_mosaic(mosaic: str, *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: str = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[str | tuple[str, ...], dict[str, Any]] | None = ..., **fig_kw: Any) -> tuple[Figure, dict[str, matplotlib.axes.Axes]]: - ... - -@overload -def subplot_mosaic(mosaic: list[HashableList[_T]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: _T = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[_T | tuple[_T, ...], dict[str, Any]] | None = ..., **fig_kw: Any) -> tuple[Figure, dict[_T, matplotlib.axes.Axes]]: - ... - -@overload -def subplot_mosaic(mosaic: list[HashableList[Hashable]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: Any = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[Hashable | tuple[Hashable, ...], dict[str, Any]] | None = ..., **fig_kw: Any) -> tuple[Figure, dict[Hashable, matplotlib.axes.Axes]]: - ... - -def subplot_mosaic(mosaic: str | list[HashableList[_T]] | list[HashableList[Hashable]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: Any = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[str | tuple[str, ...], dict[str, Any]] | dict[_T | tuple[_T, ...], dict[str, Any]] | dict[Hashable | tuple[Hashable, ...], dict[str, Any]] | None = ..., **fig_kw: Any) -> tuple[Figure, dict[str, matplotlib.axes.Axes]] | tuple[Figure, dict[_T, matplotlib.axes.Axes]] | tuple[Figure, dict[Hashable, matplotlib.axes.Axes]]: - """ - Build a layout of Axes based on ASCII art or nested lists. - - This is a helper function to build complex GridSpec layouts visually. - - See :ref:`mosaic` - for an example and full API documentation - - Parameters - ---------- - mosaic : list of list of {hashable or nested} or str - - A visual layout of how you want your Axes to be arranged - labeled as strings. For example :: - - x = [['A panel', 'A panel', 'edge'], - ['C panel', '.', 'edge']] - - produces 4 axes: - - - 'A panel' which is 1 row high and spans the first two columns - - 'edge' which is 2 rows high and is on the right edge - - 'C panel' which in 1 row and 1 column wide in the bottom left - - a blank space 1 row and 1 column wide in the bottom center - - Any of the entries in the layout can be a list of lists - of the same form to create nested layouts. - - If input is a str, then it must be of the form :: - - ''' - AAE - C.E - ''' - - where each character is a column and each line is a row. - This only allows only single character Axes labels and does - not allow nesting but is very terse. - - sharex, sharey : bool, default: False - If True, the x-axis (*sharex*) or y-axis (*sharey*) will be shared - among all subplots. In that case, tick label visibility and axis units - behave as for `subplots`. If False, each subplot's x- or y-axis will - be independent. - - width_ratios : array-like of length *ncols*, optional - Defines the relative widths of the columns. Each column gets a - relative width of ``width_ratios[i] / sum(width_ratios)``. - If not given, all columns will have the same width. Convenience - for ``gridspec_kw={'width_ratios': [...]}``. - - height_ratios : array-like of length *nrows*, optional - Defines the relative heights of the rows. Each row gets a - relative height of ``height_ratios[i] / sum(height_ratios)``. - If not given, all rows will have the same height. Convenience - for ``gridspec_kw={'height_ratios': [...]}``. - - empty_sentinel : object, optional - Entry in the layout to mean "leave this space empty". Defaults - to ``'.'``. Note, if *layout* is a string, it is processed via - `inspect.cleandoc` to remove leading white space, which may - interfere with using white-space as the empty sentinel. - - subplot_kw : dict, optional - Dictionary with keywords passed to the `.Figure.add_subplot` call - used to create each subplot. These values may be overridden by - values in *per_subplot_kw*. - - per_subplot_kw : dict, optional - A dictionary mapping the Axes identifiers or tuples of identifiers - to a dictionary of keyword arguments to be passed to the - `.Figure.add_subplot` call used to create each subplot. The values - in these dictionaries have precedence over the values in - *subplot_kw*. - - If *mosaic* is a string, and thus all keys are single characters, - it is possible to use a single string instead of a tuple as keys; - i.e. ``"AB"`` is equivalent to ``("A", "B")``. - - .. versionadded:: 3.7 - - gridspec_kw : dict, optional - Dictionary with keywords passed to the `.GridSpec` constructor used - to create the grid the subplots are placed on. - - **fig_kw - All additional keyword arguments are passed to the - `.pyplot.figure` call. - - Returns - ------- - fig : `.Figure` - The new figure - - dict[label, Axes] - A dictionary mapping the labels to the Axes objects. The order of - the axes is left-to-right and top-to-bottom of their position in the - total layout. - - """ - ... - -def subplot2grid(shape: tuple[int, int], loc: tuple[int, int], rowspan: int = ..., colspan: int = ..., fig: Figure | None = ..., **kwargs) -> matplotlib.axes.Axes: - """ - Create a subplot at a specific location inside a regular grid. - - Parameters - ---------- - shape : (int, int) - Number of rows and of columns of the grid in which to place axis. - loc : (int, int) - Row number and column number of the axis location within the grid. - rowspan : int, default: 1 - Number of rows for the axis to span downwards. - colspan : int, default: 1 - Number of columns for the axis to span to the right. - fig : `.Figure`, optional - Figure to place the subplot in. Defaults to the current figure. - **kwargs - Additional keyword arguments are handed to `~.Figure.add_subplot`. - - Returns - ------- - `~.axes.Axes` - - The Axes of the subplot. The returned Axes can actually be an instance - of a subclass, such as `.projections.polar.PolarAxes` for polar - projections. - - Notes - ----- - The following call :: - - ax = subplot2grid((nrows, ncols), (row, col), rowspan, colspan) - - is identical to :: - - fig = gcf() - gs = fig.add_gridspec(nrows, ncols) - ax = fig.add_subplot(gs[row:row+rowspan, col:col+colspan]) - """ - ... - -def twinx(ax: matplotlib.axes.Axes | None = ...) -> _AxesBase: - """ - Make and return a second axes that shares the *x*-axis. The new axes will - overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be - on the right. - - Examples - -------- - :doc:`/gallery/subplots_axes_and_figures/two_scales` - """ - ... - -def twiny(ax: matplotlib.axes.Axes | None = ...) -> _AxesBase: - """ - Make and return a second axes that shares the *y*-axis. The new axes will - overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be - on the top. - - Examples - -------- - :doc:`/gallery/subplots_axes_and_figures/two_scales` - """ - ... - -def subplot_tool(targetfig: Figure | None = ...) -> SubplotTool | None: - """ - Launch a subplot tool window for a figure. - - Returns - ------- - `matplotlib.widgets.SubplotTool` - """ - ... - -def box(on: bool | None = ...) -> None: - """ - Turn the axes box on or off on the current axes. - - Parameters - ---------- - on : bool or None - The new `~matplotlib.axes.Axes` box state. If ``None``, toggle - the state. - - See Also - -------- - :meth:`matplotlib.axes.Axes.set_frame_on` - :meth:`matplotlib.axes.Axes.get_frame_on` - """ - ... - -def xlim(*args, **kwargs) -> tuple[float, float]: - """ - Get or set the x limits of the current axes. - - Call signatures:: - - left, right = xlim() # return the current xlim - xlim((left, right)) # set the xlim to left, right - xlim(left, right) # set the xlim to left, right - - If you do not specify args, you can pass *left* or *right* as kwargs, - i.e.:: - - xlim(right=3) # adjust the right leaving left unchanged - xlim(left=1) # adjust the left leaving right unchanged - - Setting limits turns autoscaling off for the x-axis. - - Returns - ------- - left, right - A tuple of the new x-axis limits. - - Notes - ----- - Calling this function with no arguments (e.g. ``xlim()``) is the pyplot - equivalent of calling `~.Axes.get_xlim` on the current axes. - Calling this function with arguments is the pyplot equivalent of calling - `~.Axes.set_xlim` on the current axes. All arguments are passed though. - """ - ... - -def ylim(*args, **kwargs) -> tuple[float, float]: - """ - Get or set the y-limits of the current axes. - - Call signatures:: - - bottom, top = ylim() # return the current ylim - ylim((bottom, top)) # set the ylim to bottom, top - ylim(bottom, top) # set the ylim to bottom, top - - If you do not specify args, you can alternatively pass *bottom* or - *top* as kwargs, i.e.:: - - ylim(top=3) # adjust the top leaving bottom unchanged - ylim(bottom=1) # adjust the bottom leaving top unchanged - - Setting limits turns autoscaling off for the y-axis. - - Returns - ------- - bottom, top - A tuple of the new y-axis limits. - - Notes - ----- - Calling this function with no arguments (e.g. ``ylim()``) is the pyplot - equivalent of calling `~.Axes.get_ylim` on the current axes. - Calling this function with arguments is the pyplot equivalent of calling - `~.Axes.set_ylim` on the current axes. All arguments are passed though. - """ - ... - -def xticks(ticks: ArrayLike | None = ..., labels: Sequence[str] | None = ..., *, minor: bool = ..., **kwargs) -> tuple[list[Tick] | np.ndarray, list[Text]]: - """ - Get or set the current tick locations and labels of the x-axis. - - Pass no arguments to return the current values without modifying them. - - Parameters - ---------- - ticks : array-like, optional - The list of xtick locations. Passing an empty list removes all xticks. - labels : array-like, optional - The labels to place at the given *ticks* locations. This argument can - only be passed if *ticks* is passed as well. - minor : bool, default: False - If ``False``, get/set the major ticks/labels; if ``True``, the minor - ticks/labels. - **kwargs - `.Text` properties can be used to control the appearance of the labels. - - Returns - ------- - locs - The list of xtick locations. - labels - The list of xlabel `.Text` objects. - - Notes - ----- - Calling this function with no arguments (e.g. ``xticks()``) is the pyplot - equivalent of calling `~.Axes.get_xticks` and `~.Axes.get_xticklabels` on - the current axes. - Calling this function with arguments is the pyplot equivalent of calling - `~.Axes.set_xticks` and `~.Axes.set_xticklabels` on the current axes. - - Examples - -------- - >>> locs, labels = xticks() # Get the current locations and labels. - >>> xticks(np.arange(0, 1, step=0.2)) # Set label locations. - >>> xticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels. - >>> xticks([0, 1, 2], ['January', 'February', 'March'], - ... rotation=20) # Set text labels and properties. - >>> xticks([]) # Disable xticks. - """ - ... - -def yticks(ticks: ArrayLike | None = ..., labels: Sequence[str] | None = ..., *, minor: bool = ..., **kwargs) -> tuple[list[Tick] | np.ndarray, list[Text]]: - """ - Get or set the current tick locations and labels of the y-axis. - - Pass no arguments to return the current values without modifying them. - - Parameters - ---------- - ticks : array-like, optional - The list of ytick locations. Passing an empty list removes all yticks. - labels : array-like, optional - The labels to place at the given *ticks* locations. This argument can - only be passed if *ticks* is passed as well. - minor : bool, default: False - If ``False``, get/set the major ticks/labels; if ``True``, the minor - ticks/labels. - **kwargs - `.Text` properties can be used to control the appearance of the labels. - - Returns - ------- - locs - The list of ytick locations. - labels - The list of ylabel `.Text` objects. - - Notes - ----- - Calling this function with no arguments (e.g. ``yticks()``) is the pyplot - equivalent of calling `~.Axes.get_yticks` and `~.Axes.get_yticklabels` on - the current axes. - Calling this function with arguments is the pyplot equivalent of calling - `~.Axes.set_yticks` and `~.Axes.set_yticklabels` on the current axes. - - Examples - -------- - >>> locs, labels = yticks() # Get the current locations and labels. - >>> yticks(np.arange(0, 1, step=0.2)) # Set label locations. - >>> yticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels. - >>> yticks([0, 1, 2], ['January', 'February', 'March'], - ... rotation=45) # Set text labels and properties. - >>> yticks([]) # Disable yticks. - """ - ... - -def rgrids(radii: ArrayLike | None = ..., labels: Sequence[str | Text] | None = ..., angle: float | None = ..., fmt: str | None = ..., **kwargs) -> tuple[list[Line2D], list[Text]]: - """ - Get or set the radial gridlines on the current polar plot. - - Call signatures:: - - lines, labels = rgrids() - lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs) - - When called with no arguments, `.rgrids` simply returns the tuple - (*lines*, *labels*). When called with arguments, the labels will - appear at the specified radial distances and angle. - - Parameters - ---------- - radii : tuple with floats - The radii for the radial gridlines - - labels : tuple with strings or None - The labels to use at each radial gridline. The - `matplotlib.ticker.ScalarFormatter` will be used if None. - - angle : float - The angular position of the radius labels in degrees. - - fmt : str or None - Format string used in `matplotlib.ticker.FormatStrFormatter`. - For example '%f'. - - Returns - ------- - lines : list of `.lines.Line2D` - The radial gridlines. - - labels : list of `.text.Text` - The tick labels. - - Other Parameters - ---------------- - **kwargs - *kwargs* are optional `.Text` properties for the labels. - - See Also - -------- - .pyplot.thetagrids - .projections.polar.PolarAxes.set_rgrids - .Axis.get_gridlines - .Axis.get_ticklabels - - Examples - -------- - :: - - # set the locations of the radial gridlines - lines, labels = rgrids( (0.25, 0.5, 1.0) ) - - # set the locations and labels of the radial gridlines - lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' )) - """ - ... - -def thetagrids(angles: ArrayLike | None = ..., labels: Sequence[str | Text] | None = ..., fmt: str | None = ..., **kwargs) -> tuple[list[Line2D], list[Text]]: - """ - Get or set the theta gridlines on the current polar plot. - - Call signatures:: - - lines, labels = thetagrids() - lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs) - - When called with no arguments, `.thetagrids` simply returns the tuple - (*lines*, *labels*). When called with arguments, the labels will - appear at the specified angles. - - Parameters - ---------- - angles : tuple with floats, degrees - The angles of the theta gridlines. - - labels : tuple with strings or None - The labels to use at each radial gridline. The - `.projections.polar.ThetaFormatter` will be used if None. - - fmt : str or None - Format string used in `matplotlib.ticker.FormatStrFormatter`. - For example '%f'. Note that the angle in radians will be used. - - Returns - ------- - lines : list of `.lines.Line2D` - The theta gridlines. - - labels : list of `.text.Text` - The tick labels. - - Other Parameters - ---------------- - **kwargs - *kwargs* are optional `.Text` properties for the labels. - - See Also - -------- - .pyplot.rgrids - .projections.polar.PolarAxes.set_thetagrids - .Axis.get_gridlines - .Axis.get_ticklabels - - Examples - -------- - :: - - # set the locations of the angular gridlines - lines, labels = thetagrids(range(45, 360, 90)) - - # set the locations and labels of the angular gridlines - lines, labels = thetagrids(range(45, 360, 90), ('NE', 'NW', 'SW', 'SE')) - """ - ... - -@_api.deprecated("3.7", pending=True) -def get_plot_commands() -> list[str]: - """ - Get a sorted list of all of the plotting commands. - """ - ... - -@_copy_docstring_and_deprecators(Figure.colorbar) -def colorbar(mappable: ScalarMappable | None = ..., cax: matplotlib.axes.Axes | None = ..., ax: matplotlib.axes.Axes | Iterable[matplotlib.axes.Axes] | None = ..., **kwargs) -> Colorbar: - ... - -def clim(vmin: float | None = ..., vmax: float | None = ...) -> None: - """ - Set the color limits of the current image. - - If either *vmin* or *vmax* is None, the image min/max respectively - will be used for color scaling. - - If you want to set the clim of multiple images, use - `~.ScalarMappable.set_clim` on every image, for example:: - - for im in gca().get_images(): - im.set_clim(0, 0.5) - - """ - ... - -def get_cmap(name: Colormap | str | None = ..., lut: int | None = ...) -> Colormap: - ... - -def set_cmap(cmap: Colormap | str) -> None: - """ - Set the default colormap, and applies it to the current image if any. - - Parameters - ---------- - cmap : `~matplotlib.colors.Colormap` or str - A colormap instance or the name of a registered colormap. - - See Also - -------- - colormaps - matplotlib.cm.register_cmap - matplotlib.cm.get_cmap - """ - ... - -@_copy_docstring_and_deprecators(matplotlib.image.imread) -def imread(fname: str | pathlib.Path | BinaryIO, format: str | None = ...) -> np.ndarray: - ... - -@_copy_docstring_and_deprecators(matplotlib.image.imsave) -def imsave(fname: str | os.PathLike | BinaryIO, arr: ArrayLike, **kwargs) -> None: - ... - -def matshow(A: ArrayLike, fignum: None | int = ..., **kwargs) -> AxesImage: - """ - Display an array as a matrix in a new figure window. - - The origin is set at the upper left hand corner and rows (first - dimension of the array) are displayed horizontally. The aspect - ratio of the figure window is that of the array, unless this would - make an excessively short or narrow figure. - - Tick labels for the xaxis are placed on top. - - Parameters - ---------- - A : 2D array-like - The matrix to be displayed. - - fignum : None or int - If *None*, create a new figure window with automatic numbering. - - If a nonzero integer, draw into the figure with the given number - (create it if it does not exist). - - If 0, use the current axes (or create one if it does not exist). - - .. note:: - - Because of how `.Axes.matshow` tries to set the figure aspect - ratio to be the one of the array, strange things may happen if you - reuse an existing figure. - - Returns - ------- - `~matplotlib.image.AxesImage` - - Other Parameters - ---------------- - **kwargs : `~matplotlib.axes.Axes.imshow` arguments - - """ - ... - -def polar(*args, **kwargs) -> list[Line2D]: - """ - Make a polar plot. - - call signature:: - - polar(theta, r, **kwargs) - - Multiple *theta*, *r* arguments are supported, with format strings, as in - `plot`. - """ - ... - -if (rcParams["backend_fallback"] and rcParams._get_backend_or_none() in (set(rcsetup.interactive_bk) - 'WebAgg', 'nbAgg') and cbook._get_running_interactive_framework()): - ... -@_copy_docstring_and_deprecators(Figure.figimage) -def figimage(X: ArrayLike, xo: int = ..., yo: int = ..., alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., origin: Literal["upper", "lower"] | None = ..., resize: bool = ..., **kwargs) -> FigureImage: - ... - -@_copy_docstring_and_deprecators(Figure.text) -def figtext(x: float, y: float, s: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text: - ... - -@_copy_docstring_and_deprecators(Figure.gca) -def gca() -> Axes: - ... - -@_copy_docstring_and_deprecators(Figure._gci) -def gci() -> ScalarMappable | None: - ... - -@_copy_docstring_and_deprecators(Figure.ginput) -def ginput(n: int = ..., timeout: float = ..., show_clicks: bool = ..., mouse_add: MouseButton = ..., mouse_pop: MouseButton = ..., mouse_stop: MouseButton = ...) -> list[tuple[int, int]]: - ... - -@_copy_docstring_and_deprecators(Figure.subplots_adjust) -def subplots_adjust(left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ...) -> None: - ... - -@_copy_docstring_and_deprecators(Figure.suptitle) -def suptitle(t: str, **kwargs) -> Text: - ... - -@_copy_docstring_and_deprecators(Figure.tight_layout) -def tight_layout(*, pad: float = ..., h_pad: float | None = ..., w_pad: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None: - ... - -@_copy_docstring_and_deprecators(Figure.waitforbuttonpress) -def waitforbuttonpress(timeout: float = ...) -> None | bool: - ... - -@_copy_docstring_and_deprecators(Axes.acorr) -def acorr(x: ArrayLike, *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: - ... - -@_copy_docstring_and_deprecators(Axes.angle_spectrum) -def angle_spectrum(x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.annotate) -def annotate(text: str, xy: tuple[float, float], xytext: tuple[float, float] | None = ..., xycoords: str | Artist | Transform | Callable[[RendererBase], Bbox | Transform] | tuple[float, float] = ..., textcoords: str | Artist | Transform | Callable[[RendererBase], Bbox | Transform] | tuple[float, float] | None = ..., arrowprops: dict[str, Any] | None = ..., annotation_clip: bool | None = ..., **kwargs) -> Annotation: - ... - -@_copy_docstring_and_deprecators(Axes.arrow) -def arrow(x: float, y: float, dx: float, dy: float, **kwargs) -> FancyArrow: - ... - -@_copy_docstring_and_deprecators(Axes.autoscale) -def autoscale(enable: bool = ..., axis: Literal["both", "x", "y"] = ..., tight: bool | None = ...) -> None: - ... - -@_copy_docstring_and_deprecators(Axes.axhline) -def axhline(y: float = ..., xmin: float = ..., xmax: float = ..., **kwargs) -> Line2D: - ... - -@_copy_docstring_and_deprecators(Axes.axhspan) -def axhspan(ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs) -> Polygon: - ... - -@_copy_docstring_and_deprecators(Axes.axis) -def axis(arg: tuple[float, float, float, float] | bool | str | None = ..., /, *, emit: bool = ..., **kwargs) -> tuple[float, float, float, float]: - ... - -@_copy_docstring_and_deprecators(Axes.axline) -def axline(xy1: tuple[float, float], xy2: tuple[float, float] | None = ..., *, slope: float | None = ..., **kwargs) -> Line2D: - ... - -@_copy_docstring_and_deprecators(Axes.axvline) -def axvline(x: float = ..., ymin: float = ..., ymax: float = ..., **kwargs) -> Line2D: - ... - -@_copy_docstring_and_deprecators(Axes.axvspan) -def axvspan(xmin: float, xmax: float, ymin: float = ..., ymax: float = ..., **kwargs) -> Polygon: - ... - -@_copy_docstring_and_deprecators(Axes.bar) -def bar(x: float | ArrayLike, height: float | ArrayLike, width: float | ArrayLike = ..., bottom: float | ArrayLike | None = ..., *, align: Literal["center", "edge"] = ..., data=..., **kwargs) -> BarContainer: - ... - -@_copy_docstring_and_deprecators(Axes.barbs) -def barbs(*args, data=..., **kwargs) -> Barbs: - ... - -@_copy_docstring_and_deprecators(Axes.barh) -def barh(y: float | ArrayLike, width: float | ArrayLike, height: float | ArrayLike = ..., left: float | ArrayLike | None = ..., *, align: Literal["center", "edge"] = ..., data=..., **kwargs) -> BarContainer: - ... - -@_copy_docstring_and_deprecators(Axes.bar_label) -def bar_label(container: BarContainer, labels: ArrayLike | None = ..., *, fmt: str | Callable[[float], str] = ..., label_type: Literal["center", "edge"] = ..., padding: float = ..., **kwargs) -> list[Annotation]: - ... - -@_copy_docstring_and_deprecators(Axes.boxplot) -def boxplot(x: ArrayLike | Sequence[ArrayLike], notch: bool | None = ..., sym: str | None = ..., vert: bool | None = ..., whis: float | tuple[float, float] | None = ..., positions: ArrayLike | None = ..., widths: float | ArrayLike | None = ..., patch_artist: bool | None = ..., bootstrap: int | None = ..., usermedians: ArrayLike | None = ..., conf_intervals: ArrayLike | None = ..., meanline: bool | None = ..., showmeans: bool | None = ..., showcaps: bool | None = ..., showbox: bool | None = ..., showfliers: bool | None = ..., boxprops: dict[str, Any] | None = ..., labels: Sequence[str] | None = ..., flierprops: dict[str, Any] | None = ..., medianprops: dict[str, Any] | None = ..., meanprops: dict[str, Any] | None = ..., capprops: dict[str, Any] | None = ..., whiskerprops: dict[str, Any] | None = ..., manage_ticks: bool = ..., autorange: bool = ..., zorder: float | None = ..., capwidths: float | ArrayLike | None = ..., *, data=...) -> dict[str, Any]: - ... - -@_copy_docstring_and_deprecators(Axes.broken_barh) -def broken_barh(xranges: Sequence[tuple[float, float]], yrange: tuple[float, float], *, data=..., **kwargs) -> BrokenBarHCollection: - ... - -@_copy_docstring_and_deprecators(Axes.clabel) -def clabel(CS: ContourSet, levels: ArrayLike | None = ..., **kwargs) -> list[Text]: - ... - -@_copy_docstring_and_deprecators(Axes.cohere) -def cohere(x: ArrayLike, y: ArrayLike, NFFT: int = ..., Fs: float = ..., Fc: int = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike = ..., noverlap: int = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] = ..., scale_by_freq: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray]: - ... - -@_copy_docstring_and_deprecators(Axes.contour) -def contour(*args, data=..., **kwargs) -> QuadContourSet: - ... - -@_copy_docstring_and_deprecators(Axes.contourf) -def contourf(*args, data=..., **kwargs) -> QuadContourSet: - ... - -@_copy_docstring_and_deprecators(Axes.csd) -def csd(x: ArrayLike, y: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., return_line: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.ecdf) -def ecdf(x: ArrayLike, weights: ArrayLike | None = ..., *, complementary: bool = ..., orientation: Literal["vertical", "horizonatal"] = ..., compress: bool = ..., data=..., **kwargs) -> Line2D: - ... - -@_copy_docstring_and_deprecators(Axes.errorbar) -def errorbar(x: float | ArrayLike, y: float | ArrayLike, yerr: float | ArrayLike | None = ..., xerr: float | ArrayLike | None = ..., fmt: str = ..., ecolor: ColorType | None = ..., elinewidth: float | None = ..., capsize: float | None = ..., barsabove: bool = ..., lolims: bool | ArrayLike = ..., uplims: bool | ArrayLike = ..., xlolims: bool | ArrayLike = ..., xuplims: bool | ArrayLike = ..., errorevery: int | tuple[int, int] = ..., capthick: float | None = ..., *, data=..., **kwargs) -> ErrorbarContainer: - ... - -@_copy_docstring_and_deprecators(Axes.eventplot) -def eventplot(positions: ArrayLike | Sequence[ArrayLike], orientation: Literal["horizontal", "vertical"] = ..., lineoffsets: float | Sequence[float] = ..., linelengths: float | Sequence[float] = ..., linewidths: float | Sequence[float] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., alpha: float | Sequence[float] | None = ..., linestyles: LineStyleType | Sequence[LineStyleType] = ..., *, data=..., **kwargs) -> EventCollection: - ... - -@_copy_docstring_and_deprecators(Axes.fill) -def fill(*args, data=..., **kwargs) -> list[Polygon]: - ... - -@_copy_docstring_and_deprecators(Axes.fill_between) -def fill_between(x: ArrayLike, y1: ArrayLike | float, y2: ArrayLike | float = ..., where: Sequence[bool] | None = ..., interpolate: bool = ..., step: Literal["pre", "post", "mid"] | None = ..., *, data=..., **kwargs) -> PolyCollection: - ... - -@_copy_docstring_and_deprecators(Axes.fill_betweenx) -def fill_betweenx(y: ArrayLike, x1: ArrayLike | float, x2: ArrayLike | float = ..., where: Sequence[bool] | None = ..., step: Literal["pre", "post", "mid"] | None = ..., interpolate: bool = ..., *, data=..., **kwargs) -> PolyCollection: - ... - -@_copy_docstring_and_deprecators(Axes.grid) -def grid(visible: bool | None = ..., which: Literal["major", "minor", "both"] = ..., axis: Literal["both", "x", "y"] = ..., **kwargs) -> None: - ... - -@_copy_docstring_and_deprecators(Axes.hexbin) -def hexbin(x: ArrayLike, y: ArrayLike, C: ArrayLike | None = ..., gridsize: int | tuple[int, int] = ..., bins: Literal["log"] | int | Sequence[float] | None = ..., xscale: Literal["linear", "log"] = ..., yscale: Literal["linear", "log"] = ..., extent: tuple[float, float, float, float] | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., alpha: float | None = ..., linewidths: float | None = ..., edgecolors: Literal["face", "none"] | ColorType = ..., reduce_C_function: Callable[[np.ndarray | list[float]], float] = ..., mincnt: int | None = ..., marginals: bool = ..., *, data=..., **kwargs) -> PolyCollection: - ... - -@_copy_docstring_and_deprecators(Axes.hist) -def hist(x: ArrayLike | Sequence[ArrayLike], bins: int | Sequence[float] | str | None = ..., range: tuple[float, float] | None = ..., density: bool = ..., weights: ArrayLike | None = ..., cumulative: bool | float = ..., bottom: ArrayLike | float | None = ..., histtype: Literal["bar", "barstacked", "step", "stepfilled"] = ..., align: Literal["left", "mid", "right"] = ..., orientation: Literal["vertical", "horizontal"] = ..., rwidth: float | None = ..., log: bool = ..., color: ColorType | Sequence[ColorType] | None = ..., label: str | Sequence[str] | None = ..., stacked: bool = ..., *, data=..., **kwargs) -> tuple[np.ndarray | list[np.ndarray], np.ndarray, BarContainer | Polygon | list[BarContainer | Polygon],]: - ... - -@_copy_docstring_and_deprecators(Axes.stairs) -def stairs(values: ArrayLike, edges: ArrayLike | None = ..., *, orientation: Literal["vertical", "horizontal"] = ..., baseline: float | ArrayLike | None = ..., fill: bool = ..., data=..., **kwargs) -> StepPatch: - ... - -@_copy_docstring_and_deprecators(Axes.hist2d) -def hist2d(x: ArrayLike, y: ArrayLike, bins: None | int | tuple[int, int] | ArrayLike | tuple[ArrayLike, ArrayLike] = ..., range: ArrayLike | None = ..., density: bool = ..., weights: ArrayLike | None = ..., cmin: float | None = ..., cmax: float | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray, QuadMesh]: - ... - -@_copy_docstring_and_deprecators(Axes.hlines) -def hlines(y: float | ArrayLike, xmin: float | ArrayLike, xmax: float | ArrayLike, colors: ColorType | Sequence[ColorType] | None = ..., linestyles: LineStyleType = ..., label: str = ..., *, data=..., **kwargs) -> LineCollection: - ... - -@_copy_docstring_and_deprecators(Axes.imshow) -def imshow(X: ArrayLike | PIL.Image.Image, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., *, aspect: Literal["equal", "auto"] | float | None = ..., interpolation: str | None = ..., alpha: float | ArrayLike | None = ..., vmin: float | None = ..., vmax: float | None = ..., origin: Literal["upper", "lower"] | None = ..., extent: tuple[float, float, float, float] | None = ..., interpolation_stage: Literal["data", "rgba"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool | None = ..., url: str | None = ..., data=..., **kwargs) -> AxesImage: - ... - -@_copy_docstring_and_deprecators(Axes.legend) -def legend(*args, **kwargs) -> Legend: - ... - -@_copy_docstring_and_deprecators(Axes.locator_params) -def locator_params(axis: Literal["both", "x", "y"] = ..., tight: bool | None = ..., **kwargs) -> None: - ... - -@_copy_docstring_and_deprecators(Axes.loglog) -def loglog(*args, **kwargs) -> list[Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.magnitude_spectrum) -def magnitude_spectrum(x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale: Literal["default", "linear", "dB"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.margins) -def margins(*margins: float, x: float | None = ..., y: float | None = ..., tight: bool | None = ...) -> tuple[float, float] | None: - ... - -@_copy_docstring_and_deprecators(Axes.minorticks_off) -def minorticks_off() -> None: - ... - -@_copy_docstring_and_deprecators(Axes.minorticks_on) -def minorticks_on() -> None: - ... - -@_copy_docstring_and_deprecators(Axes.pcolor) -def pcolor(*args: ArrayLike, shading: Literal["flat", "nearest", "auto"] | None = ..., alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., data=..., **kwargs) -> Collection: - ... - -@_copy_docstring_and_deprecators(Axes.pcolormesh) -def pcolormesh(*args: ArrayLike, alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., shading: Literal["flat", "nearest", "gouraud", "auto"] | None = ..., antialiased: bool = ..., data=..., **kwargs) -> QuadMesh: - ... - -@_copy_docstring_and_deprecators(Axes.phase_spectrum) -def phase_spectrum(x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.pie) -def pie(x: ArrayLike, explode: ArrayLike | None = ..., labels: Sequence[str] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., autopct: str | Callable[[float], str] | None = ..., pctdistance: float = ..., shadow: bool = ..., labeldistance: float | None = ..., startangle: float = ..., radius: float = ..., counterclock: bool = ..., wedgeprops: dict[str, Any] | None = ..., textprops: dict[str, Any] | None = ..., center: tuple[float, float] = ..., frame: bool = ..., rotatelabels: bool = ..., *, normalize: bool = ..., hatch: str | Sequence[str] | None = ..., data=...) -> tuple[list[Wedge], list[Text]] | tuple[list[Wedge], list[Text], list[Text]]: - ... - -@_copy_docstring_and_deprecators(Axes.plot) -def plot(*args: float | ArrayLike | str, scalex: bool = ..., scaley: bool = ..., data=..., **kwargs) -> list[Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.plot_date) -def plot_date(x: ArrayLike, y: ArrayLike, fmt: str = ..., tz: str | datetime.tzinfo | None = ..., xdate: bool = ..., ydate: bool = ..., *, data=..., **kwargs) -> list[Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.psd) -def psd(x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., return_line: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.quiver) -def quiver(*args, data=..., **kwargs) -> Quiver: - ... - -@_copy_docstring_and_deprecators(Axes.quiverkey) -def quiverkey(Q: Quiver, X: float, Y: float, U: float, label: str, **kwargs) -> QuiverKey: - ... - -@_copy_docstring_and_deprecators(Axes.scatter) -def scatter(x: float | ArrayLike, y: float | ArrayLike, s: float | ArrayLike | None = ..., c: Sequence[ColorType] | ColorType | None = ..., marker: MarkerType | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., alpha: float | None = ..., linewidths: float | Sequence[float] | None = ..., *, edgecolors: Literal["face", "none"] | ColorType | Sequence[ColorType] | None = ..., plotnonfinite: bool = ..., data=..., **kwargs) -> PathCollection: - ... - -@_copy_docstring_and_deprecators(Axes.semilogx) -def semilogx(*args, **kwargs) -> list[Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.semilogy) -def semilogy(*args, **kwargs) -> list[Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.specgram) -def specgram(x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., cmap: str | Colormap | None = ..., xextent: tuple[float, float] | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., mode: Literal["default", "psd", "magnitude", "angle", "phase"] | None = ..., scale: Literal["default", "linear", "dB"] | None = ..., vmin: float | None = ..., vmax: float | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray, AxesImage]: - ... - -@_copy_docstring_and_deprecators(Axes.spy) -def spy(Z: ArrayLike, precision: float | Literal["present"] = ..., marker: str | None = ..., markersize: float | None = ..., aspect: Literal["equal", "auto"] | float | None = ..., origin: Literal["upper", "lower"] = ..., **kwargs) -> AxesImage: - ... - -@_copy_docstring_and_deprecators(Axes.stackplot) -def stackplot(x, *args, labels=..., colors=..., baseline=..., data=..., **kwargs): # -> list[PolyCollection]: - ... - -@_copy_docstring_and_deprecators(Axes.stem) -def stem(*args: ArrayLike | str, linefmt: str | None = ..., markerfmt: str | None = ..., basefmt: str | None = ..., bottom: float = ..., label: str | None = ..., orientation: Literal["vertical", "horizontal"] = ..., data=...) -> StemContainer: - ... - -@_copy_docstring_and_deprecators(Axes.step) -def step(x: ArrayLike, y: ArrayLike, *args, where: Literal["pre", "post", "mid"] = ..., data=..., **kwargs) -> list[Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.streamplot) -def streamplot(x, y, u, v, density=..., linewidth=..., color=..., cmap=..., norm=..., arrowsize=..., arrowstyle=..., minlength=..., transform=..., zorder=..., start_points=..., maxlength=..., integration_direction=..., broken_streamlines=..., *, data=...): # -> StreamplotSet: - ... - -@_copy_docstring_and_deprecators(Axes.table) -def table(cellText=..., cellColours=..., cellLoc=..., colWidths=..., rowLabels=..., rowColours=..., rowLoc=..., colLabels=..., colColours=..., colLoc=..., loc=..., bbox=..., edges=..., **kwargs): # -> Table: - ... - -@_copy_docstring_and_deprecators(Axes.text) -def text(x: float, y: float, s: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text: - ... - -@_copy_docstring_and_deprecators(Axes.tick_params) -def tick_params(axis: Literal["both", "x", "y"] = ..., **kwargs) -> None: - ... - -@_copy_docstring_and_deprecators(Axes.ticklabel_format) -def ticklabel_format(*, axis: Literal["both", "x", "y"] = ..., style: Literal["", "sci", "scientific", "plain"] = ..., scilimits: tuple[int, int] | None = ..., useOffset: bool | float | None = ..., useLocale: bool | None = ..., useMathText: bool | None = ...) -> None: - ... - -@_copy_docstring_and_deprecators(Axes.tricontour) -def tricontour(*args, **kwargs): # -> TriContourSet: - ... - -@_copy_docstring_and_deprecators(Axes.tricontourf) -def tricontourf(*args, **kwargs): # -> TriContourSet: - ... - -@_copy_docstring_and_deprecators(Axes.tripcolor) -def tripcolor(*args, alpha=..., norm=..., cmap=..., vmin=..., vmax=..., shading=..., facecolors=..., **kwargs): - ... - -@_copy_docstring_and_deprecators(Axes.triplot) -def triplot(*args, **kwargs): # -> tuple[Line2D, Line2D]: - ... - -@_copy_docstring_and_deprecators(Axes.violinplot) -def violinplot(dataset: ArrayLike | Sequence[ArrayLike], positions: ArrayLike | None = ..., vert: bool = ..., widths: float | ArrayLike = ..., showmeans: bool = ..., showextrema: bool = ..., showmedians: bool = ..., quantiles: Sequence[float | Sequence[float]] | None = ..., points: int = ..., bw_method: Literal["scott", "silverman"] | float | Callable[[GaussianKDE], float] | None = ..., *, data=...) -> dict[str, Collection]: - ... - -@_copy_docstring_and_deprecators(Axes.vlines) -def vlines(x: float | ArrayLike, ymin: float | ArrayLike, ymax: float | ArrayLike, colors: ColorType | Sequence[ColorType] | None = ..., linestyles: LineStyleType = ..., label: str = ..., *, data=..., **kwargs) -> LineCollection: - ... - -@_copy_docstring_and_deprecators(Axes.xcorr) -def xcorr(x: ArrayLike, y: ArrayLike, normed: bool = ..., detrend: Callable[[ArrayLike], ArrayLike] = ..., usevlines: bool = ..., maxlags: int = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: - ... - -@_copy_docstring_and_deprecators(Axes._sci) -def sci(im: ScalarMappable) -> None: - ... - -@_copy_docstring_and_deprecators(Axes.set_title) -def title(label: str, fontdict: dict[str, Any] | None = ..., loc: Literal["left", "center", "right"] | None = ..., pad: float | None = ..., *, y: float | None = ..., **kwargs) -> Text: - ... - -@_copy_docstring_and_deprecators(Axes.set_xlabel) -def xlabel(xlabel: str, fontdict: dict[str, Any] | None = ..., labelpad: float | None = ..., *, loc: Literal["left", "center", "right"] | None = ..., **kwargs) -> Text: - ... - -@_copy_docstring_and_deprecators(Axes.set_ylabel) -def ylabel(ylabel: str, fontdict: dict[str, Any] | None = ..., labelpad: float | None = ..., *, loc: Literal["bottom", "center", "top"] | None = ..., **kwargs) -> Text: - ... - -@_copy_docstring_and_deprecators(Axes.set_xscale) -def xscale(value: str | ScaleBase, **kwargs) -> None: - ... - -@_copy_docstring_and_deprecators(Axes.set_yscale) -def yscale(value: str | ScaleBase, **kwargs) -> None: - ... - -def autumn() -> None: - """ - Set the colormap to 'autumn'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def bone() -> None: - """ - Set the colormap to 'bone'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def cool() -> None: - """ - Set the colormap to 'cool'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def copper() -> None: - """ - Set the colormap to 'copper'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def flag() -> None: - """ - Set the colormap to 'flag'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def gray() -> None: - """ - Set the colormap to 'gray'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def hot() -> None: - """ - Set the colormap to 'hot'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def hsv() -> None: - """ - Set the colormap to 'hsv'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def jet() -> None: - """ - Set the colormap to 'jet'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def pink() -> None: - """ - Set the colormap to 'pink'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def prism() -> None: - """ - Set the colormap to 'prism'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def spring() -> None: - """ - Set the colormap to 'spring'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def summer() -> None: - """ - Set the colormap to 'summer'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def winter() -> None: - """ - Set the colormap to 'winter'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def magma() -> None: - """ - Set the colormap to 'magma'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def inferno() -> None: - """ - Set the colormap to 'inferno'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def plasma() -> None: - """ - Set the colormap to 'plasma'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def viridis() -> None: - """ - Set the colormap to 'viridis'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - -def nipy_spectral() -> None: - """ - Set the colormap to 'nipy_spectral'. - - This changes the default colormap as well as the colormap of the current - image if there is one. See ``help(colormaps)`` for more information. - """ - ... - diff --git a/typings/matplotlib/quiver.pyi b/typings/matplotlib/quiver.pyi deleted file mode 100644 index 7c394c8..0000000 --- a/typings/matplotlib/quiver.pyi +++ /dev/null @@ -1,117 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib.artist as martist -import matplotlib.collections as mcollections -import numpy as np -from matplotlib.axes import Axes -from matplotlib.figure import Figure -from matplotlib.text import Text -from matplotlib.transforms import Bbox, Transform -from numpy.typing import ArrayLike -from collections.abc import Sequence -from typing import Any, Literal, overload -from matplotlib.typing import ColorType - -class QuiverKey(martist.Artist): - halign: dict[Literal["N", "S", "E", "W"], Literal["left", "center", "right"]] - valign: dict[Literal["N", "S", "E", "W"], Literal["top", "center", "bottom"]] - pivot: dict[Literal["N", "S", "E", "W"], Literal["middle", "tip", "tail"]] - Q: Quiver - X: float - Y: float - U: float - angle: float - coord: Literal["axes", "figure", "data", "inches"] - color: ColorType | None - label: str - labelpos: Literal["N", "S", "E", "W"] - labelcolor: ColorType | None - fontproperties: dict[str, Any] - kw: dict[str, Any] - text: Text - zorder: float - def __init__(self, Q: Quiver, X: float, Y: float, U: float, label: str, *, angle: float = ..., coordinates: Literal["axes", "figure", "data", "inches"] = ..., color: ColorType | None = ..., labelsep: float = ..., labelpos: Literal["N", "S", "E", "W"] = ..., labelcolor: ColorType | None = ..., fontproperties: dict[str, Any] | None = ..., **kwargs) -> None: - ... - - @property - def labelsep(self) -> float: - ... - - def set_figure(self, fig: Figure) -> None: - ... - - - -class Quiver(mcollections.PolyCollection): - X: ArrayLike - Y: ArrayLike - XY: ArrayLike - U: ArrayLike - V: ArrayLike - Umask: ArrayLike - N: int - scale: float | None - headwidth: float - headlength: float - headaxislength: float - minshaft: float - minlength: float - units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] - scale_units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] | None - angles: Literal["uv", "xy"] | ArrayLike - width: float | None - pivot: Literal["tail", "middle", "tip"] - transform: Transform - polykw: dict[str, Any] - @overload - def __init__(self, ax: Axes, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, scale: float | None = ..., headwidth: float = ..., headlength: float = ..., headaxislength: float = ..., minshaft: float = ..., minlength: float = ..., units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] = ..., scale_units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] | None = ..., angles: Literal["uv", "xy"] | ArrayLike = ..., width: float | None = ..., color: ColorType | Sequence[ColorType] = ..., pivot: Literal["tail", "mid", "middle", "tip"] = ..., **kwargs) -> None: - ... - - @overload - def __init__(self, ax: Axes, X: ArrayLike, Y: ArrayLike, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, scale: float | None = ..., headwidth: float = ..., headlength: float = ..., headaxislength: float = ..., minshaft: float = ..., minlength: float = ..., units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] = ..., scale_units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] | None = ..., angles: Literal["uv", "xy"] | ArrayLike = ..., width: float | None = ..., color: ColorType | Sequence[ColorType] = ..., pivot: Literal["tail", "mid", "middle", "tip"] = ..., **kwargs) -> None: - ... - - def get_datalim(self, transData: Transform) -> Bbox: - ... - - def set_UVC(self, U: ArrayLike, V: ArrayLike, C: ArrayLike | None = ...) -> None: - ... - - @property - def quiver_doc(self) -> str: - ... - - - -class Barbs(mcollections.PolyCollection): - sizes: dict[str, float] - fill_empty: bool - barb_increments: dict[str, float] - rounding: bool - flip: np.ndarray - x: ArrayLike - y: ArrayLike - u: ArrayLike - v: ArrayLike - @overload - def __init__(self, ax: Axes, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, pivot: str = ..., length: int = ..., barbcolor: ColorType | Sequence[ColorType] | None = ..., flagcolor: ColorType | Sequence[ColorType] | None = ..., sizes: dict[str, float] | None = ..., fill_empty: bool = ..., barb_increments: dict[str, float] | None = ..., rounding: bool = ..., flip_barb: bool | ArrayLike = ..., **kwargs) -> None: - ... - - @overload - def __init__(self, ax: Axes, X: ArrayLike, Y: ArrayLike, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, pivot: str = ..., length: int = ..., barbcolor: ColorType | Sequence[ColorType] | None = ..., flagcolor: ColorType | Sequence[ColorType] | None = ..., sizes: dict[str, float] | None = ..., fill_empty: bool = ..., barb_increments: dict[str, float] | None = ..., rounding: bool = ..., flip_barb: bool | ArrayLike = ..., **kwargs) -> None: - ... - - def set_UVC(self, U: ArrayLike, V: ArrayLike, C: ArrayLike | None = ...) -> None: - ... - - def set_offsets(self, xy: ArrayLike) -> None: - ... - - @property - def barbs_doc(self) -> str: - ... - - - diff --git a/typings/matplotlib/rcsetup.pyi b/typings/matplotlib/rcsetup.pyi deleted file mode 100644 index 6968d18..0000000 --- a/typings/matplotlib/rcsetup.pyi +++ /dev/null @@ -1,149 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from cycler import Cycler -from collections.abc import Iterable -from typing import Any, Literal, TypeVar -from matplotlib.typing import ColorType, MarkEveryType - -interactive_bk: list[str] -non_interactive_bk: list[str] -all_backends: list[str] -_T = TypeVar("_T") -class ValidateInStrings: - key: str - ignorecase: bool - valid: dict[str, str] - def __init__(self, key: str, valid: Iterable[str], ignorecase: bool = ..., *, _deprecated_since: str | None = ...) -> None: - ... - - def __call__(self, s: Any) -> str: - ... - - - -def validate_any(s: Any) -> Any: - ... - -def validate_anylist(s: Any) -> list[Any]: - ... - -def validate_bool(b: Any) -> bool: - ... - -def validate_axisbelow(s: Any) -> bool | Literal["line"]: - ... - -def validate_dpi(s: Any) -> Literal["figure"] | float: - ... - -def validate_string(s: Any) -> str: - ... - -def validate_string_or_None(s: Any) -> str | None: - ... - -def validate_stringlist(s: Any) -> list[str]: - ... - -def validate_int(s: Any) -> int: - ... - -def validate_int_or_None(s: Any) -> int | None: - ... - -def validate_float(s: Any) -> float: - ... - -def validate_float_or_None(s: Any) -> float | None: - ... - -def validate_floatlist(s: Any) -> list[float]: - ... - -def validate_fonttype(s: Any) -> int: - ... - -_auto_backend_sentinel: object -def validate_backend(s: Any) -> str: - ... - -def validate_color_or_inherit(s: Any) -> Literal["inherit"] | ColorType: - ... - -def validate_color_or_auto(s: Any) -> ColorType | Literal["auto"]: - ... - -def validate_color_for_prop_cycle(s: Any) -> ColorType: - ... - -def validate_color(s: Any) -> ColorType: - ... - -def validate_colorlist(s: Any) -> list[ColorType]: - ... - -def validate_aspect(s: Any) -> Literal["auto", "equal"] | float: - ... - -def validate_fontsize_None(s: Any) -> Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", "larger",] | float | None: - ... - -def validate_fontsize(s: Any) -> Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", "larger",] | float: - ... - -def validate_fontsizelist(s: Any) -> list[Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", "larger",] | float]: - ... - -def validate_fontweight(s: Any) -> Literal["ultralight", "light", "normal", "regular", "book", "medium", "roman", "semibold", "demibold", "demi", "bold", "heavy", "extra bold", "black",] | int: - ... - -def validate_fontstretch(s: Any) -> Literal["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded",] | int: - ... - -def validate_font_properties(s: Any) -> dict[str, Any]: - ... - -def validate_whiskers(s: Any) -> list[float] | float: - ... - -def validate_ps_distiller(s: Any) -> None | Literal["ghostscript", "xpdf"]: - ... - -def validate_fillstyle(s: Any) -> Literal["full", "left", "right", "bottom", "top", "none"]: - ... - -def validate_fillstylelist(s: Any) -> list[Literal["full", "left", "right", "bottom", "top", "none"]]: - ... - -def validate_markevery(s: Any) -> MarkEveryType: - ... - -def validate_markeverylist(s: Any) -> list[MarkEveryType]: - ... - -def validate_bbox(s: Any) -> Literal["tight", "standard"] | None: - ... - -def validate_sketch(s: Any) -> None | tuple[float, float, float]: - ... - -def validate_hatch(s: Any) -> str: - ... - -def validate_hatchlist(s: Any) -> list[str]: - ... - -def validate_dashlist(s: Any) -> list[list[float]]: - ... - -def cycler(*args, **kwargs) -> Cycler: - ... - -def validate_cycler(s: Any) -> Cycler: - ... - -def validate_hist_bins(s: Any) -> Literal["auto", "sturges", "fd", "doane", "scott", "rice", "sqrt"] | int | list[float]: - ... - diff --git a/typings/matplotlib/sankey.pyi b/typings/matplotlib/sankey.pyi deleted file mode 100644 index ffec84c..0000000 --- a/typings/matplotlib/sankey.pyi +++ /dev/null @@ -1,41 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from matplotlib.axes import Axes -from collections.abc import Callable, Iterable -from typing import Any - -__license__: str -__credits__: list[str] -__author__: str -__version__: str -RIGHT: int -UP: int -DOWN: int -class Sankey: - diagrams: list[Any] - ax: Axes - unit: Any - format: str | Callable[[float], str] - scale: float - gap: float - radius: float - shoulder: float - offset: float - margin: float - pitch: float - tolerance: float - extent: np.ndarray - def __init__(self, ax: Axes | None = ..., scale: float = ..., unit: Any = ..., format: str | Callable[[float], str] = ..., gap: float = ..., radius: float = ..., shoulder: float = ..., offset: float = ..., head_angle: float = ..., margin: float = ..., tolerance: float = ..., **kwargs) -> None: - ... - - def add(self, patchlabel: str = ..., flows: Iterable[float] | None = ..., orientations: Iterable[int] | None = ..., labels: str | Iterable[str | None] = ..., trunklength: float = ..., pathlengths: float | Iterable[float] = ..., prior: int | None = ..., connect: tuple[int, int] = ..., rotation: float = ..., **kwargs) -> Sankey: - ... - - def finish(self) -> list[Any]: - ... - - - diff --git a/typings/matplotlib/scale.pyi b/typings/matplotlib/scale.pyi deleted file mode 100644 index 96c3a5e..0000000 --- a/typings/matplotlib/scale.pyi +++ /dev/null @@ -1,232 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.axis import Axis -from matplotlib.transforms import Transform -from collections.abc import Callable, Iterable -from typing import Literal -from numpy.typing import ArrayLike - -class ScaleBase: - def __init__(self, axis: Axis | None) -> None: - ... - - def get_transform(self) -> Transform: - ... - - def set_default_locators_and_formatters(self, axis: Axis) -> None: - ... - - def limit_range_for_scale(self, vmin: float, vmax: float, minpos: float) -> tuple[float, float]: - ... - - - -class LinearScale(ScaleBase): - name: str - ... - - -class FuncTransform(Transform): - input_dims: int - output_dims: int - def __init__(self, forward: Callable[[ArrayLike], ArrayLike], inverse: Callable[[ArrayLike], ArrayLike]) -> None: - ... - - def inverted(self) -> FuncTransform: - ... - - - -class FuncScale(ScaleBase): - name: str - def __init__(self, axis: Axis | None, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]]) -> None: - ... - - - -class LogTransform(Transform): - input_dims: int - output_dims: int - base: float - def __init__(self, base: float, nonpositive: Literal["clip", "mask"] = ...) -> None: - ... - - def inverted(self) -> InvertedLogTransform: - ... - - - -class InvertedLogTransform(Transform): - input_dims: int - output_dims: int - base: float - def __init__(self, base: float) -> None: - ... - - def inverted(self) -> LogTransform: - ... - - - -class LogScale(ScaleBase): - name: str - subs: Iterable[int] | None - def __init__(self, axis: Axis | None, *, base: float = ..., subs: Iterable[int] | None = ..., nonpositive: Literal["clip", "mask"] = ...) -> None: - ... - - @property - def base(self) -> float: - ... - - def get_transform(self) -> Transform: - ... - - - -class FuncScaleLog(LogScale): - def __init__(self, axis: Axis | None, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]], base: float = ...) -> None: - ... - - @property - def base(self) -> float: - ... - - def get_transform(self) -> Transform: - ... - - - -class SymmetricalLogTransform(Transform): - input_dims: int - output_dims: int - base: float - linthresh: float - linscale: float - def __init__(self, base: float, linthresh: float, linscale: float) -> None: - ... - - def inverted(self) -> InvertedSymmetricalLogTransform: - ... - - - -class InvertedSymmetricalLogTransform(Transform): - input_dims: int - output_dims: int - base: float - linthresh: float - invlinthresh: float - linscale: float - def __init__(self, base: float, linthresh: float, linscale: float) -> None: - ... - - def inverted(self) -> SymmetricalLogTransform: - ... - - - -class SymmetricalLogScale(ScaleBase): - name: str - subs: Iterable[int] | None - def __init__(self, axis: Axis | None, *, base: float = ..., linthresh: float = ..., subs: Iterable[int] | None = ..., linscale: float = ...) -> None: - ... - - @property - def base(self) -> float: - ... - - @property - def linthresh(self) -> float: - ... - - @property - def linscale(self) -> float: - ... - - def get_transform(self) -> SymmetricalLogTransform: - ... - - - -class AsinhTransform(Transform): - input_dims: int - output_dims: int - linear_width: float - def __init__(self, linear_width: float) -> None: - ... - - def inverted(self) -> InvertedAsinhTransform: - ... - - - -class InvertedAsinhTransform(Transform): - input_dims: int - output_dims: int - linear_width: float - def __init__(self, linear_width: float) -> None: - ... - - def inverted(self) -> AsinhTransform: - ... - - - -class AsinhScale(ScaleBase): - name: str - auto_tick_multipliers: dict[int, tuple[int, ...]] - def __init__(self, axis: Axis | None, *, linear_width: float = ..., base: float = ..., subs: Iterable[int] | Literal["auto"] | None = ..., **kwargs) -> None: - ... - - @property - def linear_width(self) -> float: - ... - - def get_transform(self) -> AsinhTransform: - ... - - - -class LogitTransform(Transform): - input_dims: int - output_dims: int - def __init__(self, nonpositive: Literal["mask", "clip"] = ...) -> None: - ... - - def inverted(self) -> LogisticTransform: - ... - - - -class LogisticTransform(Transform): - input_dims: int - output_dims: int - def __init__(self, nonpositive: Literal["mask", "clip"] = ...) -> None: - ... - - def inverted(self) -> LogitTransform: - ... - - - -class LogitScale(ScaleBase): - name: str - def __init__(self, axis: Axis | None, nonpositive: Literal["mask", "clip"] = ..., *, one_half: str = ..., use_overline: bool = ...) -> None: - ... - - def get_transform(self) -> LogitTransform: - ... - - - -def get_scale_names() -> list[str]: - ... - -def scale_factory(scale: str, axis: Axis, **kwargs) -> ScaleBase: - ... - -def register_scale(scale_class: type[ScaleBase]) -> None: - ... - diff --git a/typings/matplotlib/sphinxext/__init__.pyi b/typings/matplotlib/sphinxext/__init__.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/matplotlib/sphinxext/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/matplotlib/spines.pyi b/typings/matplotlib/spines.pyi deleted file mode 100644 index e8b581d..0000000 --- a/typings/matplotlib/spines.pyi +++ /dev/null @@ -1,119 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib.patches as mpatches -from collections.abc import Callable, Iterator, MutableMapping -from typing import Literal, TypeVar, overload -from matplotlib.axes import Axes -from matplotlib.axis import Axis -from matplotlib.path import Path -from matplotlib.transforms import Transform -from matplotlib.typing import ColorType - -class Spine(mpatches.Patch): - axes: Axes - spine_type: str - axis: Axis | None - def __init__(self, axes: Axes, spine_type: str, path: Path, **kwargs) -> None: - ... - - def set_patch_arc(self, center: tuple[float, float], radius: float, theta1: float, theta2: float) -> None: - ... - - def set_patch_circle(self, center: tuple[float, float], radius: float) -> None: - ... - - def set_patch_line(self) -> None: - ... - - def get_patch_transform(self) -> Transform: - ... - - def get_path(self) -> Path: - ... - - def register_axis(self, axis: Axis) -> None: - ... - - def clear(self) -> None: - ... - - def set_position(self, position: Literal["center", "zero"] | tuple[Literal["outward", "axes", "data"], float]) -> None: - ... - - def get_position(self) -> Literal["center", "zero"] | tuple[Literal["outward", "axes", "data"], float]: - ... - - def get_spine_transform(self) -> Transform: - ... - - def set_bounds(self, low: float | None = ..., high: float | None = ...) -> None: - ... - - def get_bounds(self) -> tuple[float, float]: - ... - - _T = TypeVar("_T", bound=Spine) - @classmethod - def linear_spine(cls: type[_T], axes: Axes, spine_type: Literal["left", "right", "bottom", "top"], **kwargs) -> _T: - ... - - @classmethod - def arc_spine(cls: type[_T], axes: Axes, spine_type: Literal["left", "right", "bottom", "top"], center: tuple[float, float], radius: float, theta1: float, theta2: float, **kwargs) -> _T: - ... - - @classmethod - def circular_spine(cls: type[_T], axes: Axes, center: tuple[float, float], radius: float, **kwargs) -> _T: - ... - - def set_color(self, c: ColorType | None) -> None: - ... - - - -class SpinesProxy: - def __init__(self, spine_dict: dict[str, Spine]) -> None: - ... - - def __getattr__(self, name: str) -> Callable[..., None]: - ... - - def __dir__(self) -> list[str]: - ... - - - -class Spines(MutableMapping[str, Spine]): - def __init__(self, **kwargs: Spine) -> None: - ... - - @classmethod - def from_dict(cls, d: dict[str, Spine]) -> Spines: - ... - - def __getattr__(self, name: str) -> Spine: - ... - - @overload - def __getitem__(self, key: str) -> Spine: - ... - - @overload - def __getitem__(self, key: list[str]) -> SpinesProxy: - ... - - def __setitem__(self, key: str, value: Spine) -> None: - ... - - def __delitem__(self, key: str) -> None: - ... - - def __iter__(self) -> Iterator[str]: - ... - - def __len__(self) -> int: - ... - - - diff --git a/typings/matplotlib/stackplot.pyi b/typings/matplotlib/stackplot.pyi deleted file mode 100644 index 9d4387a..0000000 --- a/typings/matplotlib/stackplot.pyi +++ /dev/null @@ -1,14 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.axes import Axes -from matplotlib.collections import PolyCollection -from collections.abc import Iterable -from typing import Literal -from numpy.typing import ArrayLike -from matplotlib.typing import ColorType - -def stackplot(axes: Axes, x: ArrayLike, *args: ArrayLike, labels: Iterable[str] = ..., colors: Iterable[ColorType] | None = ..., baseline: Literal["zero", "sym", "wiggle", "weighted_wiggle"] = ..., **kwargs) -> list[PolyCollection]: - ... - diff --git a/typings/matplotlib/streamplot.pyi b/typings/matplotlib/streamplot.pyi deleted file mode 100644 index 478bdf5..0000000 --- a/typings/matplotlib/streamplot.pyi +++ /dev/null @@ -1,107 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.axes import Axes -from matplotlib.colors import Colormap, Normalize -from matplotlib.collections import LineCollection, PatchCollection -from matplotlib.patches import ArrowStyle -from matplotlib.transforms import Transform -from typing import Literal -from numpy.typing import ArrayLike -from .typing import ColorType - -def streamplot(axes: Axes, x: ArrayLike, y: ArrayLike, u: ArrayLike, v: ArrayLike, density: float | tuple[float, float] = ..., linewidth: float | ArrayLike | None = ..., color: ColorType | ArrayLike | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., arrowsize: float = ..., arrowstyle: str | ArrowStyle = ..., minlength: float = ..., transform: Transform | None = ..., zorder: float | None = ..., start_points: ArrayLike | None = ..., maxlength: float = ..., integration_direction: Literal["forward", "backward", "both"] = ..., broken_streamlines: bool = ...) -> StreamplotSet: - ... - -class StreamplotSet: - lines: LineCollection - arrows: PatchCollection - def __init__(self, lines: LineCollection, arrows: PatchCollection) -> None: - ... - - - -class DomainMap: - grid: Grid - mask: StreamMask - x_grid2mask: float - y_grid2mask: float - x_mask2grid: float - y_mask2grid: float - x_data2grid: float - y_data2grid: float - def __init__(self, grid: Grid, mask: StreamMask) -> None: - ... - - def grid2mask(self, xi: float, yi: float) -> tuple[int, int]: - ... - - def mask2grid(self, xm: float, ym: float) -> tuple[float, float]: - ... - - def data2grid(self, xd: float, yd: float) -> tuple[float, float]: - ... - - def grid2data(self, xg: float, yg: float) -> tuple[float, float]: - ... - - def start_trajectory(self, xg: float, yg: float, broken_streamlines: bool = ...) -> None: - ... - - def reset_start_point(self, xg: float, yg: float) -> None: - ... - - def update_trajectory(self, xg, yg, broken_streamlines: bool = ...) -> None: - ... - - def undo_trajectory(self) -> None: - ... - - - -class Grid: - nx: int - ny: int - dx: float - dy: float - x_origin: float - y_origin: float - width: float - height: float - def __init__(self, x: ArrayLike, y: ArrayLike) -> None: - ... - - @property - def shape(self) -> tuple[int, int]: - ... - - def within_grid(self, xi: float, yi: float) -> bool: - ... - - - -class StreamMask: - nx: int - ny: int - shape: tuple[int, int] - def __init__(self, density: float | tuple[float, float]) -> None: - ... - - def __getitem__(self, args): - ... - - - -class InvalidIndexError(Exception): - ... - - -class TerminateTrajectory(Exception): - ... - - -class OutOfBounds(IndexError): - ... - - diff --git a/typings/matplotlib/style/__init__.pyi b/typings/matplotlib/style/__init__.pyi deleted file mode 100644 index 2561204..0000000 --- a/typings/matplotlib/style/__init__.pyi +++ /dev/null @@ -1,7 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .core import available, context, library, reload_library, use - -__all__ = ["available", "context", "library", "reload_library", "use"] diff --git a/typings/matplotlib/style/core.pyi b/typings/matplotlib/style/core.pyi deleted file mode 100644 index da07038..0000000 --- a/typings/matplotlib/style/core.pyi +++ /dev/null @@ -1,23 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import contextlib -from collections.abc import Generator -from matplotlib import RcParams -from matplotlib.typing import RcStyleType - -USER_LIBRARY_PATHS: list[str] = ... -STYLE_EXTENSION: str = ... -def use(style: RcStyleType) -> None: - ... - -@contextlib.contextmanager -def context(style: RcStyleType, after_reset: bool = ...) -> Generator[None, None, None]: - ... - -library: dict[str, RcParams] -available: list[str] -def reload_library() -> None: - ... - diff --git a/typings/matplotlib/table.pyi b/typings/matplotlib/table.pyi deleted file mode 100644 index b5f85c0..0000000 --- a/typings/matplotlib/table.pyi +++ /dev/null @@ -1,108 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .artist import Artist -from .axes import Axes -from .backend_bases import RendererBase -from .patches import Rectangle -from .path import Path -from .text import Text -from .transforms import Bbox -from .typing import ColorType -from collections.abc import Sequence -from typing import Any, Literal - -class Cell(Rectangle): - PAD: float - def __init__(self, xy: tuple[float, float], width: float, height: float, *, edgecolor: ColorType = ..., facecolor: ColorType = ..., fill: bool = ..., text: str = ..., loc: Literal["left", "center", "right"] | None = ..., fontproperties: dict[str, Any] | None = ..., visible_edges: str | None = ...) -> None: - ... - - def get_text(self) -> Text: - ... - - def set_fontsize(self, size: float) -> None: - ... - - def get_fontsize(self) -> float: - ... - - def auto_set_font_size(self, renderer: RendererBase) -> float: - ... - - def get_text_bounds(self, renderer: RendererBase) -> tuple[float, float, float, float]: - ... - - def get_required_width(self, renderer: RendererBase) -> float: - ... - - def set_text_props(self, **kwargs) -> None: - ... - - @property - def visible_edges(self) -> str: - ... - - @visible_edges.setter - def visible_edges(self, value: str | None) -> None: - ... - - def get_path(self) -> Path: - ... - - - -CustomCell = Cell -class Table(Artist): - codes: dict[str, int] - FONTSIZE: float - AXESPAD: float - def __init__(self, ax: Axes, loc: str | None = ..., bbox: Bbox | None = ..., **kwargs) -> None: - ... - - def add_cell(self, row: int, col: int, *args, **kwargs) -> Cell: - ... - - def __setitem__(self, position: tuple[int, int], cell: Cell) -> None: - ... - - def __getitem__(self, position: tuple[int, int]) -> Cell: - ... - - @property - def edges(self) -> str | None: - ... - - @edges.setter - def edges(self, value: str | None) -> None: - ... - - def draw(self, renderer) -> None: - ... - - def get_children(self) -> list[Artist]: - ... - - def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - def auto_set_column_width(self, col: int | Sequence[int]) -> None: - ... - - def auto_set_font_size(self, value: bool = ...) -> None: - ... - - def scale(self, xscale: float, yscale: float) -> None: - ... - - def set_fontsize(self, size: float) -> None: - ... - - def get_celld(self) -> dict[tuple[int, int], Cell]: - ... - - - -def table(ax: Axes, cellText: Sequence[Sequence[str]] | None = ..., cellColours: Sequence[Sequence[ColorType]] | None = ..., cellLoc: Literal["left", "center", "right"] = ..., colWidths: Sequence[float] | None = ..., rowLabels: Sequence[str] | None = ..., rowColours: Sequence[ColorType] | None = ..., rowLoc: Literal["left", "center", "right"] = ..., colLabels: Sequence[str] | None = ..., colColours: Sequence[ColorType] | None = ..., colLoc: Literal["left", "center", "right"] = ..., loc: str = ..., bbox: Bbox | None = ..., edges: str = ..., **kwargs) -> Table: - ... - diff --git a/typings/matplotlib/testing/__init__.pyi b/typings/matplotlib/testing/__init__.pyi deleted file mode 100644 index c049c56..0000000 --- a/typings/matplotlib/testing/__init__.pyi +++ /dev/null @@ -1,32 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import subprocess -from collections.abc import Callable -from typing import Any, IO, Literal, overload - -def set_font_settings_for_testing() -> None: - ... - -def set_reproducibility_for_testing() -> None: - ... - -def setup() -> None: - ... - -@overload -def subprocess_run_for_testing(command: list[str], env: dict[str, str] | None = ..., timeout: float | None = ..., stdout: int | IO[Any] | None = ..., stderr: int | IO[Any] | None = ..., check: bool = ..., *, text: Literal[True], capture_output: bool = ...) -> subprocess.CompletedProcess[str]: - ... - -@overload -def subprocess_run_for_testing(command: list[str], env: dict[str, str] | None = ..., timeout: float | None = ..., stdout: int | IO[Any] | None = ..., stderr: int | IO[Any] | None = ..., check: bool = ..., text: Literal[False] = ..., capture_output: bool = ...) -> subprocess.CompletedProcess[bytes]: - ... - -@overload -def subprocess_run_for_testing(command: list[str], env: dict[str, str] | None = ..., timeout: float | None = ..., stdout: int | IO[Any] | None = ..., stderr: int | IO[Any] | None = ..., check: bool = ..., text: bool = ..., capture_output: bool = ...) -> subprocess.CompletedProcess[bytes] | subprocess.CompletedProcess[str]: - ... - -def subprocess_run_helper(func: Callable[[], None], *args: Any, timeout: float, extra_env: dict[str, str] | None = ...) -> subprocess.CompletedProcess[str]: - ... - diff --git a/typings/matplotlib/tests/__init__.pyi b/typings/matplotlib/tests/__init__.pyi deleted file mode 100644 index 4b2d379..0000000 --- a/typings/matplotlib/tests/__init__.pyi +++ /dev/null @@ -1,8 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from pathlib import Path - -if not(Path(__file__).parent / 'baseline_images').exists(): - ... diff --git a/typings/matplotlib/texmanager.pyi b/typings/matplotlib/texmanager.pyi deleted file mode 100644 index 9e6e83f..0000000 --- a/typings/matplotlib/texmanager.pyi +++ /dev/null @@ -1,48 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from .backend_bases import RendererBase -from matplotlib.typing import ColorType - -class TexManager: - texcache: str - @classmethod - def get_basefile(cls, tex: str, fontsize: float, dpi: float | None = ...) -> str: - ... - - @classmethod - def get_font_preamble(cls) -> str: - ... - - @classmethod - def get_custom_preamble(cls) -> str: - ... - - @classmethod - def make_tex(cls, tex: str, fontsize: float) -> str: - ... - - @classmethod - def make_dvi(cls, tex: str, fontsize: float) -> str: - ... - - @classmethod - def make_png(cls, tex: str, fontsize: float, dpi: float) -> str: - ... - - @classmethod - def get_grey(cls, tex: str, fontsize: float | None = ..., dpi: float | None = ...) -> np.ndarray: - ... - - @classmethod - def get_rgba(cls, tex: str, fontsize: float | None = ..., dpi: float | None = ..., rgb: ColorType = ...) -> np.ndarray: - ... - - @classmethod - def get_text_width_height_descent(cls, tex: str, fontsize, renderer: RendererBase | None = ...) -> tuple[int, int, int]: - ... - - - diff --git a/typings/matplotlib/text.pyi b/typings/matplotlib/text.pyi deleted file mode 100644 index 0ee621b..0000000 --- a/typings/matplotlib/text.pyi +++ /dev/null @@ -1,257 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .artist import Artist -from .backend_bases import RendererBase -from .font_manager import FontProperties -from .offsetbox import DraggableAnnotation -from .path import Path -from .patches import FancyArrowPatch, FancyBboxPatch -from .transforms import Bbox, BboxBase, Transform -from collections.abc import Callable, Iterable -from typing import Any, Literal -from .typing import ColorType - -class Text(Artist): - zorder: float - def __init__(self, x: float = ..., y: float = ..., text: Any = ..., *, color: ColorType | None = ..., verticalalignment: Literal["bottom", "baseline", "center", "center_baseline", "top"] = ..., horizontalalignment: Literal["left", "center", "right"] = ..., multialignment: Literal["left", "center", "right"] | None = ..., fontproperties: str | Path | FontProperties | None = ..., rotation: float | Literal["vertical", "horizontal"] | None = ..., linespacing: float | None = ..., rotation_mode: Literal["default", "anchor"] | None = ..., usetex: bool | None = ..., wrap: bool = ..., transform_rotates_text: bool = ..., parse_math: bool | None = ..., antialiased: bool | None = ..., **kwargs) -> None: - ... - - def update(self, kwargs: dict[str, Any]) -> list[Any]: - ... - - def get_rotation(self) -> float: - ... - - def get_transform_rotates_text(self) -> bool: - ... - - def set_rotation_mode(self, m: None | Literal["default", "anchor"]) -> None: - ... - - def get_rotation_mode(self) -> Literal["default", "anchor"]: - ... - - def set_bbox(self, rectprops: dict[str, Any]) -> None: - ... - - def get_bbox_patch(self) -> None | FancyBboxPatch: - ... - - def update_bbox_position_size(self, renderer: RendererBase) -> None: - ... - - def get_wrap(self) -> bool: - ... - - def set_wrap(self, wrap: bool) -> None: - ... - - def get_color(self) -> ColorType: - ... - - def get_fontproperties(self) -> FontProperties: - ... - - def get_fontfamily(self) -> list[str]: - ... - - def get_fontname(self) -> str: - ... - - def get_fontstyle(self) -> Literal["normal", "italic", "oblique"]: - ... - - def get_fontsize(self) -> float | str: - ... - - def get_fontvariant(self) -> Literal["normal", "small-caps"]: - ... - - def get_fontweight(self) -> int | str: - ... - - def get_stretch(self) -> int | str: - ... - - def get_horizontalalignment(self) -> Literal["left", "center", "right"]: - ... - - def get_unitless_position(self) -> tuple[float, float]: - ... - - def get_position(self) -> tuple[float, float]: - ... - - def get_text(self) -> str: - ... - - def get_verticalalignment(self) -> Literal["bottom", "baseline", "center", "center_baseline", "top"]: - ... - - def get_window_extent(self, renderer: RendererBase | None = ..., dpi: float | None = ...) -> Bbox: - ... - - def set_backgroundcolor(self, color: ColorType) -> None: - ... - - def set_color(self, color: ColorType) -> None: - ... - - def set_horizontalalignment(self, align: Literal["left", "center", "right"]) -> None: - ... - - def set_multialignment(self, align: Literal["left", "center", "right"]) -> None: - ... - - def set_linespacing(self, spacing: float) -> None: - ... - - def set_fontfamily(self, fontname: str | Iterable[str]) -> None: - ... - - def set_fontvariant(self, variant: Literal["normal", "small-caps"]) -> None: - ... - - def set_fontstyle(self, fontstyle: Literal["normal", "italic", "oblique"]) -> None: - ... - - def set_fontsize(self, fontsize: float | str) -> None: - ... - - def get_math_fontfamily(self) -> str: - ... - - def set_math_fontfamily(self, fontfamily: str) -> None: - ... - - def set_fontweight(self, weight: int | str) -> None: - ... - - def set_fontstretch(self, stretch: int | str) -> None: - ... - - def set_position(self, xy: tuple[float, float]) -> None: - ... - - def set_x(self, x: float) -> None: - ... - - def set_y(self, y: float) -> None: - ... - - def set_rotation(self, s: float) -> None: - ... - - def set_transform_rotates_text(self, t: bool) -> None: - ... - - def set_verticalalignment(self, align: Literal["bottom", "baseline", "center", "center_baseline", "top"]) -> None: - ... - - def set_text(self, s: Any) -> None: - ... - - def set_fontproperties(self, fp: FontProperties | str | Path | None) -> None: - ... - - def set_usetex(self, usetex: bool | None) -> None: - ... - - def get_usetex(self) -> bool: - ... - - def set_parse_math(self, parse_math: bool) -> None: - ... - - def get_parse_math(self) -> bool: - ... - - def set_fontname(self, fontname: str | Iterable[str]) -> None: - ... - - def get_antialiased(self) -> bool: - ... - - def set_antialiased(self, antialiased: bool) -> None: - ... - - - -class OffsetFrom: - def __init__(self, artist: Artist | BboxBase | Transform, ref_coord: tuple[float, float], unit: Literal["points", "pixels"] = ...) -> None: - ... - - def set_unit(self, unit: Literal["points", "pixels"]) -> None: - ... - - def get_unit(self) -> Literal["points", "pixels"]: - ... - - def __call__(self, renderer: RendererBase) -> Transform: - ... - - - -class _AnnotationBase: - xy: tuple[float, float] - xycoords: str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform] - def __init__(self, xy, xycoords: str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform] = ..., annotation_clip: bool | None = ...) -> None: - ... - - def set_annotation_clip(self, b: bool | None) -> None: - ... - - def get_annotation_clip(self) -> bool | None: - ... - - def draggable(self, state: bool | None = ..., use_blit: bool = ...) -> DraggableAnnotation | None: - ... - - - -class Annotation(Text, _AnnotationBase): - arrowprops: dict[str, Any] | None - arrow_patch: FancyArrowPatch | None - def __init__(self, text: str, xy: tuple[float, float], xytext: tuple[float, float] | None = ..., xycoords: str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform] = ..., textcoords: str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform] | None = ..., arrowprops: dict[str, Any] | None = ..., annotation_clip: bool | None = ..., **kwargs) -> None: - ... - - @property - def xycoords(self) -> str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform]: - ... - - @xycoords.setter - def xycoords(self, xycoords: str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform]) -> None: - ... - - @property - def xyann(self) -> tuple[float, float]: - ... - - @xyann.setter - def xyann(self, xytext: tuple[float, float]) -> None: - ... - - def get_anncoords(self) -> str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform]: - ... - - def set_anncoords(self, coords: str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform]) -> None: - ... - - @property - def anncoords(self) -> str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform]: - ... - - @anncoords.setter - def anncoords(self, coords: str | tuple[str, str] | Artist | Transform | Callable[[RendererBase], Bbox | Transform]) -> None: - ... - - def update_positions(self, renderer: RendererBase) -> None: - ... - - def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: - ... - - - diff --git a/typings/matplotlib/textpath.pyi b/typings/matplotlib/textpath.pyi deleted file mode 100644 index 8e884da..0000000 --- a/typings/matplotlib/textpath.pyi +++ /dev/null @@ -1,56 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from matplotlib.font_manager import FontProperties -from matplotlib.ft2font import FT2Font -from matplotlib.mathtext import MathTextParser, VectorParse -from matplotlib.path import Path -from typing import Literal - -class TextToPath: - FONT_SCALE: float - DPI: float - mathtext_parser: MathTextParser[VectorParse] - def __init__(self) -> None: - ... - - def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool | Literal["TeX"]) -> tuple[float, float, float]: - ... - - def get_text_path(self, prop: FontProperties, s: str, ismath: bool | Literal["TeX"] = ...) -> list[np.ndarray]: - ... - - def get_glyphs_with_font(self, font: FT2Font, s: str, glyph_map: dict[str, tuple[np.ndarray, np.ndarray]] | None = ..., return_new_glyphs_only: bool = ...) -> tuple[list[tuple[str, float, float, float]], dict[str, tuple[np.ndarray, np.ndarray]], list[tuple[list[tuple[float, float]], list[int]]],]: - ... - - def get_glyphs_mathtext(self, prop: FontProperties, s: str, glyph_map: dict[str, tuple[np.ndarray, np.ndarray]] | None = ..., return_new_glyphs_only: bool = ...) -> tuple[list[tuple[str, float, float, float]], dict[str, tuple[np.ndarray, np.ndarray]], list[tuple[list[tuple[float, float]], list[int]]],]: - ... - - def get_glyphs_tex(self, prop: FontProperties, s: str, glyph_map: dict[str, tuple[np.ndarray, np.ndarray]] | None = ..., return_new_glyphs_only: bool = ...) -> tuple[list[tuple[str, float, float, float]], dict[str, tuple[np.ndarray, np.ndarray]], list[tuple[list[tuple[float, float]], list[int]]],]: - ... - - - -text_to_path: TextToPath -class TextPath(Path): - def __init__(self, xy: tuple[float, float], s: str, size: float | None = ..., prop: FontProperties | None = ..., _interpolation_steps: int = ..., usetex: bool = ...) -> None: - ... - - def set_size(self, size: float | None) -> None: - ... - - def get_size(self) -> float | None: - ... - - @property - def vertices(self) -> np.ndarray: - ... - - @property - def codes(self) -> np.ndarray: - ... - - - diff --git a/typings/matplotlib/ticker.pyi b/typings/matplotlib/ticker.pyi deleted file mode 100644 index 7b1d9ee..0000000 --- a/typings/matplotlib/ticker.pyi +++ /dev/null @@ -1,464 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from collections.abc import Callable, Sequence -from typing import Any, Literal -from matplotlib.axis import Axis -from matplotlib.transforms import Transform -from matplotlib.projections.polar import _AxisWrapper - -class _DummyAxis: - __name__: str - def __init__(self, minpos: float = ...) -> None: - ... - - def get_view_interval(self) -> tuple[float, float]: - ... - - def set_view_interval(self, vmin: float, vmax: float) -> None: - ... - - def get_minpos(self) -> float: - ... - - def get_data_interval(self) -> tuple[float, float]: - ... - - def set_data_interval(self, vmin: float, vmax: float) -> None: - ... - - def get_tick_space(self) -> int: - ... - - - -class TickHelper: - axis: None | Axis | _DummyAxis | _AxisWrapper - def set_axis(self, axis: Axis | _DummyAxis | None) -> None: - ... - - def create_dummy_axis(self, **kwargs) -> None: - ... - - - -class Formatter(TickHelper): - locs: list[float] - def __call__(self, x: float, pos: int | None = ...) -> str: - ... - - def format_ticks(self, values: list[float]) -> list[str]: - ... - - def format_data(self, value: float) -> str: - ... - - def format_data_short(self, value: float) -> str: - ... - - def get_offset(self) -> str: - ... - - def set_locs(self, locs: list[float]) -> None: - ... - - @staticmethod - def fix_minus(s: str) -> str: - ... - - - -class NullFormatter(Formatter): - ... - - -class FixedFormatter(Formatter): - seq: Sequence[str] - offset_string: str - def __init__(self, seq: Sequence[str]) -> None: - ... - - def set_offset_string(self, ofs: str) -> None: - ... - - - -class FuncFormatter(Formatter): - func: Callable[[float, int | None], str] - offset_string: str - def __init__(self, func: Callable[..., str]) -> None: - ... - - def set_offset_string(self, ofs: str) -> None: - ... - - - -class FormatStrFormatter(Formatter): - fmt: str - def __init__(self, fmt: str) -> None: - ... - - - -class StrMethodFormatter(Formatter): - fmt: str - def __init__(self, fmt: str) -> None: - ... - - - -class ScalarFormatter(Formatter): - orderOfMagnitude: int - format: str - def __init__(self, useOffset: bool | float | None = ..., useMathText: bool | None = ..., useLocale: bool | None = ...) -> None: - ... - - offset: float - def get_useOffset(self) -> bool: - ... - - def set_useOffset(self, val: bool | float) -> None: - ... - - @property - def useOffset(self) -> bool: - ... - - @useOffset.setter - def useOffset(self, val: bool | float) -> None: - ... - - def get_useLocale(self) -> bool: - ... - - def set_useLocale(self, val: bool | None) -> None: - ... - - @property - def useLocale(self) -> bool: - ... - - @useLocale.setter - def useLocale(self, val: bool | None) -> None: - ... - - def get_useMathText(self) -> bool: - ... - - def set_useMathText(self, val: bool | None) -> None: - ... - - @property - def useMathText(self) -> bool: - ... - - @useMathText.setter - def useMathText(self, val: bool | None) -> None: - ... - - def set_scientific(self, b: bool) -> None: - ... - - def set_powerlimits(self, lims: tuple[int, int]) -> None: - ... - - def format_data_short(self, value: float | np.ma.MaskedArray) -> str: - ... - - def format_data(self, value: float) -> str: - ... - - - -class LogFormatter(Formatter): - minor_thresholds: tuple[float, float] - def __init__(self, base: float = ..., labelOnlyBase: bool = ..., minor_thresholds: tuple[float, float] | None = ..., linthresh: float | None = ...) -> None: - ... - - def set_base(self, base: float) -> None: - ... - - labelOnlyBase: bool - def set_label_minor(self, labelOnlyBase: bool) -> None: - ... - - def set_locs(self, locs: Any | None = ...) -> None: - ... - - def format_data(self, value: float) -> str: - ... - - def format_data_short(self, value: float) -> str: - ... - - - -class LogFormatterExponent(LogFormatter): - ... - - -class LogFormatterMathtext(LogFormatter): - ... - - -class LogFormatterSciNotation(LogFormatterMathtext): - ... - - -class LogitFormatter(Formatter): - def __init__(self, *, use_overline: bool = ..., one_half: str = ..., minor: bool = ..., minor_threshold: int = ..., minor_number: int = ...) -> None: - ... - - def use_overline(self, use_overline: bool) -> None: - ... - - def set_one_half(self, one_half: str) -> None: - ... - - def set_minor_threshold(self, minor_threshold: int) -> None: - ... - - def set_minor_number(self, minor_number: int) -> None: - ... - - def format_data_short(self, value: float) -> str: - ... - - - -class EngFormatter(Formatter): - ENG_PREFIXES: dict[int, str] - unit: str - places: int | None - sep: str - def __init__(self, unit: str = ..., places: int | None = ..., sep: str = ..., *, usetex: bool | None = ..., useMathText: bool | None = ...) -> None: - ... - - def get_usetex(self) -> bool: - ... - - def set_usetex(self, val: bool | None) -> None: - ... - - @property - def usetex(self) -> bool: - ... - - @usetex.setter - def usetex(self, val: bool | None) -> None: - ... - - def get_useMathText(self) -> bool: - ... - - def set_useMathText(self, val: bool | None) -> None: - ... - - @property - def useMathText(self) -> bool: - ... - - @useMathText.setter - def useMathText(self, val: bool | None) -> None: - ... - - def format_eng(self, num: float) -> str: - ... - - - -class PercentFormatter(Formatter): - xmax: float - decimals: int | None - def __init__(self, xmax: float = ..., decimals: int | None = ..., symbol: str | None = ..., is_latex: bool = ...) -> None: - ... - - def format_pct(self, x: float, display_range: float) -> str: - ... - - def convert_to_pct(self, x: float) -> float: - ... - - @property - def symbol(self) -> str: - ... - - @symbol.setter - def symbol(self, symbol: str) -> None: - ... - - - -class Locator(TickHelper): - MAXTICKS: int - def tick_values(self, vmin: float, vmax: float) -> Sequence[float]: - ... - - def set_params(self) -> None: - ... - - def __call__(self) -> Sequence[float]: - ... - - def raise_if_exceeds(self, locs: Sequence[float]) -> Sequence[float]: - ... - - def nonsingular(self, v0: float, v1: float) -> tuple[float, float]: - ... - - def view_limits(self, vmin: float, vmax: float) -> tuple[float, float]: - ... - - - -class IndexLocator(Locator): - offset: float - def __init__(self, base: float, offset: float) -> None: - ... - - def set_params(self, base: float | None = ..., offset: float | None = ...) -> None: - ... - - - -class FixedLocator(Locator): - nbins: int | None - def __init__(self, locs: Sequence[float], nbins: int | None = ...) -> None: - ... - - def set_params(self, nbins: int | None = ...) -> None: - ... - - - -class NullLocator(Locator): - ... - - -class LinearLocator(Locator): - presets: dict[tuple[float, float], Sequence[float]] - def __init__(self, numticks: int | None = ..., presets: dict[tuple[float, float], Sequence[float]] | None = ...) -> None: - ... - - @property - def numticks(self) -> int: - ... - - @numticks.setter - def numticks(self, numticks: int | None) -> None: - ... - - def set_params(self, numticks: int | None = ..., presets: dict[tuple[float, float], Sequence[float]] | None = ...) -> None: - ... - - - -class MultipleLocator(Locator): - def __init__(self, base: float = ..., offset: float = ...) -> None: - ... - - def set_params(self, base: float | None = ..., offset: float | None = ...) -> None: - ... - - def view_limits(self, dmin: float, dmax: float) -> tuple[float, float]: - ... - - - -class _Edge_integer: - step: float - def __init__(self, step: float, offset: float) -> None: - ... - - def closeto(self, ms: float, edge: float) -> bool: - ... - - def le(self, x: float) -> float: - ... - - def ge(self, x: float) -> float: - ... - - - -class MaxNLocator(Locator): - default_params: dict[str, Any] - def __init__(self, nbins: int | Literal["auto"] | None = ..., **kwargs) -> None: - ... - - def set_params(self, **kwargs) -> None: - ... - - def view_limits(self, dmin: float, dmax: float) -> tuple[float, float]: - ... - - - -class LogLocator(Locator): - numdecs: float - numticks: int | None - def __init__(self, base: float = ..., subs: None | Literal["auto", "all"] | Sequence[float] = ..., numdecs: float = ..., numticks: int | None = ...) -> None: - ... - - def set_params(self, base: float | None = ..., subs: Literal["auto", "all"] | Sequence[float] | None = ..., numdecs: float | None = ..., numticks: int | None = ...) -> None: - ... - - - -class SymmetricalLogLocator(Locator): - numticks: int - def __init__(self, transform: Transform | None = ..., subs: Sequence[float] | None = ..., linthresh: float | None = ..., base: float | None = ...) -> None: - ... - - def set_params(self, subs: Sequence[float] | None = ..., numticks: int | None = ...) -> None: - ... - - - -class AsinhLocator(Locator): - linear_width: float - numticks: int - symthresh: float - base: int - subs: Sequence[float] | None - def __init__(self, linear_width: float, numticks: int = ..., symthresh: float = ..., base: int = ..., subs: Sequence[float] | None = ...) -> None: - ... - - def set_params(self, numticks: int | None = ..., symthresh: float | None = ..., base: int | None = ..., subs: Sequence[float] | None = ...) -> None: - ... - - - -class LogitLocator(MaxNLocator): - def __init__(self, minor: bool = ..., *, nbins: Literal["auto"] | int = ...) -> None: - ... - - def set_params(self, minor: bool | None = ..., **kwargs) -> None: - ... - - @property - def minor(self) -> bool: - ... - - @minor.setter - def minor(self, value: bool) -> None: - ... - - - -class AutoLocator(MaxNLocator): - def __init__(self) -> None: - ... - - - -class AutoMinorLocator(Locator): - ndivs: int - def __init__(self, n: int | None = ...) -> None: - ... - - - diff --git a/typings/matplotlib/transforms.pyi b/typings/matplotlib/transforms.pyi deleted file mode 100644 index 8e84502..0000000 --- a/typings/matplotlib/transforms.pyi +++ /dev/null @@ -1,604 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from .path import Path -from .patches import Patch -from .figure import Figure -from numpy.typing import ArrayLike -from collections.abc import Iterable, Sequence -from typing import Literal - -DEBUG: bool -class TransformNode: - INVALID_NON_AFFINE: int - INVALID_AFFINE: int - INVALID: int - is_bbox: bool - @property - def is_affine(self) -> bool: - ... - - pass_through: bool - def __init__(self, shorthand_name: str | None = ...) -> None: - ... - - def __copy__(self) -> TransformNode: - ... - - def invalidate(self) -> None: - ... - - def set_children(self, *children: TransformNode) -> None: - ... - - def frozen(self) -> TransformNode: - ... - - - -class BboxBase(TransformNode): - is_bbox: bool - is_affine: bool - def frozen(self) -> Bbox: - ... - - def __array__(self, *args, **kwargs): - ... - - @property - def x0(self) -> float: - ... - - @property - def y0(self) -> float: - ... - - @property - def x1(self) -> float: - ... - - @property - def y1(self) -> float: - ... - - @property - def p0(self) -> tuple[float, float]: - ... - - @property - def p1(self) -> tuple[float, float]: - ... - - @property - def xmin(self) -> float: - ... - - @property - def ymin(self) -> float: - ... - - @property - def xmax(self) -> float: - ... - - @property - def ymax(self) -> float: - ... - - @property - def min(self) -> tuple[float, float]: - ... - - @property - def max(self) -> tuple[float, float]: - ... - - @property - def intervalx(self) -> tuple[float, float]: - ... - - @property - def intervaly(self) -> tuple[float, float]: - ... - - @property - def width(self) -> float: - ... - - @property - def height(self) -> float: - ... - - @property - def size(self) -> tuple[float, float]: - ... - - @property - def bounds(self) -> tuple[float, float, float, float]: - ... - - @property - def extents(self) -> tuple[float, float, float, float]: - ... - - def get_points(self) -> np.ndarray: - ... - - def containsx(self, x: float) -> bool: - ... - - def containsy(self, y: float) -> bool: - ... - - def contains(self, x: float, y: float) -> bool: - ... - - def overlaps(self, other: BboxBase) -> bool: - ... - - def fully_containsx(self, x: float) -> bool: - ... - - def fully_containsy(self, y: float) -> bool: - ... - - def fully_contains(self, x: float, y: float) -> bool: - ... - - def fully_overlaps(self, other: BboxBase) -> bool: - ... - - def transformed(self, transform: Transform) -> Bbox: - ... - - coefs: dict[str, tuple[float, float]] - def anchored(self, c: tuple[float, float] | str, container: BboxBase | None = ...) -> Bbox: - ... - - def shrunk(self, mx: float, my: float) -> Bbox: - ... - - def shrunk_to_aspect(self, box_aspect: float, container: BboxBase | None = ..., fig_aspect: float = ...) -> Bbox: - ... - - def splitx(self, *args: float) -> list[Bbox]: - ... - - def splity(self, *args: float) -> list[Bbox]: - ... - - def count_contains(self, vertices: ArrayLike) -> int: - ... - - def count_overlaps(self, bboxes: Iterable[BboxBase]) -> int: - ... - - def expanded(self, sw: float, sh: float) -> Bbox: - ... - - def padded(self, w_pad: float, h_pad: float | None = ...) -> Bbox: - ... - - def translated(self, tx: float, ty: float) -> Bbox: - ... - - def corners(self) -> np.ndarray: - ... - - def rotated(self, radians: float) -> Bbox: - ... - - @staticmethod - def union(bboxes: Sequence[BboxBase]) -> Bbox: - ... - - @staticmethod - def intersection(bbox1: BboxBase, bbox2: BboxBase) -> Bbox | None: - ... - - - -class Bbox(BboxBase): - def __init__(self, points: ArrayLike, **kwargs) -> None: - ... - - @staticmethod - def unit() -> Bbox: - ... - - @staticmethod - def null() -> Bbox: - ... - - @staticmethod - def from_bounds(x0: float, y0: float, width: float, height: float) -> Bbox: - ... - - @staticmethod - def from_extents(*args: float, minpos: float | None = ...) -> Bbox: - ... - - def __format__(self, fmt: str) -> str: - ... - - def ignore(self, value: bool) -> None: - ... - - def update_from_path(self, path: Path, ignore: bool | None = ..., updatex: bool = ..., updatey: bool = ...) -> None: - ... - - def update_from_data_x(self, x: ArrayLike, ignore: bool | None = ...) -> None: - ... - - def update_from_data_y(self, y: ArrayLike, ignore: bool | None = ...) -> None: - ... - - def update_from_data_xy(self, xy: ArrayLike, ignore: bool | None = ..., updatex: bool = ..., updatey: bool = ...) -> None: - ... - - @property - def minpos(self) -> float: - ... - - @property - def minposx(self) -> float: - ... - - @property - def minposy(self) -> float: - ... - - def get_points(self) -> np.ndarray: - ... - - def set_points(self, points: ArrayLike) -> None: - ... - - def set(self, other: Bbox) -> None: - ... - - def mutated(self) -> bool: - ... - - def mutatedx(self) -> bool: - ... - - def mutatedy(self) -> bool: - ... - - - -class TransformedBbox(BboxBase): - def __init__(self, bbox: Bbox, transform: Transform, **kwargs) -> None: - ... - - def get_points(self) -> np.ndarray: - ... - - - -class LockableBbox(BboxBase): - def __init__(self, bbox: BboxBase, x0: float | None = ..., y0: float | None = ..., x1: float | None = ..., y1: float | None = ..., **kwargs) -> None: - ... - - @property - def locked_x0(self) -> float | None: - ... - - @locked_x0.setter - def locked_x0(self, x0: float | None) -> None: - ... - - @property - def locked_y0(self) -> float | None: - ... - - @locked_y0.setter - def locked_y0(self, y0: float | None) -> None: - ... - - @property - def locked_x1(self) -> float | None: - ... - - @locked_x1.setter - def locked_x1(self, x1: float | None) -> None: - ... - - @property - def locked_y1(self) -> float | None: - ... - - @locked_y1.setter - def locked_y1(self, y1: float | None) -> None: - ... - - - -class Transform(TransformNode): - input_dims: int | None - output_dims: int | None - is_separable: bool - @property - def has_inverse(self) -> bool: - ... - - def __add__(self, other: Transform) -> Transform: - ... - - @property - def depth(self) -> int: - ... - - def contains_branch(self, other: Transform) -> bool: - ... - - def contains_branch_seperately(self, other_transform: Transform) -> Sequence[bool]: - ... - - def __sub__(self, other: Transform) -> Transform: - ... - - def __array__(self, *args, **kwargs) -> np.ndarray: - ... - - def transform(self, values: ArrayLike) -> np.ndarray: - ... - - def transform_affine(self, values: ArrayLike) -> np.ndarray: - ... - - def transform_non_affine(self, values: ArrayLike) -> ArrayLike: - ... - - def transform_bbox(self, bbox: BboxBase) -> Bbox: - ... - - def get_affine(self) -> Transform: - ... - - def get_matrix(self) -> np.ndarray: - ... - - def transform_point(self, point: ArrayLike) -> np.ndarray: - ... - - def transform_path(self, path: Path) -> Path: - ... - - def transform_path_affine(self, path: Path) -> Path: - ... - - def transform_path_non_affine(self, path: Path) -> Path: - ... - - def transform_angles(self, angles: ArrayLike, pts: ArrayLike, radians: bool = ..., pushoff: float = ...) -> np.ndarray: - ... - - def inverted(self) -> Transform: - ... - - - -class TransformWrapper(Transform): - pass_through: bool - def __init__(self, child: Transform) -> None: - ... - - def __eq__(self, other: object) -> bool: - ... - - def frozen(self) -> Transform: - ... - - def set(self, child: Transform) -> None: - ... - - - -class AffineBase(Transform): - is_affine: Literal[True] - def __init__(self, *args, **kwargs) -> None: - ... - - def __eq__(self, other: object) -> bool: - ... - - - -class Affine2DBase(AffineBase): - input_dims: Literal[2] - output_dims: Literal[2] - def frozen(self) -> Affine2D: - ... - - @property - def is_separable(self): - ... - - def to_values(self) -> tuple[float, float, float, float, float, float]: - ... - - - -class Affine2D(Affine2DBase): - def __init__(self, matrix: ArrayLike | None = ..., **kwargs) -> None: - ... - - @staticmethod - def from_values(a: float, b: float, c: float, d: float, e: float, f: float) -> Affine2D: - ... - - def set_matrix(self, mtx: ArrayLike) -> None: - ... - - def clear(self) -> Affine2D: - ... - - def rotate(self, theta: float) -> Affine2D: - ... - - def rotate_deg(self, degrees: float) -> Affine2D: - ... - - def rotate_around(self, x: float, y: float, theta: float) -> Affine2D: - ... - - def rotate_deg_around(self, x: float, y: float, degrees: float) -> Affine2D: - ... - - def translate(self, tx: float, ty: float) -> Affine2D: - ... - - def scale(self, sx: float, sy: float | None = ...) -> Affine2D: - ... - - def skew(self, xShear: float, yShear: float) -> Affine2D: - ... - - def skew_deg(self, xShear: float, yShear: float) -> Affine2D: - ... - - - -class IdentityTransform(Affine2DBase): - ... - - -class _BlendedMixin: - def __eq__(self, other: object) -> bool: - ... - - def contains_branch_seperately(self, transform: Transform) -> Sequence[bool]: - ... - - - -class BlendedGenericTransform(_BlendedMixin, Transform): - input_dims: Literal[2] - output_dims: Literal[2] - is_separable: bool - pass_through: bool - def __init__(self, x_transform: Transform, y_transform: Transform, **kwargs) -> None: - ... - - @property - def depth(self) -> int: - ... - - def contains_branch(self, other: Transform) -> Literal[False]: - ... - - @property - def is_affine(self) -> bool: - ... - - @property - def has_inverse(self) -> bool: - ... - - - -class BlendedAffine2D(_BlendedMixin, Affine2DBase): - def __init__(self, x_transform: Transform, y_transform: Transform, **kwargs) -> None: - ... - - - -def blended_transform_factory(x_transform: Transform, y_transform: Transform) -> BlendedGenericTransform | BlendedAffine2D: - ... - -class CompositeGenericTransform(Transform): - pass_through: bool - input_dims: int | None - output_dims: int | None - def __init__(self, a: Transform, b: Transform, **kwargs) -> None: - ... - - - -class CompositeAffine2D(Affine2DBase): - def __init__(self, a: Affine2DBase, b: Affine2DBase, **kwargs) -> None: - ... - - @property - def depth(self) -> int: - ... - - - -def composite_transform_factory(a: Transform, b: Transform) -> Transform: - ... - -class BboxTransform(Affine2DBase): - def __init__(self, boxin: BboxBase, boxout: BboxBase, **kwargs) -> None: - ... - - - -class BboxTransformTo(Affine2DBase): - def __init__(self, boxout: BboxBase, **kwargs) -> None: - ... - - - -class BboxTransformToMaxOnly(BboxTransformTo): - ... - - -class BboxTransformFrom(Affine2DBase): - def __init__(self, boxin: BboxBase, **kwargs) -> None: - ... - - - -class ScaledTranslation(Affine2DBase): - def __init__(self, xt: float, yt: float, scale_trans: Affine2DBase, **kwargs) -> None: - ... - - - -class AffineDeltaTransform(Affine2DBase): - def __init__(self, transform: Affine2DBase, **kwargs) -> None: - ... - - - -class TransformedPath(TransformNode): - def __init__(self, path: Path, transform: Transform) -> None: - ... - - def get_transformed_points_and_affine(self) -> tuple[Path, Transform]: - ... - - def get_transformed_path_and_affine(self) -> tuple[Path, Transform]: - ... - - def get_fully_transformed_path(self) -> Path: - ... - - def get_affine(self) -> Transform: - ... - - - -class TransformedPatchPath(TransformedPath): - def __init__(self, patch: Patch) -> None: - ... - - - -def nonsingular(vmin: float, vmax: float, expander: float = ..., tiny: float = ..., increasing: bool = ...) -> tuple[float, float]: - ... - -def interval_contains(interval: tuple[float, float], val: float) -> bool: - ... - -def interval_contains_open(interval: tuple[float, float], val: float) -> bool: - ... - -def offset_copy(trans: Transform, fig: Figure | None = ..., x: float = ..., y: float = ..., units: Literal["inches", "points", "dots"] = ...) -> Transform: - ... - diff --git a/typings/matplotlib/tri/__init__.pyi b/typings/matplotlib/tri/__init__.pyi deleted file mode 100644 index 9d0ba86..0000000 --- a/typings/matplotlib/tri/__init__.pyi +++ /dev/null @@ -1,17 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._triangulation import Triangulation -from ._tricontour import TriContourSet, tricontour, tricontourf -from ._trifinder import TrapezoidMapTriFinder, TriFinder -from ._triinterpolate import CubicTriInterpolator, LinearTriInterpolator, TriInterpolator -from ._tripcolor import tripcolor -from ._triplot import triplot -from ._trirefine import TriRefiner, UniformTriRefiner -from ._tritools import TriAnalyzer - -""" -Unstructured triangular grid functions. -""" -__all__ = ["Triangulation", "TriContourSet", "tricontour", "tricontourf", "TriFinder", "TrapezoidMapTriFinder", "TriInterpolator", "LinearTriInterpolator", "CubicTriInterpolator", "tripcolor", "triplot", "TriRefiner", "UniformTriRefiner", "TriAnalyzer"] diff --git a/typings/matplotlib/tri/_triangulation.pyi b/typings/matplotlib/tri/_triangulation.pyi deleted file mode 100644 index ce1ff6f..0000000 --- a/typings/matplotlib/tri/_triangulation.pyi +++ /dev/null @@ -1,48 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from matplotlib import _tri -from matplotlib.tri._trifinder import TriFinder -from numpy.typing import ArrayLike -from typing import Any - -class Triangulation: - x: np.ndarray - y: np.ndarray - mask: np.ndarray | None - is_delaunay: bool - triangles: np.ndarray - def __init__(self, x: ArrayLike, y: ArrayLike, triangles: ArrayLike | None = ..., mask: ArrayLike | None = ...) -> None: - ... - - def calculate_plane_coefficients(self, z: ArrayLike) -> np.ndarray: - ... - - @property - def edges(self) -> np.ndarray: - ... - - def get_cpp_triangulation(self) -> _tri.Triangulation: - ... - - def get_masked_triangles(self) -> np.ndarray: - ... - - @staticmethod - def get_from_args_and_kwargs(*args, **kwargs) -> tuple[Triangulation, tuple[Any, ...], dict[str, Any]]: - ... - - def get_trifinder(self) -> TriFinder: - ... - - @property - def neighbors(self) -> np.ndarray: - ... - - def set_mask(self, mask: None | ArrayLike) -> None: - ... - - - diff --git a/typings/matplotlib/tri/_tricontour.pyi b/typings/matplotlib/tri/_tricontour.pyi deleted file mode 100644 index f12f6fa..0000000 --- a/typings/matplotlib/tri/_tricontour.pyi +++ /dev/null @@ -1,32 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.axes import Axes -from matplotlib.contour import ContourSet -from matplotlib.tri._triangulation import Triangulation -from numpy.typing import ArrayLike -from typing import overload - -class TriContourSet(ContourSet): - def __init__(self, ax: Axes, *args, **kwargs) -> None: - ... - - - -@overload -def tricontour(ax: Axes, triangulation: Triangulation, z: ArrayLike, levels: int | ArrayLike = ..., **kwargs) -> TriContourSet: - ... - -@overload -def tricontour(ax: Axes, x: ArrayLike, y: ArrayLike, z: ArrayLike, levels: int | ArrayLike = ..., *, triangles: ArrayLike = ..., mask: ArrayLike = ..., **kwargs) -> TriContourSet: - ... - -@overload -def tricontourf(ax: Axes, triangulation: Triangulation, z: ArrayLike, levels: int | ArrayLike = ..., **kwargs) -> TriContourSet: - ... - -@overload -def tricontourf(ax: Axes, x: ArrayLike, y: ArrayLike, z: ArrayLike, levels: int | ArrayLike = ..., *, triangles: ArrayLike = ..., mask: ArrayLike = ..., **kwargs) -> TriContourSet: - ... - diff --git a/typings/matplotlib/tri/_trifinder.pyi b/typings/matplotlib/tri/_trifinder.pyi deleted file mode 100644 index 1731da7..0000000 --- a/typings/matplotlib/tri/_trifinder.pyi +++ /dev/null @@ -1,25 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.tri import Triangulation -from numpy.typing import ArrayLike - -class TriFinder: - def __init__(self, triangulation: Triangulation) -> None: - ... - - def __call__(self, x: ArrayLike, y: ArrayLike) -> ArrayLike: - ... - - - -class TrapezoidMapTriFinder(TriFinder): - def __init__(self, triangulation: Triangulation) -> None: - ... - - def __call__(self, x: ArrayLike, y: ArrayLike) -> ArrayLike: - ... - - - diff --git a/typings/matplotlib/tri/_triinterpolate.pyi b/typings/matplotlib/tri/_triinterpolate.pyi deleted file mode 100644 index 7a356d4..0000000 --- a/typings/matplotlib/tri/_triinterpolate.pyi +++ /dev/null @@ -1,31 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from matplotlib.tri import TriFinder, Triangulation -from typing import Literal -from numpy.typing import ArrayLike - -class TriInterpolator: - def __init__(self, triangulation: Triangulation, z: ArrayLike, trifinder: TriFinder | None = ...) -> None: - ... - - def __call__(self, x: ArrayLike, y: ArrayLike) -> np.ma.MaskedArray: - ... - - def gradient(self, x: ArrayLike, y: ArrayLike) -> tuple[np.ma.MaskedArray, np.ma.MaskedArray]: - ... - - - -class LinearTriInterpolator(TriInterpolator): - ... - - -class CubicTriInterpolator(TriInterpolator): - def __init__(self, triangulation: Triangulation, z: ArrayLike, kind: Literal["min_E", "geom", "user"] = ..., trifinder: TriFinder | None = ..., dz: tuple[ArrayLike, ArrayLike] | None = ...) -> None: - ... - - - diff --git a/typings/matplotlib/tri/_tripcolor.pyi b/typings/matplotlib/tri/_tripcolor.pyi deleted file mode 100644 index 40a9c01..0000000 --- a/typings/matplotlib/tri/_tripcolor.pyi +++ /dev/null @@ -1,27 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.axes import Axes -from matplotlib.collections import PolyCollection, TriMesh -from matplotlib.colors import Colormap, Normalize -from matplotlib.tri._triangulation import Triangulation -from numpy.typing import ArrayLike -from typing import Literal, overload - -@overload -def tripcolor(ax: Axes, triangulation: Triangulation, c: ArrayLike = ..., *, alpha: float = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., shading: Literal["flat"] = ..., facecolors: ArrayLike | None = ..., **kwargs) -> PolyCollection: - ... - -@overload -def tripcolor(ax: Axes, x: ArrayLike, y: ArrayLike, c: ArrayLike = ..., *, alpha: float = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., shading: Literal["flat"] = ..., facecolors: ArrayLike | None = ..., **kwargs) -> PolyCollection: - ... - -@overload -def tripcolor(ax: Axes, triangulation: Triangulation, c: ArrayLike = ..., *, alpha: float = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., shading: Literal["gouraud"], facecolors: ArrayLike | None = ..., **kwargs) -> TriMesh: - ... - -@overload -def tripcolor(ax: Axes, x: ArrayLike, y: ArrayLike, c: ArrayLike = ..., *, alpha: float = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., shading: Literal["gouraud"], facecolors: ArrayLike | None = ..., **kwargs) -> TriMesh: - ... - diff --git a/typings/matplotlib/tri/_triplot.pyi b/typings/matplotlib/tri/_triplot.pyi deleted file mode 100644 index 3fee47f..0000000 --- a/typings/matplotlib/tri/_triplot.pyi +++ /dev/null @@ -1,18 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from matplotlib.tri._triangulation import Triangulation -from matplotlib.axes import Axes -from matplotlib.lines import Line2D -from typing import overload -from numpy.typing import ArrayLike - -@overload -def triplot(ax: Axes, triangulation: Triangulation, *args, **kwargs) -> tuple[Line2D, Line2D]: - ... - -@overload -def triplot(ax: Axes, x: ArrayLike, y: ArrayLike, triangles: ArrayLike = ..., *args, **kwargs) -> tuple[Line2D, Line2D]: - ... - diff --git a/typings/matplotlib/tri/_trirefine.pyi b/typings/matplotlib/tri/_trirefine.pyi deleted file mode 100644 index 5109e85..0000000 --- a/typings/matplotlib/tri/_trirefine.pyi +++ /dev/null @@ -1,37 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from typing import Literal, overload -from numpy.typing import ArrayLike -from matplotlib.tri._triangulation import Triangulation -from matplotlib.tri._triinterpolate import TriInterpolator - -class TriRefiner: - def __init__(self, triangulation: Triangulation) -> None: - ... - - - -class UniformTriRefiner(TriRefiner): - def __init__(self, triangulation: Triangulation) -> None: - ... - - @overload - def refine_triangulation(self, *, return_tri_index: Literal[True], subdiv: int = ...) -> tuple[Triangulation, np.ndarray]: - ... - - @overload - def refine_triangulation(self, return_tri_index: Literal[False] = ..., subdiv: int = ...) -> Triangulation: - ... - - @overload - def refine_triangulation(self, return_tri_index: bool = ..., subdiv: int = ...) -> tuple[Triangulation, np.ndarray] | Triangulation: - ... - - def refine_field(self, z: ArrayLike, triinterpolator: TriInterpolator | None = ..., subdiv: int = ...) -> tuple[Triangulation, np.ndarray]: - ... - - - diff --git a/typings/matplotlib/tri/_tritools.pyi b/typings/matplotlib/tri/_tritools.pyi deleted file mode 100644 index ee0c8b5..0000000 --- a/typings/matplotlib/tri/_tritools.pyi +++ /dev/null @@ -1,23 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from matplotlib.tri import Triangulation - -class TriAnalyzer: - def __init__(self, triangulation: Triangulation) -> None: - ... - - @property - def scale_factors(self) -> tuple[float, float]: - ... - - def circle_ratios(self, rescale: bool = ...) -> np.ndarray: - ... - - def get_flat_tri_mask(self, min_circle_ratio: float = ..., rescale: bool = ...) -> np.ndarray: - ... - - - diff --git a/typings/matplotlib/typing.pyi b/typings/matplotlib/typing.pyi deleted file mode 100644 index e6bf4c7..0000000 --- a/typings/matplotlib/typing.pyi +++ /dev/null @@ -1,38 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import pathlib -from collections.abc import Hashable, Sequence -from typing import Any, Literal, TypeVar, Union -from . import path -from ._enums import CapStyle, JoinStyle -from .markers import MarkerStyle - -""" -Typing support for Matplotlib - -This module contains Type aliases which are useful for Matplotlib and potentially -downstream libraries. - -.. admonition:: Provisional status of typing - - The ``typing`` module and type stub files are considered provisional and may change - at any time without a deprecation period. -""" -RGBColorType = Union[tuple[float, float, float], str] -RGBAColorType = Union[str, tuple[float, float, float, float], tuple[RGBColorType, float], tuple[tuple[float, float, float, float], float],] -ColorType = Union[RGBColorType, RGBAColorType] -RGBColourType = RGBColorType -RGBAColourType = RGBAColorType -ColourType = ColorType -LineStyleType = Union[str, tuple[float, Sequence[float]]] -DrawStyleType = Literal["default", "steps", "steps-pre", "steps-mid", "steps-post"] -MarkEveryType = Union[None, int, tuple[int, int], slice, list[int], float, tuple[float, float], list[bool]] -MarkerType = Union[str, path.Path, MarkerStyle] -FillStyleType = Literal["full", "left", "right", "bottom", "top", "none"] -JoinStyleType = Union[JoinStyle, Literal["miter", "round", "bevel"]] -CapStyleType = Union[CapStyle, Literal["butt", "projecting", "round"]] -RcStyleType = Union[str, dict[str, Any], pathlib.Path, Sequence[Union[str, pathlib.Path, dict[str, Any]]],] -_HT = TypeVar("_HT", bound=Hashable) -HashableList = list[Union[_HT, "HashableList[_HT]"]] diff --git a/typings/matplotlib/units.pyi b/typings/matplotlib/units.pyi deleted file mode 100644 index 6d5558d..0000000 --- a/typings/matplotlib/units.pyi +++ /dev/null @@ -1,133 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -The classes here provide support for using custom classes with -Matplotlib, e.g., those that do not expose the array interface but know -how to convert themselves to arrays. It also supports classes with -units and units conversion. Use cases include converters for custom -objects, e.g., a list of datetime objects, as well as for objects that -are unit aware. We don't assume any particular units implementation; -rather a units implementation must register with the Registry converter -dictionary and provide a `ConversionInterface`. For example, -here is a complete implementation which supports plotting with native -datetime objects:: - - import matplotlib.units as units - import matplotlib.dates as dates - import matplotlib.ticker as ticker - import datetime - - class DateConverter(units.ConversionInterface): - - @staticmethod - def convert(value, unit, axis): - "Convert a datetime value to a scalar or array." - return dates.date2num(value) - - @staticmethod - def axisinfo(unit, axis): - "Return major and minor tick locators and formatters." - if unit != 'date': - return None - majloc = dates.AutoDateLocator() - majfmt = dates.AutoDateFormatter(majloc) - return units.AxisInfo(majloc=majloc, majfmt=majfmt, label='date') - - @staticmethod - def default_units(x, axis): - "Return the default unit for x or None." - return 'date' - - # Finally we register our object type with the Matplotlib units registry. - units.registry[datetime.date] = DateConverter() -""" -class ConversionError(TypeError): - ... - - -class AxisInfo: - """ - Information to support default axis labeling, tick labeling, and limits. - - An instance of this class must be returned by - `ConversionInterface.axisinfo`. - """ - def __init__(self, majloc=..., minloc=..., majfmt=..., minfmt=..., label=..., default_limits=...) -> None: - """ - Parameters - ---------- - majloc, minloc : Locator, optional - Tick locators for the major and minor ticks. - majfmt, minfmt : Formatter, optional - Tick formatters for the major and minor ticks. - label : str, optional - The default axis label. - default_limits : optional - The default min and max limits of the axis if no data has - been plotted. - - Notes - ----- - If any of the above are ``None``, the axis will simply use the - default value. - """ - ... - - - -class ConversionInterface: - """ - The minimal interface for a converter to take custom data types (or - sequences) and convert them to values Matplotlib can use. - """ - @staticmethod - def axisinfo(unit, axis): # -> None: - """Return an `.AxisInfo` for the axis with the specified units.""" - ... - - @staticmethod - def default_units(x, axis): # -> None: - """Return the default unit for *x* or ``None`` for the given axis.""" - ... - - @staticmethod - def convert(obj, unit, axis): - """ - Convert *obj* using *unit* for the specified *axis*. - - If *obj* is a sequence, return the converted sequence. The output must - be a sequence of scalars that can be used by the numpy array layer. - """ - ... - - - -class DecimalConverter(ConversionInterface): - """Converter for decimal.Decimal data to float.""" - @staticmethod - def convert(value, unit, axis): # -> float | NDArray[Any]: - """ - Convert Decimals to floats. - - The *unit* and *axis* arguments are not used. - - Parameters - ---------- - value : decimal.Decimal or iterable - Decimal or list of Decimal need to be converted - """ - ... - - - -class Registry(dict): - """Register types with conversion interface.""" - def get_converter(self, x): # -> None: - """Get the converter interface instance for *x*, or None.""" - ... - - - -registry = ... diff --git a/typings/matplotlib/widgets.pyi b/typings/matplotlib/widgets.pyi deleted file mode 100644 index 91dd779..0000000 --- a/typings/matplotlib/widgets.pyi +++ /dev/null @@ -1,563 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import PIL.Image -import numpy as np -from .artist import Artist -from .axes import Axes -from .backend_bases import Event, FigureCanvasBase, MouseButton, MouseEvent -from .collections import LineCollection -from .figure import Figure -from .lines import Line2D -from .patches import Circle, Polygon, Rectangle -from .text import Text -from collections.abc import Callable, Collection, Iterable, Sequence -from typing import Any, Literal -from numpy.typing import ArrayLike -from .typing import ColorType - -class LockDraw: - def __init__(self) -> None: - ... - - def __call__(self, o: Any) -> None: - ... - - def release(self, o: Any) -> None: - ... - - def available(self, o: Any) -> bool: - ... - - def isowner(self, o: Any) -> bool: - ... - - def locked(self) -> bool: - ... - - - -class Widget: - drawon: bool - eventson: bool - active: bool - def set_active(self, active: bool) -> None: - ... - - def get_active(self) -> None: - ... - - def ignore(self, event) -> bool: - ... - - - -class AxesWidget(Widget): - ax: Axes - canvas: FigureCanvasBase | None - def __init__(self, ax: Axes) -> None: - ... - - def connect_event(self, event: Event, callback: Callable) -> None: - ... - - def disconnect_events(self) -> None: - ... - - - -class Button(AxesWidget): - label: Text - color: ColorType - hovercolor: ColorType - def __init__(self, ax: Axes, label: str, image: ArrayLike | PIL.Image.Image | None = ..., color: ColorType = ..., hovercolor: ColorType = ..., *, useblit: bool = ...) -> None: - ... - - def on_clicked(self, func: Callable[[Event], Any]) -> int: - ... - - def disconnect(self, cid: int) -> None: - ... - - - -class SliderBase(AxesWidget): - orientation: Literal["horizontal", "vertical"] - closedmin: bool - closedmax: bool - valmin: float - valmax: float - valstep: float | ArrayLike | None - drag_active: bool - valfmt: str - def __init__(self, ax: Axes, orientation: Literal["horizontal", "vertical"], closedmin: bool, closedmax: bool, valmin: float, valmax: float, valfmt: str, dragging: Slider | None, valstep: float | ArrayLike | None) -> None: - ... - - def disconnect(self, cid: int) -> None: - ... - - def reset(self) -> None: - ... - - - -class Slider(SliderBase): - slidermin: Slider | None - slidermax: Slider | None - val: float - valinit: float - track: Rectangle - poly: Polygon - hline: Line2D - vline: Line2D - label: Text - valtext: Text - def __init__(self, ax: Axes, label: str, valmin: float, valmax: float, *, valinit: float = ..., valfmt: str | None = ..., closedmin: bool = ..., closedmax: bool = ..., slidermin: Slider | None = ..., slidermax: Slider | None = ..., dragging: bool = ..., valstep: float | ArrayLike | None = ..., orientation: Literal["horizontal", "vertical"] = ..., initcolor: ColorType = ..., track_color: ColorType = ..., handle_style: dict[str, Any] | None = ..., **kwargs) -> None: - ... - - def set_val(self, val: float) -> None: - ... - - def on_changed(self, func: Callable[[float], Any]) -> int: - ... - - - -class RangeSlider(SliderBase): - val: tuple[float, float] - valinit: tuple[float, float] - track: Rectangle - poly: Polygon - label: Text - valtext: Text - def __init__(self, ax: Axes, label: str, valmin: float, valmax: float, *, valinit: tuple[float, float] | None = ..., valfmt: str | None = ..., closedmin: bool = ..., closedmax: bool = ..., dragging: bool = ..., valstep: float | ArrayLike | None = ..., orientation: Literal["horizontal", "vertical"] = ..., track_color: ColorType = ..., handle_style: dict[str, Any] | None = ..., **kwargs) -> None: - ... - - def set_min(self, min: float) -> None: - ... - - def set_max(self, max: float) -> None: - ... - - def set_val(self, val: ArrayLike) -> None: - ... - - def on_changed(self, func: Callable[[tuple[float, float]], Any]) -> int: - ... - - - -class CheckButtons(AxesWidget): - labels: list[Text] - def __init__(self, ax: Axes, labels: Sequence[str], actives: Iterable[bool] | None = ..., *, useblit: bool = ..., label_props: dict[str, Any] | None = ..., frame_props: dict[str, Any] | None = ..., check_props: dict[str, Any] | None = ...) -> None: - ... - - def set_label_props(self, props: dict[str, Any]) -> None: - ... - - def set_frame_props(self, props: dict[str, Any]) -> None: - ... - - def set_check_props(self, props: dict[str, Any]) -> None: - ... - - def set_active(self, index: int) -> None: - ... - - def get_status(self) -> list[bool]: - ... - - def on_clicked(self, func: Callable[[str], Any]) -> int: - ... - - def disconnect(self, cid: int) -> None: - ... - - @property - def lines(self) -> list[tuple[Line2D, Line2D]]: - ... - - @property - def rectangles(self) -> list[Rectangle]: - ... - - - -class TextBox(AxesWidget): - label: Text - text_disp: Text - cursor_index: int - cursor: LineCollection - color: ColorType - hovercolor: ColorType - capturekeystrokes: bool - def __init__(self, ax: Axes, label: str, initial: str = ..., *, color: ColorType = ..., hovercolor: ColorType = ..., label_pad: float = ..., textalignment: Literal["left", "center", "right"] = ...) -> None: - ... - - @property - def text(self) -> str: - ... - - def set_val(self, val: str) -> None: - ... - - def begin_typing(self, x=...) -> None: - ... - - def stop_typing(self) -> None: - ... - - def on_text_change(self, func: Callable[[str], Any]) -> int: - ... - - def on_submit(self, func: Callable[[str], Any]) -> int: - ... - - def disconnect(self, cid: int) -> None: - ... - - - -class RadioButtons(AxesWidget): - activecolor: ColorType - value_selected: str - labels: list[Text] - def __init__(self, ax: Axes, labels: Iterable[str], active: int = ..., activecolor: ColorType | None = ..., *, useblit: bool = ..., label_props: dict[str, Any] | Sequence[dict[str, Any]] | None = ..., radio_props: dict[str, Any] | None = ...) -> None: - ... - - def set_label_props(self, props: dict[str, Any]) -> None: - ... - - def set_radio_props(self, props: dict[str, Any]) -> None: - ... - - def set_active(self, index: int) -> None: - ... - - def on_clicked(self, func: Callable[[str], Any]) -> int: - ... - - def disconnect(self, cid: int) -> None: - ... - - @property - def circles(self) -> list[Circle]: - ... - - - -class SubplotTool(Widget): - figure: Figure - targetfig: Figure - buttonreset: Button - def __init__(self, targetfig: Figure, toolfig: Figure) -> None: - ... - - - -class Cursor(AxesWidget): - visible: bool - horizOn: bool - vertOn: bool - useblit: bool - lineh: Line2D - linev: Line2D - background: Any - needclear: bool - def __init__(self, ax: Axes, *, horizOn: bool = ..., vertOn: bool = ..., useblit: bool = ..., **lineprops) -> None: - ... - - def clear(self, event: Event) -> None: - ... - - def onmove(self, event: Event) -> None: - ... - - - -class MultiCursor(Widget): - axes: Sequence[Axes] - horizOn: bool - vertOn: bool - visible: bool - useblit: bool - needclear: bool - vlines: list[Line2D] - hlines: list[Line2D] - def __init__(self, canvas: Any, axes: Sequence[Axes], *, useblit: bool = ..., horizOn: bool = ..., vertOn: bool = ..., **lineprops) -> None: - ... - - def connect(self) -> None: - ... - - def disconnect(self) -> None: - ... - - def clear(self, event: Event) -> None: - ... - - def onmove(self, event: Event) -> None: - ... - - - -class _SelectorWidget(AxesWidget): - onselect: Callable[[float, float], Any] - useblit: bool - background: Any - validButtons: list[MouseButton] - def __init__(self, ax: Axes, onselect: Callable[[float, float], Any], useblit: bool = ..., button: MouseButton | Collection[MouseButton] | None = ..., state_modifier_keys: dict[str, str] | None = ..., use_data_coordinates: bool = ...) -> None: - ... - - def update_background(self, event: Event) -> None: - ... - - def connect_default_events(self) -> None: - ... - - def ignore(self, event: Event) -> bool: - ... - - def update(self) -> None: - ... - - def press(self, event: Event) -> bool: - ... - - def release(self, event: Event) -> bool: - ... - - def onmove(self, event: Event) -> bool: - ... - - def on_scroll(self, event: Event) -> None: - ... - - def on_key_press(self, event: Event) -> None: - ... - - def on_key_release(self, event: Event) -> None: - ... - - def set_visible(self, visible: bool) -> None: - ... - - def get_visible(self) -> bool: - ... - - @property - def visible(self) -> bool: - ... - - def clear(self) -> None: - ... - - @property - def artists(self) -> tuple[Artist]: - ... - - def set_props(self, **props) -> None: - ... - - def set_handle_props(self, **handle_props) -> None: - ... - - def add_state(self, state: str) -> None: - ... - - def remove_state(self, state: str) -> None: - ... - - - -class SpanSelector(_SelectorWidget): - snap_values: ArrayLike | None - onmove_callback: Callable[[float, float], Any] - minspan: float - grab_range: float - drag_from_anywhere: bool - ignore_event_outside: bool - canvas: FigureCanvasBase | None - def __init__(self, ax: Axes, onselect: Callable[[float, float], Any], direction: Literal["horizontal", "vertical"], *, minspan: float = ..., useblit: bool = ..., props: dict[str, Any] | None = ..., onmove_callback: Callable[[float, float], Any] | None = ..., interactive: bool = ..., button: MouseButton | Collection[MouseButton] | None = ..., handle_props: dict[str, Any] | None = ..., grab_range: float = ..., state_modifier_keys: dict[str, str] | None = ..., drag_from_anywhere: bool = ..., ignore_event_outside: bool = ..., snap_values: ArrayLike | None = ...) -> None: - ... - - def new_axes(self, ax: Axes, *, _props: dict[str, Any] | None = ...) -> None: - ... - - def connect_default_events(self) -> None: - ... - - @property - def direction(self) -> Literal["horizontal", "vertical"]: - ... - - @direction.setter - def direction(self, direction: Literal["horizontal", "vertical"]) -> None: - ... - - @property - def extents(self) -> tuple[float, float]: - ... - - @extents.setter - def extents(self, extents: tuple[float, float]) -> None: - ... - - - -class ToolLineHandles: - ax: Axes - def __init__(self, ax: Axes, positions: ArrayLike, direction: Literal["horizontal", "vertical"], *, line_props: dict[str, Any] | None = ..., useblit: bool = ...) -> None: - ... - - @property - def artists(self) -> tuple[Line2D]: - ... - - @property - def positions(self) -> list[float]: - ... - - @property - def direction(self) -> Literal["horizontal", "vertical"]: - ... - - def set_data(self, positions: ArrayLike) -> None: - ... - - def set_visible(self, value: bool) -> None: - ... - - def set_animated(self, value: bool) -> None: - ... - - def remove(self) -> None: - ... - - def closest(self, x: float, y: float) -> tuple[int, float]: - ... - - - -class ToolHandles: - ax: Axes - def __init__(self, ax: Axes, x: ArrayLike, y: ArrayLike, *, marker: str = ..., marker_props: dict[str, Any] | None = ..., useblit: bool = ...) -> None: - ... - - @property - def x(self) -> ArrayLike: - ... - - @property - def y(self) -> ArrayLike: - ... - - @property - def artists(self) -> tuple[Line2D]: - ... - - def set_data(self, pts: ArrayLike, y: ArrayLike | None = ...) -> None: - ... - - def set_visible(self, val: bool) -> None: - ... - - def set_animated(self, val: bool) -> None: - ... - - def closest(self, x: float, y: float) -> tuple[int, float]: - ... - - - -class RectangleSelector(_SelectorWidget): - drag_from_anywhere: bool - ignore_event_outside: bool - minspanx: float - minspany: float - spancoords: Literal["data", "pixels"] - grab_range: float - def __init__(self, ax: Axes, onselect: Callable[[MouseEvent, MouseEvent], Any], *, minspanx: float = ..., minspany: float = ..., useblit: bool = ..., props: dict[str, Any] | None = ..., spancoords: Literal["data", "pixels"] = ..., button: MouseButton | Collection[MouseButton] | None = ..., grab_range: float = ..., handle_props: dict[str, Any] | None = ..., interactive: bool = ..., state_modifier_keys: dict[str, str] | None = ..., drag_from_anywhere: bool = ..., ignore_event_outside: bool = ..., use_data_coordinates: bool = ...) -> None: - ... - - @property - def corners(self) -> tuple[np.ndarray, np.ndarray]: - ... - - @property - def edge_centers(self) -> tuple[np.ndarray, np.ndarray]: - ... - - @property - def center(self) -> tuple[float, float]: - ... - - @property - def extents(self) -> tuple[float, float, float, float]: - ... - - @extents.setter - def extents(self, extents: tuple[float, float, float, float]) -> None: - ... - - @property - def rotation(self) -> float: - ... - - @rotation.setter - def rotation(self, value: float) -> None: - ... - - @property - def geometry(self) -> np.ndarray: - ... - - - -class EllipseSelector(RectangleSelector): - ... - - -class LassoSelector(_SelectorWidget): - verts: None | list[tuple[float, float]] - def __init__(self, ax: Axes, onselect: Callable[[list[tuple[float, float]]], Any], *, useblit: bool = ..., props: dict[str, Any] | None = ..., button: MouseButton | Collection[MouseButton] | None = ...) -> None: - ... - - - -class PolygonSelector(_SelectorWidget): - grab_range: float - def __init__(self, ax: Axes, onselect: Callable[[ArrayLike, ArrayLike], Any], *, useblit: bool = ..., props: dict[str, Any] | None = ..., handle_props: dict[str, Any] | None = ..., grab_range: float = ..., draw_bounding_box: bool = ..., box_handle_props: dict[str, Any] | None = ..., box_props: dict[str, Any] | None = ...) -> None: - ... - - def onmove(self, event: Event) -> bool: - ... - - @property - def verts(self) -> list[tuple[float, float]]: - ... - - @verts.setter - def verts(self, xys: Sequence[tuple[float, float]]) -> None: - ... - - - -class Lasso(AxesWidget): - useblit: bool - background: Any - verts: list[tuple[float, float]] | None - line: Line2D - callback: Callable[[list[tuple[float, float]]], Any] - def __init__(self, ax: Axes, xy: tuple[float, float], callback: Callable[[list[tuple[float, float]]], Any], *, useblit: bool = ...) -> None: - ... - - def onrelease(self, event: Event) -> None: - ... - - def onmove(self, event: Event) -> None: - ... - - - diff --git a/typings/numpy/__config__.pyi b/typings/numpy/__config__.pyi deleted file mode 100644 index 853ac9c..0000000 --- a/typings/numpy/__config__.pyi +++ /dev/null @@ -1,44 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from enum import Enum - -__all__ = ["show"] -_built_with_meson = ... -class DisplayModes(Enum): - stdout = ... - dicts = ... - - -CONFIG = ... -def show(mode=...): # -> dict[str, Unknown] | None: - """ - Show libraries and system information on which NumPy was built - and is being used - - Parameters - ---------- - mode : {`'stdout'`, `'dicts'`}, optional. - Indicates how to display the config information. - `'stdout'` prints to console, `'dicts'` returns a dictionary - of the configuration. - - Returns - ------- - out : {`dict`, `None`} - If mode is `'dicts'`, a dict is returned, else None - - See Also - -------- - get_include : Returns the directory containing NumPy C - header files. - - Notes - ----- - 1. The `'stdout'` mode will give more readable - output if ``pyyaml`` is installed - - """ - ... - diff --git a/typings/numpy/__init__.pyi b/typings/numpy/__init__.pyi deleted file mode 100644 index 3403a82..0000000 --- a/typings/numpy/__init__.pyi +++ /dev/null @@ -1,4443 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import builtins -import sys -import os -import mmap -import ctypes as ct -import array as _array -import datetime as dt -import enum -from abc import abstractmethod -from types import GenericAlias, MappingProxyType, TracebackType -from contextlib import ContextDecorator, contextmanager -from numpy._pytesttester import PytestTester -from numpy.core._internal import _ctypes -from numpy._typing import ArrayLike, DTypeLike, NBitBase, NDArray, _128Bit, _16Bit, _256Bit, _32Bit, _64Bit, _80Bit, _8Bit, _96Bit, _ArrayLikeBool_co, _ArrayLikeBytes_co, _ArrayLikeComplex_co, _ArrayLikeDT64_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeNumber_co, _ArrayLikeObject_co, _ArrayLikeStr_co, _ArrayLikeTD64_co, _ArrayLikeUInt_co, _ArrayLikeUnknown, _BoolCodes, _BoolLike_co, _ByteCodes, _BytesCodes, _CDoubleCodes, _CLongDoubleCodes, _CSingleCodes, _CharLike_co, _Complex128Codes, _Complex64Codes, _ComplexLike_co, _DT64Codes, _DTypeLike, _DTypeLikeVoid, _DoubleCodes, _FiniteNestedSequence, _Float16Codes, _Float32Codes, _Float64Codes, _FloatLike_co, _GUFunc_Nin2_Nout1, _HalfCodes, _Int16Codes, _Int32Codes, _Int64Codes, _Int8Codes, _IntCCodes, _IntCodes, _IntLike_co, _IntPCodes, _LongDoubleCodes, _LongLongCodes, _NBitByte, _NBitDouble, _NBitHalf, _NBitInt, _NBitIntC, _NBitIntP, _NBitLongDouble, _NBitLongLong, _NBitShort, _NBitSingle, _NestedSequence, _NumberLike_co, _ObjectCodes, _ScalarLike_co, _Shape, _ShapeLike, _ShortCodes, _SingleCodes, _StrCodes, _SupportsArray, _SupportsDType, _TD64Codes, _TD64Like_co, _UByteCodes, _UFunc_Nin1_Nout1, _UFunc_Nin1_Nout2, _UFunc_Nin2_Nout1, _UFunc_Nin2_Nout2, _UInt16Codes, _UInt32Codes, _UInt64Codes, _UInt8Codes, _UIntCCodes, _UIntCodes, _UIntPCodes, _ULongLongCodes, _UShortCodes, _UnknownType, _VoidCodes, _VoidDTypeLike -from numpy._typing._callable import _BoolBitOp, _BoolDivMod, _BoolMod, _BoolOp, _BoolSub, _BoolTrueDiv, _ComparisonOp, _ComplexOp, _FloatDivMod, _FloatMod, _FloatOp, _IntTrueDiv, _NumberOp, _SignedIntBitOp, _SignedIntDivMod, _SignedIntMod, _SignedIntOp, _TD64Div, _UnsignedIntBitOp, _UnsignedIntDivMod, _UnsignedIntMod, _UnsignedIntOp -from numpy._typing._extended_precision import complex160 as complex160, complex192 as complex192, complex256 as complex256, complex512 as complex512, float128 as float128, float256 as float256, float80 as float80, float96 as float96, int128 as int128, int256 as int256, uint128 as uint128, uint256 as uint256 -from collections.abc import Buffer as _SupportsBuffer, Callable, Container, Iterable, Iterator, Mapping, Sequence, Sized -from typing import Any, ClassVar, Final, Generator, Generic, IO, Literal as L, NoReturn, Protocol, SupportsComplex, SupportsFloat, SupportsIndex, SupportsInt, TypeVar, Union, final, overload -from numpy import ctypeslib as ctypeslib, dtypes as dtypes, exceptions as exceptions, fft as fft, lib as lib, linalg as linalg, ma as ma, polynomial as polynomial, random as random, testing as testing, version as version -from numpy.core import defchararray, records -from numpy.core.function_base import geomspace as geomspace, linspace as linspace, logspace as logspace -from numpy.core.fromnumeric import all as all, amax as amax, amin as amin, any as any, argmax as argmax, argmin as argmin, argpartition as argpartition, argsort as argsort, around as around, choose as choose, clip as clip, compress as compress, cumprod as cumprod, cumsum as cumsum, diagonal as diagonal, max as max, mean as mean, min as min, ndim as ndim, nonzero as nonzero, partition as partition, prod as prod, ptp as ptp, put as put, ravel as ravel, repeat as repeat, reshape as reshape, resize as resize, round as round, searchsorted as searchsorted, shape as shape, size as size, sort as sort, squeeze as squeeze, std as std, sum as sum, swapaxes as swapaxes, take as take, trace as trace, transpose as transpose, var as var -from numpy.core._asarray import require as require -from numpy.core._type_aliases import sctypeDict as sctypeDict, sctypes as sctypes -from numpy.core._ufunc_config import _ErrDictOptional, _ErrFunc, _ErrKind, getbufsize as getbufsize, geterr as geterr, geterrcall as geterrcall, setbufsize as setbufsize, seterr as seterr, seterrcall as seterrcall -from numpy.core.arrayprint import array2string as array2string, array_repr as array_repr, array_str as array_str, format_float_positional as format_float_positional, format_float_scientific as format_float_scientific, get_printoptions as get_printoptions, printoptions as printoptions, set_printoptions as set_printoptions, set_string_function as set_string_function -from numpy.core.einsumfunc import einsum as einsum, einsum_path as einsum_path -from numpy.core.multiarray import ALLOW_THREADS as ALLOW_THREADS, BUFSIZE as BUFSIZE, CLIP as CLIP, MAXDIMS as MAXDIMS, MAY_SHARE_BOUNDS as MAY_SHARE_BOUNDS, MAY_SHARE_EXACT as MAY_SHARE_EXACT, RAISE as RAISE, WRAP as WRAP, arange as arange, array as array, asanyarray as asanyarray, asarray as asarray, ascontiguousarray as ascontiguousarray, asfortranarray as asfortranarray, bincount as bincount, busday_count as busday_count, busday_offset as busday_offset, can_cast as can_cast, compare_chararrays as compare_chararrays, concatenate as concatenate, copyto as copyto, datetime_as_string as datetime_as_string, datetime_data as datetime_data, dot as dot, empty as empty, empty_like as empty_like, flagsobj, frombuffer as frombuffer, fromfile as fromfile, fromiter as fromiter, frompyfunc as frompyfunc, fromstring as fromstring, geterrobj as geterrobj, inner as inner, is_busday as is_busday, lexsort as lexsort, may_share_memory as may_share_memory, min_scalar_type as min_scalar_type, nested_iters as nested_iters, packbits as packbits, promote_types as promote_types, putmask as putmask, result_type as result_type, seterrobj as seterrobj, shares_memory as shares_memory, tracemalloc_domain as tracemalloc_domain, unpackbits as unpackbits, vdot as vdot, where as where, zeros as zeros -from numpy.core.numeric import allclose as allclose, argwhere as argwhere, array_equal as array_equal, array_equiv as array_equiv, base_repr as base_repr, binary_repr as binary_repr, convolve as convolve, correlate as correlate, count_nonzero as count_nonzero, cross as cross, flatnonzero as flatnonzero, fromfunction as fromfunction, full as full, full_like as full_like, identity as identity, indices as indices, isclose as isclose, isfortran as isfortran, isscalar as isscalar, moveaxis as moveaxis, ones as ones, ones_like as ones_like, outer as outer, roll as roll, rollaxis as rollaxis, tensordot as tensordot, zeros_like as zeros_like -from numpy.core.numerictypes import ScalarType as ScalarType, cast as cast, issctype as issctype, issubclass_ as issubclass_, issubdtype as issubdtype, issubsctype as issubsctype, maximum_sctype as maximum_sctype, nbytes as nbytes, obj2sctype as obj2sctype, sctype2char as sctype2char, typecodes as typecodes -from numpy.core.shape_base import atleast_1d as atleast_1d, atleast_2d as atleast_2d, atleast_3d as atleast_3d, block as block, hstack as hstack, stack as stack, vstack as vstack -from numpy.exceptions import AxisError as AxisError, ComplexWarning as ComplexWarning, DTypePromotionError as DTypePromotionError, ModuleDeprecationWarning as ModuleDeprecationWarning, TooHardError as TooHardError, VisibleDeprecationWarning as VisibleDeprecationWarning -from numpy.lib import emath as emath -from numpy.lib.arraypad import pad as pad -from numpy.lib.arraysetops import ediff1d as ediff1d, in1d as in1d, intersect1d as intersect1d, isin as isin, setdiff1d as setdiff1d, setxor1d as setxor1d, union1d as union1d, unique as unique -from numpy.lib.arrayterator import Arrayterator as Arrayterator -from numpy.lib.function_base import add_docstring as add_docstring, add_newdoc as add_newdoc, add_newdoc_ufunc as add_newdoc_ufunc, angle as angle, append as append, asarray_chkfinite as asarray_chkfinite, average as average, bartlett as bartlett, bincount as bincount, blackman as blackman, copy as copy, corrcoef as corrcoef, cov as cov, delete as delete, diff as diff, digitize as digitize, disp as disp, extract as extract, flip as flip, gradient as gradient, hamming as hamming, hanning as hanning, i0 as i0, insert as insert, interp as interp, iterable as iterable, kaiser as kaiser, median as median, meshgrid as meshgrid, percentile as percentile, piecewise as piecewise, place as place, quantile as quantile, rot90 as rot90, select as select, sinc as sinc, sort_complex as sort_complex, trapz as trapz, trim_zeros as trim_zeros, unwrap as unwrap -from numpy.lib.histograms import histogram as histogram, histogram_bin_edges as histogram_bin_edges, histogramdd as histogramdd -from numpy.lib.index_tricks import c_ as c_, diag_indices as diag_indices, diag_indices_from as diag_indices_from, fill_diagonal as fill_diagonal, index_exp as index_exp, ix_ as ix_, mgrid as mgrid, ogrid as ogrid, r_ as r_, ravel_multi_index as ravel_multi_index, s_ as s_, unravel_index as unravel_index -from numpy.lib.nanfunctions import nanargmax as nanargmax, nanargmin as nanargmin, nancumprod as nancumprod, nancumsum as nancumsum, nanmax as nanmax, nanmean as nanmean, nanmedian as nanmedian, nanmin as nanmin, nanpercentile as nanpercentile, nanprod as nanprod, nanquantile as nanquantile, nanstd as nanstd, nansum as nansum, nanvar as nanvar -from numpy.lib.npyio import fromregex as fromregex, genfromtxt as genfromtxt, load as load, loadtxt as loadtxt, packbits as packbits, recfromcsv as recfromcsv, recfromtxt as recfromtxt, save as save, savetxt as savetxt, savez as savez, savez_compressed as savez_compressed, unpackbits as unpackbits -from numpy.lib.polynomial import poly as poly, polyadd as polyadd, polyder as polyder, polydiv as polydiv, polyfit as polyfit, polyint as polyint, polymul as polymul, polysub as polysub, polyval as polyval, roots as roots -from numpy.lib.shape_base import apply_along_axis as apply_along_axis, apply_over_axes as apply_over_axes, array_split as array_split, column_stack as column_stack, dsplit as dsplit, dstack as dstack, expand_dims as expand_dims, get_array_wrap as get_array_wrap, hsplit as hsplit, kron as kron, put_along_axis as put_along_axis, row_stack as row_stack, split as split, take_along_axis as take_along_axis, tile as tile, vsplit as vsplit -from numpy.lib.stride_tricks import broadcast_arrays as broadcast_arrays, broadcast_shapes as broadcast_shapes, broadcast_to as broadcast_to -from numpy.lib.twodim_base import diag as diag, diagflat as diagflat, eye as eye, fliplr as fliplr, flipud as flipud, histogram2d as histogram2d, mask_indices as mask_indices, tri as tri, tril as tril, tril_indices as tril_indices, tril_indices_from as tril_indices_from, triu as triu, triu_indices as triu_indices, triu_indices_from as triu_indices_from, vander as vander -from numpy.lib.type_check import asfarray as asfarray, common_type as common_type, imag as imag, iscomplex as iscomplex, iscomplexobj as iscomplexobj, isreal as isreal, isrealobj as isrealobj, mintypecode as mintypecode, nan_to_num as nan_to_num, real as real, real_if_close as real_if_close, typename as typename -from numpy.lib.ufunclike import fix as fix, isneginf as isneginf, isposinf as isposinf -from numpy.lib.utils import byte_bounds as byte_bounds, deprecate as deprecate, deprecate_with_doc as deprecate_with_doc, get_include as get_include, info as info, issubclass_ as issubclass_, issubdtype as issubdtype, issubsctype as issubsctype, lookfor as lookfor, safe_eval as safe_eval, show_runtime as show_runtime, source as source, who as who -from numpy.matrixlib import asmatrix as asmatrix, bmat as bmat, mat as mat - -char = defchararray -rec = records -_AnyStr_contra = TypeVar("_AnyStr_contra", str, bytes, contravariant=True) -class _IOProtocol(Protocol): - def flush(self) -> object: - ... - - def fileno(self) -> int: - ... - - def tell(self) -> SupportsIndex: - ... - - def seek(self, offset: int, whence: int, /) -> object: - ... - - - -class _MemMapIOProtocol(Protocol): - def flush(self) -> object: - ... - - def fileno(self) -> SupportsIndex: - ... - - def tell(self) -> int: - ... - - def seek(self, offset: int, whence: int, /) -> object: - ... - - def write(self, s: bytes, /) -> object: - ... - - @property - def read(self) -> object: - ... - - - -class _SupportsWrite(Protocol[_AnyStr_contra]): - def write(self, s: _AnyStr_contra, /) -> object: - ... - - - -__all__: list[str] -__path__: list[str] -__version__: str -test: PytestTester -def show_config() -> None: - ... - -_NdArraySubClass = TypeVar("_NdArraySubClass", bound=ndarray[Any, Any]) -_DTypeScalar_co = TypeVar("_DTypeScalar_co", covariant=True, bound=generic) -_ByteOrder = L["S", "<", ">", "=", "|", "L", "B", "N", "I"] -@final -class dtype(Generic[_DTypeScalar_co]): - names: None | tuple[builtins.str, ...] - def __hash__(self) -> int: - ... - - @overload - def __new__(cls, dtype: type[_DTypeScalar_co], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[_DTypeScalar_co]: - ... - - @overload - def __new__(cls, dtype: type[bool], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[bool_]: - ... - - @overload - def __new__(cls, dtype: type[int], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[int_]: - ... - - @overload - def __new__(cls, dtype: None | type[float], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[float_]: - ... - - @overload - def __new__(cls, dtype: type[complex], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[complex_]: - ... - - @overload - def __new__(cls, dtype: type[builtins.str], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[str_]: - ... - - @overload - def __new__(cls, dtype: type[bytes], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[bytes_]: - ... - - @overload - def __new__(cls, dtype: _UInt8Codes | type[ct.c_uint8], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[uint8]: - ... - - @overload - def __new__(cls, dtype: _UInt16Codes | type[ct.c_uint16], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[uint16]: - ... - - @overload - def __new__(cls, dtype: _UInt32Codes | type[ct.c_uint32], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[uint32]: - ... - - @overload - def __new__(cls, dtype: _UInt64Codes | type[ct.c_uint64], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[uint64]: - ... - - @overload - def __new__(cls, dtype: _UByteCodes | type[ct.c_ubyte], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[ubyte]: - ... - - @overload - def __new__(cls, dtype: _UShortCodes | type[ct.c_ushort], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[ushort]: - ... - - @overload - def __new__(cls, dtype: _UIntCCodes | type[ct.c_uint], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[uintc]: - ... - - @overload - def __new__(cls, dtype: _UIntPCodes | type[ct.c_void_p] | type[ct.c_size_t], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[uintp]: - ... - - @overload - def __new__(cls, dtype: _UIntCodes | type[ct.c_ulong], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[uint]: - ... - - @overload - def __new__(cls, dtype: _ULongLongCodes | type[ct.c_ulonglong], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[ulonglong]: - ... - - @overload - def __new__(cls, dtype: _Int8Codes | type[ct.c_int8], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[int8]: - ... - - @overload - def __new__(cls, dtype: _Int16Codes | type[ct.c_int16], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[int16]: - ... - - @overload - def __new__(cls, dtype: _Int32Codes | type[ct.c_int32], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[int32]: - ... - - @overload - def __new__(cls, dtype: _Int64Codes | type[ct.c_int64], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[int64]: - ... - - @overload - def __new__(cls, dtype: _ByteCodes | type[ct.c_byte], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[byte]: - ... - - @overload - def __new__(cls, dtype: _ShortCodes | type[ct.c_short], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[short]: - ... - - @overload - def __new__(cls, dtype: _IntCCodes | type[ct.c_int], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[intc]: - ... - - @overload - def __new__(cls, dtype: _IntPCodes | type[ct.c_ssize_t], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[intp]: - ... - - @overload - def __new__(cls, dtype: _IntCodes | type[ct.c_long], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[int_]: - ... - - @overload - def __new__(cls, dtype: _LongLongCodes | type[ct.c_longlong], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[longlong]: - ... - - @overload - def __new__(cls, dtype: _Float16Codes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[float16]: - ... - - @overload - def __new__(cls, dtype: _Float32Codes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[float32]: - ... - - @overload - def __new__(cls, dtype: _Float64Codes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[float64]: - ... - - @overload - def __new__(cls, dtype: _HalfCodes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[half]: - ... - - @overload - def __new__(cls, dtype: _SingleCodes | type[ct.c_float], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[single]: - ... - - @overload - def __new__(cls, dtype: _DoubleCodes | type[ct.c_double], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[double]: - ... - - @overload - def __new__(cls, dtype: _LongDoubleCodes | type[ct.c_longdouble], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[longdouble]: - ... - - @overload - def __new__(cls, dtype: _Complex64Codes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[complex64]: - ... - - @overload - def __new__(cls, dtype: _Complex128Codes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[complex128]: - ... - - @overload - def __new__(cls, dtype: _CSingleCodes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[csingle]: - ... - - @overload - def __new__(cls, dtype: _CDoubleCodes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[cdouble]: - ... - - @overload - def __new__(cls, dtype: _CLongDoubleCodes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[clongdouble]: - ... - - @overload - def __new__(cls, dtype: _BoolCodes | type[ct.c_bool], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[bool_]: - ... - - @overload - def __new__(cls, dtype: _TD64Codes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[timedelta64]: - ... - - @overload - def __new__(cls, dtype: _DT64Codes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[datetime64]: - ... - - @overload - def __new__(cls, dtype: _StrCodes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[str_]: - ... - - @overload - def __new__(cls, dtype: _BytesCodes | type[ct.c_char], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[bytes_]: - ... - - @overload - def __new__(cls, dtype: _VoidCodes, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[void]: - ... - - @overload - def __new__(cls, dtype: _ObjectCodes | type[ct.py_object[Any]], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[object_]: - ... - - @overload - def __new__(cls, dtype: dtype[_DTypeScalar_co], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[_DTypeScalar_co]: - ... - - @overload - def __new__(cls, dtype: _SupportsDType[dtype[_DTypeScalar_co]], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[_DTypeScalar_co]: - ... - - @overload - def __new__(cls, dtype: builtins.str, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[Any]: - ... - - @overload - def __new__(cls, dtype: _VoidDTypeLike, align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[void]: - ... - - @overload - def __new__(cls, dtype: type[object], align: bool = ..., copy: bool = ..., metadata: dict[builtins.str, Any] = ...) -> dtype[object_]: - ... - - def __class_getitem__(self, item: Any) -> GenericAlias: - ... - - @overload - def __getitem__(self: dtype[void], key: list[builtins.str]) -> dtype[void]: - ... - - @overload - def __getitem__(self: dtype[void], key: builtins.str | SupportsIndex) -> dtype[Any]: - ... - - @overload - def __mul__(self: _DType, value: L[1]) -> _DType: - ... - - @overload - def __mul__(self: _FlexDType, value: SupportsIndex) -> _FlexDType: - ... - - @overload - def __mul__(self, value: SupportsIndex) -> dtype[void]: - ... - - @overload - def __rmul__(self: _FlexDType, value: SupportsIndex) -> _FlexDType: - ... - - @overload - def __rmul__(self, value: SupportsIndex) -> dtype[Any]: - ... - - def __gt__(self, other: DTypeLike) -> bool: - ... - - def __ge__(self, other: DTypeLike) -> bool: - ... - - def __lt__(self, other: DTypeLike) -> bool: - ... - - def __le__(self, other: DTypeLike) -> bool: - ... - - def __eq__(self, other: Any) -> bool: - ... - - def __ne__(self, other: Any) -> bool: - ... - - @property - def alignment(self) -> int: - ... - - @property - def base(self) -> dtype[Any]: - ... - - @property - def byteorder(self) -> builtins.str: - ... - - @property - def char(self) -> builtins.str: - ... - - @property - def descr(self) -> list[tuple[builtins.str, builtins.str] | tuple[builtins.str, builtins.str, _Shape]]: - ... - - @property - def fields(self) -> None | MappingProxyType[builtins.str, tuple[dtype[Any], int] | tuple[dtype[Any], int, Any]]: - ... - - @property - def flags(self) -> int: - ... - - @property - def hasobject(self) -> bool: - ... - - @property - def isbuiltin(self) -> int: - ... - - @property - def isnative(self) -> bool: - ... - - @property - def isalignedstruct(self) -> bool: - ... - - @property - def itemsize(self) -> int: - ... - - @property - def kind(self) -> builtins.str: - ... - - @property - def metadata(self) -> None | MappingProxyType[builtins.str, Any]: - ... - - @property - def name(self) -> builtins.str: - ... - - @property - def num(self) -> int: - ... - - @property - def shape(self) -> _Shape: - ... - - @property - def ndim(self) -> int: - ... - - @property - def subdtype(self) -> None | tuple[dtype[Any], _Shape]: - ... - - def newbyteorder(self: _DType, __new_order: _ByteOrder = ...) -> _DType: - ... - - @property - def str(self) -> builtins.str: - ... - - @property - def type(self) -> type[_DTypeScalar_co]: - ... - - - -_ArrayLikeInt = Union[int, integer[Any], Sequence[Union[int, integer[Any]]], Sequence[Sequence[Any]], ndarray[Any, Any]] -_FlatIterSelf = TypeVar("_FlatIterSelf", bound=flatiter[Any]) -@final -class flatiter(Generic[_NdArraySubClass]): - __hash__: ClassVar[None] - @property - def base(self) -> _NdArraySubClass: - ... - - @property - def coords(self) -> _Shape: - ... - - @property - def index(self) -> int: - ... - - def copy(self) -> _NdArraySubClass: - ... - - def __iter__(self: _FlatIterSelf) -> _FlatIterSelf: - ... - - def __next__(self: flatiter[ndarray[Any, dtype[_ScalarType]]]) -> _ScalarType: - ... - - def __len__(self) -> int: - ... - - @overload - def __getitem__(self: flatiter[ndarray[Any, dtype[_ScalarType]]], key: int | integer[Any] | tuple[int | integer[Any]]) -> _ScalarType: - ... - - @overload - def __getitem__(self, key: _ArrayLikeInt | slice | ellipsis | tuple[_ArrayLikeInt | slice | ellipsis]) -> _NdArraySubClass: - ... - - def __setitem__(self, key: _ArrayLikeInt | slice | ellipsis | tuple[_ArrayLikeInt | slice | ellipsis], value: Any) -> None: - ... - - @overload - def __array__(self: flatiter[ndarray[Any, _DType]], dtype: None = ..., /) -> ndarray[Any, _DType]: - ... - - @overload - def __array__(self, dtype: _DType, /) -> ndarray[Any, _DType]: - ... - - - -_OrderKACF = L[None, "K", "A", "C", "F"] -_OrderACF = L[None, "A", "C", "F"] -_OrderCF = L[None, "C", "F"] -_ModeKind = L["raise", "wrap", "clip"] -_PartitionKind = L["introselect"] -_SortKind = L["quicksort", "mergesort", "heapsort", "stable"] -_SortSide = L["left", "right"] -_ArraySelf = TypeVar("_ArraySelf", bound=_ArrayOrScalarCommon) -class _ArrayOrScalarCommon: - @property - def T(self: _ArraySelf) -> _ArraySelf: - ... - - @property - def data(self) -> memoryview: - ... - - @property - def flags(self) -> flagsobj: - ... - - @property - def itemsize(self) -> int: - ... - - @property - def nbytes(self) -> int: - ... - - def __bool__(self) -> bool: - ... - - def __bytes__(self) -> bytes: - ... - - def __str__(self) -> str: - ... - - def __repr__(self) -> str: - ... - - def __copy__(self: _ArraySelf) -> _ArraySelf: - ... - - def __deepcopy__(self: _ArraySelf, memo: None | dict[int, Any], /) -> _ArraySelf: - ... - - def __eq__(self, other: Any) -> Any: - ... - - def __ne__(self, other: Any) -> Any: - ... - - def copy(self: _ArraySelf, order: _OrderKACF = ...) -> _ArraySelf: - ... - - def dump(self, file: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _SupportsWrite[bytes]) -> None: - ... - - def dumps(self) -> bytes: - ... - - def tobytes(self, order: _OrderKACF = ...) -> bytes: - ... - - def tofile(self, fid: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _IOProtocol, sep: str = ..., format: str = ...) -> None: - ... - - def tolist(self) -> Any: - ... - - @property - def __array_interface__(self) -> dict[str, Any]: - ... - - @property - def __array_priority__(self) -> float: - ... - - @property - def __array_struct__(self) -> Any: - ... - - def __setstate__(self, state: tuple[SupportsIndex, _ShapeLike, _DType_co, bool, bytes | list[Any],], /) -> None: - ... - - @overload - def all(self, axis: None = ..., out: None = ..., keepdims: L[False] = ..., *, where: _ArrayLikeBool_co = ...) -> bool_: - ... - - @overload - def all(self, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def all(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - @overload - def any(self, axis: None = ..., out: None = ..., keepdims: L[False] = ..., *, where: _ArrayLikeBool_co = ...) -> bool_: - ... - - @overload - def any(self, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def any(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - @overload - def argmax(self, axis: None = ..., out: None = ..., *, keepdims: L[False] = ...) -> intp: - ... - - @overload - def argmax(self, axis: SupportsIndex = ..., out: None = ..., *, keepdims: bool = ...) -> Any: - ... - - @overload - def argmax(self, axis: None | SupportsIndex = ..., out: _NdArraySubClass = ..., *, keepdims: bool = ...) -> _NdArraySubClass: - ... - - @overload - def argmin(self, axis: None = ..., out: None = ..., *, keepdims: L[False] = ...) -> intp: - ... - - @overload - def argmin(self, axis: SupportsIndex = ..., out: None = ..., *, keepdims: bool = ...) -> Any: - ... - - @overload - def argmin(self, axis: None | SupportsIndex = ..., out: _NdArraySubClass = ..., *, keepdims: bool = ...) -> _NdArraySubClass: - ... - - def argsort(self, axis: None | SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> ndarray[Any, Any]: - ... - - @overload - def choose(self, choices: ArrayLike, out: None = ..., mode: _ModeKind = ...) -> ndarray[Any, Any]: - ... - - @overload - def choose(self, choices: ArrayLike, out: _NdArraySubClass = ..., mode: _ModeKind = ...) -> _NdArraySubClass: - ... - - @overload - def clip(self, min: ArrayLike = ..., max: None | ArrayLike = ..., out: None = ..., **kwargs: Any) -> ndarray[Any, Any]: - ... - - @overload - def clip(self, min: None = ..., max: ArrayLike = ..., out: None = ..., **kwargs: Any) -> ndarray[Any, Any]: - ... - - @overload - def clip(self, min: ArrayLike = ..., max: None | ArrayLike = ..., out: _NdArraySubClass = ..., **kwargs: Any) -> _NdArraySubClass: - ... - - @overload - def clip(self, min: None = ..., max: ArrayLike = ..., out: _NdArraySubClass = ..., **kwargs: Any) -> _NdArraySubClass: - ... - - @overload - def compress(self, a: ArrayLike, axis: None | SupportsIndex = ..., out: None = ...) -> ndarray[Any, Any]: - ... - - @overload - def compress(self, a: ArrayLike, axis: None | SupportsIndex = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - def conj(self: _ArraySelf) -> _ArraySelf: - ... - - def conjugate(self: _ArraySelf) -> _ArraySelf: - ... - - @overload - def cumprod(self, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> ndarray[Any, Any]: - ... - - @overload - def cumprod(self, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def cumsum(self, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> ndarray[Any, Any]: - ... - - @overload - def cumsum(self, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def max(self, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def max(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - @overload - def mean(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def mean(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - @overload - def min(self, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def min(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - def newbyteorder(self: _ArraySelf, __new_order: _ByteOrder = ...) -> _ArraySelf: - ... - - @overload - def prod(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def prod(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - @overload - def ptp(self, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ...) -> Any: - ... - - @overload - def ptp(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ...) -> _NdArraySubClass: - ... - - @overload - def round(self: _ArraySelf, decimals: SupportsIndex = ..., out: None = ...) -> _ArraySelf: - ... - - @overload - def round(self, decimals: SupportsIndex = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def std(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def std(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - @overload - def sum(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def sum(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - @overload - def var(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - - @overload - def var(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _NdArraySubClass: - ... - - - -_DType = TypeVar("_DType", bound=dtype[Any]) -_DType_co = TypeVar("_DType_co", covariant=True, bound=dtype[Any]) -_FlexDType = TypeVar("_FlexDType", bound=dtype[flexible]) -_ShapeType = TypeVar("_ShapeType", bound=Any) -_ShapeType2 = TypeVar("_ShapeType2", bound=Any) -_NumberType = TypeVar("_NumberType", bound=number[Any]) -if sys.version_info >= (3, 12): - ... -else: - ... -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) -_T_contra = TypeVar("_T_contra", contravariant=True) -_2Tuple = tuple[_T, _T] -_CastingKind = L["no", "equiv", "safe", "same_kind", "unsafe"] -_ArrayUInt_co = NDArray[Union[bool_, unsignedinteger[Any]]] -_ArrayInt_co = NDArray[Union[bool_, integer[Any]]] -_ArrayFloat_co = NDArray[Union[bool_, integer[Any], floating[Any]]] -_ArrayComplex_co = NDArray[Union[bool_, integer[Any], floating[Any], complexfloating[Any, Any]]] -_ArrayNumber_co = NDArray[Union[bool_, number[Any]]] -_ArrayTD64_co = NDArray[Union[bool_, integer[Any], timedelta64]] -_dtype = dtype -_PyCapsule = Any -class _SupportsItem(Protocol[_T_co]): - def item(self, args: Any, /) -> _T_co: - ... - - - -class _SupportsReal(Protocol[_T_co]): - @property - def real(self) -> _T_co: - ... - - - -class _SupportsImag(Protocol[_T_co]): - @property - def imag(self) -> _T_co: - ... - - - -class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]): - __hash__: ClassVar[None] - @property - def base(self) -> None | ndarray[Any, Any]: - ... - - @property - def ndim(self) -> int: - ... - - @property - def size(self) -> int: - ... - - @property - def real(self: ndarray[_ShapeType, dtype[_SupportsReal[_ScalarType]]]) -> ndarray[_ShapeType, _dtype[_ScalarType]]: - ... - - @real.setter - def real(self, value: ArrayLike) -> None: - ... - - @property - def imag(self: ndarray[_ShapeType, dtype[_SupportsImag[_ScalarType]]]) -> ndarray[_ShapeType, _dtype[_ScalarType]]: - ... - - @imag.setter - def imag(self, value: ArrayLike) -> None: - ... - - def __new__(cls: type[_ArraySelf], shape: _ShapeLike, dtype: DTypeLike = ..., buffer: None | _SupportsBuffer = ..., offset: SupportsIndex = ..., strides: None | _ShapeLike = ..., order: _OrderKACF = ...) -> _ArraySelf: - ... - - if sys.version_info >= (3, 12): - def __buffer__(self, flags: int, /) -> memoryview: - ... - - def __class_getitem__(self, item: Any) -> GenericAlias: - ... - - @overload - def __array__(self, dtype: None = ..., /) -> ndarray[Any, _DType_co]: - ... - - @overload - def __array__(self, dtype: _DType, /) -> ndarray[Any, _DType]: - ... - - def __array_ufunc__(self, ufunc: ufunc, method: L["__call__", "reduce", "reduceat", "accumulate", "outer", "inner"], *inputs: Any, **kwargs: Any) -> Any: - ... - - def __array_function__(self, func: Callable[..., Any], types: Iterable[type], args: Iterable[Any], kwargs: Mapping[str, Any]) -> Any: - ... - - def __array_finalize__(self, obj: None | NDArray[Any], /) -> None: - ... - - def __array_wrap__(self, array: ndarray[_ShapeType2, _DType], context: None | tuple[ufunc, tuple[Any, ...], int] = ..., /) -> ndarray[_ShapeType2, _DType]: - ... - - def __array_prepare__(self, array: ndarray[_ShapeType2, _DType], context: None | tuple[ufunc, tuple[Any, ...], int] = ..., /) -> ndarray[_ShapeType2, _DType]: - ... - - @overload - def __getitem__(self, key: (NDArray[integer[Any]] | NDArray[bool_] | tuple[NDArray[integer[Any]] | NDArray[bool_], ...])) -> ndarray[Any, _DType_co]: - ... - - @overload - def __getitem__(self, key: SupportsIndex | tuple[SupportsIndex, ...]) -> Any: - ... - - @overload - def __getitem__(self, key: (None | slice | ellipsis | SupportsIndex | _ArrayLikeInt_co | tuple[None | slice | ellipsis | _ArrayLikeInt_co | SupportsIndex, ...])) -> ndarray[Any, _DType_co]: - ... - - @overload - def __getitem__(self: NDArray[void], key: str) -> NDArray[Any]: - ... - - @overload - def __getitem__(self: NDArray[void], key: list[str]) -> ndarray[_ShapeType, _dtype[void]]: - ... - - @property - def ctypes(self) -> _ctypes[int]: - ... - - @property - def shape(self) -> _Shape: - ... - - @shape.setter - def shape(self, value: _ShapeLike) -> None: - ... - - @property - def strides(self) -> _Shape: - ... - - @strides.setter - def strides(self, value: _ShapeLike) -> None: - ... - - def byteswap(self: _ArraySelf, inplace: bool = ...) -> _ArraySelf: - ... - - def fill(self, value: Any) -> None: - ... - - @property - def flat(self: _NdArraySubClass) -> flatiter[_NdArraySubClass]: - ... - - @overload - def item(self: ndarray[Any, _dtype[_SupportsItem[_T]]], *args: SupportsIndex) -> _T: - ... - - @overload - def item(self: ndarray[Any, _dtype[_SupportsItem[_T]]], args: tuple[SupportsIndex, ...], /) -> _T: - ... - - @overload - def itemset(self, value: Any, /) -> None: - ... - - @overload - def itemset(self, item: _ShapeLike, value: Any, /) -> None: - ... - - @overload - def resize(self, new_shape: _ShapeLike, /, *, refcheck: bool = ...) -> None: - ... - - @overload - def resize(self, *new_shape: SupportsIndex, refcheck: bool = ...) -> None: - ... - - def setflags(self, write: bool = ..., align: bool = ..., uic: bool = ...) -> None: - ... - - def squeeze(self, axis: None | SupportsIndex | tuple[SupportsIndex, ...] = ...) -> ndarray[Any, _DType_co]: - ... - - def swapaxes(self, axis1: SupportsIndex, axis2: SupportsIndex) -> ndarray[Any, _DType_co]: - ... - - @overload - def transpose(self: _ArraySelf, axes: None | _ShapeLike, /) -> _ArraySelf: - ... - - @overload - def transpose(self: _ArraySelf, *axes: SupportsIndex) -> _ArraySelf: - ... - - def argpartition(self, kth: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> ndarray[Any, _dtype[intp]]: - ... - - def diagonal(self, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ...) -> ndarray[Any, _DType_co]: - ... - - @overload - def dot(self, b: _ScalarLike_co, out: None = ...) -> ndarray[Any, Any]: - ... - - @overload - def dot(self, b: ArrayLike, out: None = ...) -> Any: - ... - - @overload - def dot(self, b: ArrayLike, out: _NdArraySubClass) -> _NdArraySubClass: - ... - - def nonzero(self) -> tuple[ndarray[Any, _dtype[intp]], ...]: - ... - - def partition(self, kth: _ArrayLikeInt_co, axis: SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> None: - ... - - def put(self, ind: _ArrayLikeInt_co, v: ArrayLike, mode: _ModeKind = ...) -> None: - ... - - @overload - def searchsorted(self, v: _ScalarLike_co, side: _SortSide = ..., sorter: None | _ArrayLikeInt_co = ...) -> intp: - ... - - @overload - def searchsorted(self, v: ArrayLike, side: _SortSide = ..., sorter: None | _ArrayLikeInt_co = ...) -> ndarray[Any, _dtype[intp]]: - ... - - def setfield(self, val: ArrayLike, dtype: DTypeLike, offset: SupportsIndex = ...) -> None: - ... - - def sort(self, axis: SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> None: - ... - - @overload - def trace(self, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: - ... - - @overload - def trace(self, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def take(self: ndarray[Any, _dtype[_ScalarType]], indices: _IntLike_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> _ScalarType: - ... - - @overload - def take(self, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> ndarray[Any, _DType_co]: - ... - - @overload - def take(self, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: _NdArraySubClass = ..., mode: _ModeKind = ...) -> _NdArraySubClass: - ... - - def repeat(self, repeats: _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> ndarray[Any, _DType_co]: - ... - - def flatten(self, order: _OrderKACF = ...) -> ndarray[Any, _DType_co]: - ... - - def ravel(self, order: _OrderKACF = ...) -> ndarray[Any, _DType_co]: - ... - - @overload - def reshape(self, shape: _ShapeLike, /, *, order: _OrderACF = ...) -> ndarray[Any, _DType_co]: - ... - - @overload - def reshape(self, *shape: SupportsIndex, order: _OrderACF = ...) -> ndarray[Any, _DType_co]: - ... - - @overload - def astype(self, dtype: _DTypeLike[_ScalarType], order: _OrderKACF = ..., casting: _CastingKind = ..., subok: bool = ..., copy: bool | _CopyMode = ...) -> NDArray[_ScalarType]: - ... - - @overload - def astype(self, dtype: DTypeLike, order: _OrderKACF = ..., casting: _CastingKind = ..., subok: bool = ..., copy: bool | _CopyMode = ...) -> NDArray[Any]: - ... - - @overload - def view(self: _ArraySelf) -> _ArraySelf: - ... - - @overload - def view(self, type: type[_NdArraySubClass]) -> _NdArraySubClass: - ... - - @overload - def view(self, dtype: _DTypeLike[_ScalarType]) -> NDArray[_ScalarType]: - ... - - @overload - def view(self, dtype: DTypeLike) -> NDArray[Any]: - ... - - @overload - def view(self, dtype: DTypeLike, type: type[_NdArraySubClass]) -> _NdArraySubClass: - ... - - @overload - def getfield(self, dtype: _DTypeLike[_ScalarType], offset: SupportsIndex = ...) -> NDArray[_ScalarType]: - ... - - @overload - def getfield(self, dtype: DTypeLike, offset: SupportsIndex = ...) -> NDArray[Any]: - ... - - def __int__(self: ndarray[Any, _dtype[SupportsInt]]) -> int: - ... - - def __float__(self: ndarray[Any, _dtype[SupportsFloat]]) -> float: - ... - - def __complex__(self: ndarray[Any, _dtype[SupportsComplex]]) -> complex: - ... - - def __index__(self: ndarray[Any, _dtype[SupportsIndex]]) -> int: - ... - - def __len__(self) -> int: - ... - - def __setitem__(self, key, value): - ... - - def __iter__(self) -> Any: - ... - - def __contains__(self, key) -> bool: - ... - - @overload - def __lt__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: - ... - - @overload - def __lt__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: - ... - - @overload - def __lt__(self: NDArray[datetime64], other: _ArrayLikeDT64_co) -> NDArray[bool_]: - ... - - @overload - def __lt__(self: NDArray[object_], other: Any) -> NDArray[bool_]: - ... - - @overload - def __lt__(self: NDArray[Any], other: _ArrayLikeObject_co) -> NDArray[bool_]: - ... - - @overload - def __le__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: - ... - - @overload - def __le__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: - ... - - @overload - def __le__(self: NDArray[datetime64], other: _ArrayLikeDT64_co) -> NDArray[bool_]: - ... - - @overload - def __le__(self: NDArray[object_], other: Any) -> NDArray[bool_]: - ... - - @overload - def __le__(self: NDArray[Any], other: _ArrayLikeObject_co) -> NDArray[bool_]: - ... - - @overload - def __gt__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: - ... - - @overload - def __gt__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: - ... - - @overload - def __gt__(self: NDArray[datetime64], other: _ArrayLikeDT64_co) -> NDArray[bool_]: - ... - - @overload - def __gt__(self: NDArray[object_], other: Any) -> NDArray[bool_]: - ... - - @overload - def __gt__(self: NDArray[Any], other: _ArrayLikeObject_co) -> NDArray[bool_]: - ... - - @overload - def __ge__(self: _ArrayNumber_co, other: _ArrayLikeNumber_co) -> NDArray[bool_]: - ... - - @overload - def __ge__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[bool_]: - ... - - @overload - def __ge__(self: NDArray[datetime64], other: _ArrayLikeDT64_co) -> NDArray[bool_]: - ... - - @overload - def __ge__(self: NDArray[object_], other: Any) -> NDArray[bool_]: - ... - - @overload - def __ge__(self: NDArray[Any], other: _ArrayLikeObject_co) -> NDArray[bool_]: - ... - - @overload - def __abs__(self: NDArray[bool_]) -> NDArray[bool_]: - ... - - @overload - def __abs__(self: NDArray[complexfloating[_NBit1, _NBit1]]) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __abs__(self: NDArray[_NumberType]) -> NDArray[_NumberType]: - ... - - @overload - def __abs__(self: NDArray[timedelta64]) -> NDArray[timedelta64]: - ... - - @overload - def __abs__(self: NDArray[object_]) -> Any: - ... - - @overload - def __invert__(self: NDArray[bool_]) -> NDArray[bool_]: - ... - - @overload - def __invert__(self: NDArray[_IntType]) -> NDArray[_IntType]: - ... - - @overload - def __invert__(self: NDArray[object_]) -> Any: - ... - - @overload - def __pos__(self: NDArray[_NumberType]) -> NDArray[_NumberType]: - ... - - @overload - def __pos__(self: NDArray[timedelta64]) -> NDArray[timedelta64]: - ... - - @overload - def __pos__(self: NDArray[object_]) -> Any: - ... - - @overload - def __neg__(self: NDArray[_NumberType]) -> NDArray[_NumberType]: - ... - - @overload - def __neg__(self: NDArray[timedelta64]) -> NDArray[timedelta64]: - ... - - @overload - def __neg__(self: NDArray[object_]) -> Any: - ... - - @overload - def __matmul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __matmul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __matmul__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __matmul__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __matmul__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __matmul__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __matmul__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __matmul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rmatmul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __rmatmul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rmatmul__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rmatmul__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __rmatmul__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __rmatmul__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __rmatmul__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rmatmul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __mod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __mod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __mod__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __mod__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __mod__(self: _ArrayTD64_co, other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> NDArray[timedelta64]: - ... - - @overload - def __mod__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __mod__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rmod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __rmod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rmod__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rmod__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __rmod__(self: _ArrayTD64_co, other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> NDArray[timedelta64]: - ... - - @overload - def __rmod__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rmod__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __divmod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> _2Tuple[NDArray[int8]]: - ... - - @overload - def __divmod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> _2Tuple[NDArray[unsignedinteger[Any]]]: - ... - - @overload - def __divmod__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> _2Tuple[NDArray[signedinteger[Any]]]: - ... - - @overload - def __divmod__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> _2Tuple[NDArray[floating[Any]]]: - ... - - @overload - def __divmod__(self: _ArrayTD64_co, other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> tuple[NDArray[int64], NDArray[timedelta64]]: - ... - - @overload - def __rdivmod__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> _2Tuple[NDArray[int8]]: - ... - - @overload - def __rdivmod__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> _2Tuple[NDArray[unsignedinteger[Any]]]: - ... - - @overload - def __rdivmod__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> _2Tuple[NDArray[signedinteger[Any]]]: - ... - - @overload - def __rdivmod__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> _2Tuple[NDArray[floating[Any]]]: - ... - - @overload - def __rdivmod__(self: _ArrayTD64_co, other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> tuple[NDArray[int64], NDArray[timedelta64]]: - ... - - @overload - def __add__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __add__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __add__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __add__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __add__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __add__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __add__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __add__(self: _ArrayTD64_co, other: _ArrayLikeDT64_co) -> NDArray[datetime64]: - ... - - @overload - def __add__(self: NDArray[datetime64], other: _ArrayLikeTD64_co) -> NDArray[datetime64]: - ... - - @overload - def __add__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __add__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __radd__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __radd__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __radd__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __radd__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __radd__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __radd__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __radd__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __radd__(self: _ArrayTD64_co, other: _ArrayLikeDT64_co) -> NDArray[datetime64]: - ... - - @overload - def __radd__(self: NDArray[datetime64], other: _ArrayLikeTD64_co) -> NDArray[datetime64]: - ... - - @overload - def __radd__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __radd__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __sub__(self: NDArray[_UnknownType], other: _ArrayLikeUnknown) -> NDArray[Any]: - ... - - @overload - def __sub__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NoReturn: - ... - - @overload - def __sub__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __sub__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __sub__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __sub__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __sub__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __sub__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __sub__(self: NDArray[datetime64], other: _ArrayLikeTD64_co) -> NDArray[datetime64]: - ... - - @overload - def __sub__(self: NDArray[datetime64], other: _ArrayLikeDT64_co) -> NDArray[timedelta64]: - ... - - @overload - def __sub__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __sub__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rsub__(self: NDArray[_UnknownType], other: _ArrayLikeUnknown) -> NDArray[Any]: - ... - - @overload - def __rsub__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NoReturn: - ... - - @overload - def __rsub__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rsub__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rsub__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __rsub__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __rsub__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __rsub__(self: _ArrayTD64_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __rsub__(self: _ArrayTD64_co, other: _ArrayLikeDT64_co) -> NDArray[datetime64]: - ... - - @overload - def __rsub__(self: NDArray[datetime64], other: _ArrayLikeDT64_co) -> NDArray[timedelta64]: - ... - - @overload - def __rsub__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rsub__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __mul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __mul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __mul__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __mul__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __mul__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __mul__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __mul__(self: _ArrayTD64_co, other: _ArrayLikeFloat_co) -> NDArray[timedelta64]: - ... - - @overload - def __mul__(self: _ArrayFloat_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __mul__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __mul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rmul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __rmul__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rmul__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rmul__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __rmul__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __rmul__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __rmul__(self: _ArrayTD64_co, other: _ArrayLikeFloat_co) -> NDArray[timedelta64]: - ... - - @overload - def __rmul__(self: _ArrayFloat_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __rmul__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rmul__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __floordiv__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __floordiv__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __floordiv__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __floordiv__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __floordiv__(self: NDArray[timedelta64], other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> NDArray[int64]: - ... - - @overload - def __floordiv__(self: NDArray[timedelta64], other: _ArrayLikeBool_co) -> NoReturn: - ... - - @overload - def __floordiv__(self: NDArray[timedelta64], other: _ArrayLikeFloat_co) -> NDArray[timedelta64]: - ... - - @overload - def __floordiv__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __floordiv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rfloordiv__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __rfloordiv__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rfloordiv__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rfloordiv__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __rfloordiv__(self: NDArray[timedelta64], other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> NDArray[int64]: - ... - - @overload - def __rfloordiv__(self: NDArray[bool_], other: _ArrayLikeTD64_co) -> NoReturn: - ... - - @overload - def __rfloordiv__(self: _ArrayFloat_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __rfloordiv__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rfloordiv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __pow__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __pow__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __pow__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __pow__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __pow__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __pow__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __pow__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __pow__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rpow__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __rpow__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rpow__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rpow__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __rpow__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __rpow__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __rpow__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rpow__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __truediv__(self: _ArrayInt_co, other: _ArrayInt_co) -> NDArray[float64]: - ... - - @overload - def __truediv__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __truediv__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __truediv__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __truediv__(self: NDArray[timedelta64], other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> NDArray[float64]: - ... - - @overload - def __truediv__(self: NDArray[timedelta64], other: _ArrayLikeBool_co) -> NoReturn: - ... - - @overload - def __truediv__(self: NDArray[timedelta64], other: _ArrayLikeFloat_co) -> NDArray[timedelta64]: - ... - - @overload - def __truediv__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __truediv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rtruediv__(self: _ArrayInt_co, other: _ArrayInt_co) -> NDArray[float64]: - ... - - @overload - def __rtruediv__(self: _ArrayFloat_co, other: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - - @overload - def __rtruediv__(self: _ArrayComplex_co, other: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - - @overload - def __rtruediv__(self: NDArray[number[Any]], other: _ArrayLikeNumber_co) -> NDArray[number[Any]]: - ... - - @overload - def __rtruediv__(self: NDArray[timedelta64], other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> NDArray[float64]: - ... - - @overload - def __rtruediv__(self: NDArray[bool_], other: _ArrayLikeTD64_co) -> NoReturn: - ... - - @overload - def __rtruediv__(self: _ArrayFloat_co, other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __rtruediv__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rtruediv__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __lshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __lshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __lshift__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __lshift__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __lshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rlshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __rlshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rlshift__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rlshift__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rlshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __rshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rshift__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rshift__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rrshift__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[int8]: - ... - - @overload - def __rrshift__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rrshift__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rrshift__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rrshift__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __and__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __and__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __and__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __and__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __and__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rand__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __rand__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rand__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rand__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rand__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __xor__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __xor__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __xor__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __xor__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __xor__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __rxor__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __rxor__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __rxor__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __rxor__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __rxor__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __or__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __or__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __or__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __or__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __or__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __ror__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __ror__(self: _ArrayUInt_co, other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - - @overload - def __ror__(self: _ArrayInt_co, other: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - - @overload - def __ror__(self: NDArray[object_], other: Any) -> Any: - ... - - @overload - def __ror__(self: NDArray[Any], other: _ArrayLikeObject_co) -> Any: - ... - - @overload - def __iadd__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __iadd__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __iadd__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __iadd__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __iadd__(self: NDArray[complexfloating[_NBit1, _NBit1]], other: _ArrayLikeComplex_co) -> NDArray[complexfloating[_NBit1, _NBit1]]: - ... - - @overload - def __iadd__(self: NDArray[timedelta64], other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __iadd__(self: NDArray[datetime64], other: _ArrayLikeTD64_co) -> NDArray[datetime64]: - ... - - @overload - def __iadd__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __isub__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __isub__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __isub__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __isub__(self: NDArray[complexfloating[_NBit1, _NBit1]], other: _ArrayLikeComplex_co) -> NDArray[complexfloating[_NBit1, _NBit1]]: - ... - - @overload - def __isub__(self: NDArray[timedelta64], other: _ArrayLikeTD64_co) -> NDArray[timedelta64]: - ... - - @overload - def __isub__(self: NDArray[datetime64], other: _ArrayLikeTD64_co) -> NDArray[datetime64]: - ... - - @overload - def __isub__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __imul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __imul__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __imul__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __imul__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __imul__(self: NDArray[complexfloating[_NBit1, _NBit1]], other: _ArrayLikeComplex_co) -> NDArray[complexfloating[_NBit1, _NBit1]]: - ... - - @overload - def __imul__(self: NDArray[timedelta64], other: _ArrayLikeFloat_co) -> NDArray[timedelta64]: - ... - - @overload - def __imul__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __itruediv__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __itruediv__(self: NDArray[complexfloating[_NBit1, _NBit1]], other: _ArrayLikeComplex_co) -> NDArray[complexfloating[_NBit1, _NBit1]]: - ... - - @overload - def __itruediv__(self: NDArray[timedelta64], other: _ArrayLikeBool_co) -> NoReturn: - ... - - @overload - def __itruediv__(self: NDArray[timedelta64], other: _ArrayLikeInt_co) -> NDArray[timedelta64]: - ... - - @overload - def __itruediv__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __ifloordiv__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __ifloordiv__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __ifloordiv__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __ifloordiv__(self: NDArray[complexfloating[_NBit1, _NBit1]], other: _ArrayLikeComplex_co) -> NDArray[complexfloating[_NBit1, _NBit1]]: - ... - - @overload - def __ifloordiv__(self: NDArray[timedelta64], other: _ArrayLikeBool_co) -> NoReturn: - ... - - @overload - def __ifloordiv__(self: NDArray[timedelta64], other: _ArrayLikeInt_co) -> NDArray[timedelta64]: - ... - - @overload - def __ifloordiv__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __ipow__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __ipow__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __ipow__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __ipow__(self: NDArray[complexfloating[_NBit1, _NBit1]], other: _ArrayLikeComplex_co) -> NDArray[complexfloating[_NBit1, _NBit1]]: - ... - - @overload - def __ipow__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __imod__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __imod__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __imod__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __imod__(self: NDArray[timedelta64], other: _SupportsArray[_dtype[timedelta64]] | _NestedSequence[_SupportsArray[_dtype[timedelta64]]]) -> NDArray[timedelta64]: - ... - - @overload - def __imod__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __ilshift__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __ilshift__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __ilshift__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __irshift__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __irshift__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __irshift__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __iand__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __iand__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __iand__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __iand__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __ixor__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __ixor__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __ixor__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __ixor__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __ior__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __ior__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co | _IntLike_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __ior__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __ior__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - @overload - def __imatmul__(self: NDArray[bool_], other: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - - @overload - def __imatmul__(self: NDArray[unsignedinteger[_NBit1]], other: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[_NBit1]]: - ... - - @overload - def __imatmul__(self: NDArray[signedinteger[_NBit1]], other: _ArrayLikeInt_co) -> NDArray[signedinteger[_NBit1]]: - ... - - @overload - def __imatmul__(self: NDArray[floating[_NBit1]], other: _ArrayLikeFloat_co) -> NDArray[floating[_NBit1]]: - ... - - @overload - def __imatmul__(self: NDArray[complexfloating[_NBit1, _NBit1]], other: _ArrayLikeComplex_co) -> NDArray[complexfloating[_NBit1, _NBit1]]: - ... - - @overload - def __imatmul__(self: NDArray[object_], other: Any) -> NDArray[object_]: - ... - - def __dlpack__(self: NDArray[number[Any]], *, stream: None = ...) -> _PyCapsule: - ... - - def __dlpack_device__(self) -> tuple[int, L[0]]: - ... - - @property - def dtype(self) -> _DType_co: - ... - - - -_ScalarType = TypeVar("_ScalarType", bound=generic) -_NBit1 = TypeVar("_NBit1", bound=NBitBase) -_NBit2 = TypeVar("_NBit2", bound=NBitBase) -class generic(_ArrayOrScalarCommon): - @abstractmethod - def __init__(self, *args: Any, **kwargs: Any) -> None: - ... - - @overload - def __array__(self: _ScalarType, dtype: None = ..., /) -> ndarray[Any, _dtype[_ScalarType]]: - ... - - @overload - def __array__(self, dtype: _DType, /) -> ndarray[Any, _DType]: - ... - - def __hash__(self) -> int: - ... - - @property - def base(self) -> None: - ... - - @property - def ndim(self) -> L[0]: - ... - - @property - def size(self) -> L[1]: - ... - - @property - def shape(self) -> tuple[()]: - ... - - @property - def strides(self) -> tuple[()]: - ... - - def byteswap(self: _ScalarType, inplace: L[False] = ...) -> _ScalarType: - ... - - @property - def flat(self: _ScalarType) -> flatiter[ndarray[Any, _dtype[_ScalarType]]]: - ... - - if sys.version_info >= (3, 12): - def __buffer__(self, flags: int, /) -> memoryview: - ... - - @overload - def astype(self, dtype: _DTypeLike[_ScalarType], order: _OrderKACF = ..., casting: _CastingKind = ..., subok: bool = ..., copy: bool | _CopyMode = ...) -> _ScalarType: - ... - - @overload - def astype(self, dtype: DTypeLike, order: _OrderKACF = ..., casting: _CastingKind = ..., subok: bool = ..., copy: bool | _CopyMode = ...) -> Any: - ... - - @overload - def view(self: _ScalarType, type: type[ndarray[Any, Any]] = ...) -> _ScalarType: - ... - - @overload - def view(self, dtype: _DTypeLike[_ScalarType], type: type[ndarray[Any, Any]] = ...) -> _ScalarType: - ... - - @overload - def view(self, dtype: DTypeLike, type: type[ndarray[Any, Any]] = ...) -> Any: - ... - - @overload - def getfield(self, dtype: _DTypeLike[_ScalarType], offset: SupportsIndex = ...) -> _ScalarType: - ... - - @overload - def getfield(self, dtype: DTypeLike, offset: SupportsIndex = ...) -> Any: - ... - - def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> Any: - ... - - @overload - def take(self: _ScalarType, indices: _IntLike_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> _ScalarType: - ... - - @overload - def take(self: _ScalarType, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> ndarray[Any, _dtype[_ScalarType]]: - ... - - @overload - def take(self, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: _NdArraySubClass = ..., mode: _ModeKind = ...) -> _NdArraySubClass: - ... - - def repeat(self: _ScalarType, repeats: _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> ndarray[Any, _dtype[_ScalarType]]: - ... - - def flatten(self: _ScalarType, order: _OrderKACF = ...) -> ndarray[Any, _dtype[_ScalarType]]: - ... - - def ravel(self: _ScalarType, order: _OrderKACF = ...) -> ndarray[Any, _dtype[_ScalarType]]: - ... - - @overload - def reshape(self: _ScalarType, shape: _ShapeLike, /, *, order: _OrderACF = ...) -> ndarray[Any, _dtype[_ScalarType]]: - ... - - @overload - def reshape(self: _ScalarType, *shape: SupportsIndex, order: _OrderACF = ...) -> ndarray[Any, _dtype[_ScalarType]]: - ... - - def squeeze(self: _ScalarType, axis: None | L[0] | tuple[()] = ...) -> _ScalarType: - ... - - def transpose(self: _ScalarType, axes: None | tuple[()] = ..., /) -> _ScalarType: - ... - - @property - def dtype(self: _ScalarType) -> _dtype[_ScalarType]: - ... - - - -class number(generic, Generic[_NBit1]): - @property - def real(self: _ArraySelf) -> _ArraySelf: - ... - - @property - def imag(self: _ArraySelf) -> _ArraySelf: - ... - - def __class_getitem__(self, item: Any) -> GenericAlias: - ... - - def __int__(self) -> int: - ... - - def __float__(self) -> float: - ... - - def __complex__(self) -> complex: - ... - - def __neg__(self: _ArraySelf) -> _ArraySelf: - ... - - def __pos__(self: _ArraySelf) -> _ArraySelf: - ... - - def __abs__(self: _ArraySelf) -> _ArraySelf: - ... - - __add__: _NumberOp - __radd__: _NumberOp - __sub__: _NumberOp - __rsub__: _NumberOp - __mul__: _NumberOp - __rmul__: _NumberOp - __floordiv__: _NumberOp - __rfloordiv__: _NumberOp - __pow__: _NumberOp - __rpow__: _NumberOp - __truediv__: _NumberOp - __rtruediv__: _NumberOp - __lt__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - __le__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - __gt__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - __ge__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - - -class bool_(generic): - def __init__(self, value: object = ..., /) -> None: - ... - - def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> bool: - ... - - def tolist(self) -> bool: - ... - - @property - def real(self: _ArraySelf) -> _ArraySelf: - ... - - @property - def imag(self: _ArraySelf) -> _ArraySelf: - ... - - def __int__(self) -> int: - ... - - def __float__(self) -> float: - ... - - def __complex__(self) -> complex: - ... - - def __abs__(self: _ArraySelf) -> _ArraySelf: - ... - - __add__: _BoolOp[bool_] - __radd__: _BoolOp[bool_] - __sub__: _BoolSub - __rsub__: _BoolSub - __mul__: _BoolOp[bool_] - __rmul__: _BoolOp[bool_] - __floordiv__: _BoolOp[int8] - __rfloordiv__: _BoolOp[int8] - __pow__: _BoolOp[int8] - __rpow__: _BoolOp[int8] - __truediv__: _BoolTrueDiv - __rtruediv__: _BoolTrueDiv - def __invert__(self) -> bool_: - ... - - __lshift__: _BoolBitOp[int8] - __rlshift__: _BoolBitOp[int8] - __rshift__: _BoolBitOp[int8] - __rrshift__: _BoolBitOp[int8] - __and__: _BoolBitOp[bool_] - __rand__: _BoolBitOp[bool_] - __xor__: _BoolBitOp[bool_] - __rxor__: _BoolBitOp[bool_] - __or__: _BoolBitOp[bool_] - __ror__: _BoolBitOp[bool_] - __mod__: _BoolMod - __rmod__: _BoolMod - __divmod__: _BoolDivMod - __rdivmod__: _BoolDivMod - __lt__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - __le__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - __gt__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - __ge__: _ComparisonOp[_NumberLike_co, _ArrayLikeNumber_co] - - -class object_(generic): - def __init__(self, value: object = ..., /) -> None: - ... - - @property - def real(self: _ArraySelf) -> _ArraySelf: - ... - - @property - def imag(self: _ArraySelf) -> _ArraySelf: - ... - - def __int__(self) -> int: - ... - - def __float__(self) -> float: - ... - - def __complex__(self) -> complex: - ... - - if sys.version_info >= (3, 12): - def __release_buffer__(self, buffer: memoryview, /) -> None: - ... - - - -class _DatetimeScalar(Protocol): - @property - def day(self) -> int: - ... - - @property - def month(self) -> int: - ... - - @property - def year(self) -> int: - ... - - - -class datetime64(generic): - @overload - def __init__(self, value: None | datetime64 | _CharLike_co | _DatetimeScalar = ..., format: _CharLike_co | tuple[_CharLike_co, _IntLike_co] = ..., /) -> None: - ... - - @overload - def __init__(self, value: int, format: _CharLike_co | tuple[_CharLike_co, _IntLike_co], /) -> None: - ... - - def __add__(self, other: _TD64Like_co) -> datetime64: - ... - - def __radd__(self, other: _TD64Like_co) -> datetime64: - ... - - @overload - def __sub__(self, other: datetime64) -> timedelta64: - ... - - @overload - def __sub__(self, other: _TD64Like_co) -> datetime64: - ... - - def __rsub__(self, other: datetime64) -> timedelta64: - ... - - __lt__: _ComparisonOp[datetime64, _ArrayLikeDT64_co] - __le__: _ComparisonOp[datetime64, _ArrayLikeDT64_co] - __gt__: _ComparisonOp[datetime64, _ArrayLikeDT64_co] - __ge__: _ComparisonOp[datetime64, _ArrayLikeDT64_co] - - -_IntValue = Union[SupportsInt, _CharLike_co, SupportsIndex] -_FloatValue = Union[None, _CharLike_co, SupportsFloat, SupportsIndex] -_ComplexValue = Union[None, _CharLike_co, SupportsFloat, SupportsComplex, SupportsIndex, complex,] -class integer(number[_NBit1]): - @property - def numerator(self: _ScalarType) -> _ScalarType: - ... - - @property - def denominator(self) -> L[1]: - ... - - @overload - def __round__(self, ndigits: None = ...) -> int: - ... - - @overload - def __round__(self: _ScalarType, ndigits: SupportsIndex) -> _ScalarType: - ... - - def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> int: - ... - - def tolist(self) -> int: - ... - - def is_integer(self) -> L[True]: - ... - - def bit_count(self: _ScalarType) -> int: - ... - - def __index__(self) -> int: - ... - - __truediv__: _IntTrueDiv[_NBit1] - __rtruediv__: _IntTrueDiv[_NBit1] - def __mod__(self, value: _IntLike_co) -> integer[Any]: - ... - - def __rmod__(self, value: _IntLike_co) -> integer[Any]: - ... - - def __invert__(self: _IntType) -> _IntType: - ... - - def __lshift__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __rlshift__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __rshift__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __rrshift__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __and__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __rand__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __or__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __ror__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __xor__(self, other: _IntLike_co) -> integer[Any]: - ... - - def __rxor__(self, other: _IntLike_co) -> integer[Any]: - ... - - - -class signedinteger(integer[_NBit1]): - def __init__(self, value: _IntValue = ..., /) -> None: - ... - - __add__: _SignedIntOp[_NBit1] - __radd__: _SignedIntOp[_NBit1] - __sub__: _SignedIntOp[_NBit1] - __rsub__: _SignedIntOp[_NBit1] - __mul__: _SignedIntOp[_NBit1] - __rmul__: _SignedIntOp[_NBit1] - __floordiv__: _SignedIntOp[_NBit1] - __rfloordiv__: _SignedIntOp[_NBit1] - __pow__: _SignedIntOp[_NBit1] - __rpow__: _SignedIntOp[_NBit1] - __lshift__: _SignedIntBitOp[_NBit1] - __rlshift__: _SignedIntBitOp[_NBit1] - __rshift__: _SignedIntBitOp[_NBit1] - __rrshift__: _SignedIntBitOp[_NBit1] - __and__: _SignedIntBitOp[_NBit1] - __rand__: _SignedIntBitOp[_NBit1] - __xor__: _SignedIntBitOp[_NBit1] - __rxor__: _SignedIntBitOp[_NBit1] - __or__: _SignedIntBitOp[_NBit1] - __ror__: _SignedIntBitOp[_NBit1] - __mod__: _SignedIntMod[_NBit1] - __rmod__: _SignedIntMod[_NBit1] - __divmod__: _SignedIntDivMod[_NBit1] - __rdivmod__: _SignedIntDivMod[_NBit1] - - -int8 = signedinteger[_8Bit] -int16 = signedinteger[_16Bit] -int32 = signedinteger[_32Bit] -int64 = signedinteger[_64Bit] -byte = signedinteger[_NBitByte] -short = signedinteger[_NBitShort] -intc = signedinteger[_NBitIntC] -intp = signedinteger[_NBitIntP] -int_ = signedinteger[_NBitInt] -longlong = signedinteger[_NBitLongLong] -class timedelta64(generic): - def __init__(self, value: None | int | _CharLike_co | dt.timedelta | timedelta64 = ..., format: _CharLike_co | tuple[_CharLike_co, _IntLike_co] = ..., /) -> None: - ... - - @property - def numerator(self: _ScalarType) -> _ScalarType: - ... - - @property - def denominator(self) -> L[1]: - ... - - def __int__(self) -> int: - ... - - def __float__(self) -> float: - ... - - def __complex__(self) -> complex: - ... - - def __neg__(self: _ArraySelf) -> _ArraySelf: - ... - - def __pos__(self: _ArraySelf) -> _ArraySelf: - ... - - def __abs__(self: _ArraySelf) -> _ArraySelf: - ... - - def __add__(self, other: _TD64Like_co) -> timedelta64: - ... - - def __radd__(self, other: _TD64Like_co) -> timedelta64: - ... - - def __sub__(self, other: _TD64Like_co) -> timedelta64: - ... - - def __rsub__(self, other: _TD64Like_co) -> timedelta64: - ... - - def __mul__(self, other: _FloatLike_co) -> timedelta64: - ... - - def __rmul__(self, other: _FloatLike_co) -> timedelta64: - ... - - __truediv__: _TD64Div[float64] - __floordiv__: _TD64Div[int64] - def __rtruediv__(self, other: timedelta64) -> float64: - ... - - def __rfloordiv__(self, other: timedelta64) -> int64: - ... - - def __mod__(self, other: timedelta64) -> timedelta64: - ... - - def __rmod__(self, other: timedelta64) -> timedelta64: - ... - - def __divmod__(self, other: timedelta64) -> tuple[int64, timedelta64]: - ... - - def __rdivmod__(self, other: timedelta64) -> tuple[int64, timedelta64]: - ... - - __lt__: _ComparisonOp[_TD64Like_co, _ArrayLikeTD64_co] - __le__: _ComparisonOp[_TD64Like_co, _ArrayLikeTD64_co] - __gt__: _ComparisonOp[_TD64Like_co, _ArrayLikeTD64_co] - __ge__: _ComparisonOp[_TD64Like_co, _ArrayLikeTD64_co] - - -class unsignedinteger(integer[_NBit1]): - def __init__(self, value: _IntValue = ..., /) -> None: - ... - - __add__: _UnsignedIntOp[_NBit1] - __radd__: _UnsignedIntOp[_NBit1] - __sub__: _UnsignedIntOp[_NBit1] - __rsub__: _UnsignedIntOp[_NBit1] - __mul__: _UnsignedIntOp[_NBit1] - __rmul__: _UnsignedIntOp[_NBit1] - __floordiv__: _UnsignedIntOp[_NBit1] - __rfloordiv__: _UnsignedIntOp[_NBit1] - __pow__: _UnsignedIntOp[_NBit1] - __rpow__: _UnsignedIntOp[_NBit1] - __lshift__: _UnsignedIntBitOp[_NBit1] - __rlshift__: _UnsignedIntBitOp[_NBit1] - __rshift__: _UnsignedIntBitOp[_NBit1] - __rrshift__: _UnsignedIntBitOp[_NBit1] - __and__: _UnsignedIntBitOp[_NBit1] - __rand__: _UnsignedIntBitOp[_NBit1] - __xor__: _UnsignedIntBitOp[_NBit1] - __rxor__: _UnsignedIntBitOp[_NBit1] - __or__: _UnsignedIntBitOp[_NBit1] - __ror__: _UnsignedIntBitOp[_NBit1] - __mod__: _UnsignedIntMod[_NBit1] - __rmod__: _UnsignedIntMod[_NBit1] - __divmod__: _UnsignedIntDivMod[_NBit1] - __rdivmod__: _UnsignedIntDivMod[_NBit1] - - -uint8 = unsignedinteger[_8Bit] -uint16 = unsignedinteger[_16Bit] -uint32 = unsignedinteger[_32Bit] -uint64 = unsignedinteger[_64Bit] -ubyte = unsignedinteger[_NBitByte] -ushort = unsignedinteger[_NBitShort] -uintc = unsignedinteger[_NBitIntC] -uintp = unsignedinteger[_NBitIntP] -uint = unsignedinteger[_NBitInt] -ulonglong = unsignedinteger[_NBitLongLong] -class inexact(number[_NBit1]): - def __getnewargs__(self: inexact[_64Bit]) -> tuple[float, ...]: - ... - - - -_IntType = TypeVar("_IntType", bound=integer[Any]) -_FloatType = TypeVar('_FloatType', bound=floating[Any]) -class floating(inexact[_NBit1]): - def __init__(self, value: _FloatValue = ..., /) -> None: - ... - - def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> float: - ... - - def tolist(self) -> float: - ... - - def is_integer(self) -> bool: - ... - - def hex(self: float64) -> str: - ... - - @classmethod - def fromhex(cls: type[float64], string: str, /) -> float64: - ... - - def as_integer_ratio(self) -> tuple[int, int]: - ... - - def __ceil__(self: float64) -> int: - ... - - def __floor__(self: float64) -> int: - ... - - def __trunc__(self: float64) -> int: - ... - - def __getnewargs__(self: float64) -> tuple[float]: - ... - - def __getformat__(self: float64, typestr: L["double", "float"], /) -> str: - ... - - @overload - def __round__(self, ndigits: None = ...) -> int: - ... - - @overload - def __round__(self: _ScalarType, ndigits: SupportsIndex) -> _ScalarType: - ... - - __add__: _FloatOp[_NBit1] - __radd__: _FloatOp[_NBit1] - __sub__: _FloatOp[_NBit1] - __rsub__: _FloatOp[_NBit1] - __mul__: _FloatOp[_NBit1] - __rmul__: _FloatOp[_NBit1] - __truediv__: _FloatOp[_NBit1] - __rtruediv__: _FloatOp[_NBit1] - __floordiv__: _FloatOp[_NBit1] - __rfloordiv__: _FloatOp[_NBit1] - __pow__: _FloatOp[_NBit1] - __rpow__: _FloatOp[_NBit1] - __mod__: _FloatMod[_NBit1] - __rmod__: _FloatMod[_NBit1] - __divmod__: _FloatDivMod[_NBit1] - __rdivmod__: _FloatDivMod[_NBit1] - - -float16 = floating[_16Bit] -float32 = floating[_32Bit] -float64 = floating[_64Bit] -half = floating[_NBitHalf] -single = floating[_NBitSingle] -double = floating[_NBitDouble] -float_ = floating[_NBitDouble] -longdouble = floating[_NBitLongDouble] -longfloat = floating[_NBitLongDouble] -class complexfloating(inexact[_NBit1], Generic[_NBit1, _NBit2]): - def __init__(self, value: _ComplexValue = ..., /) -> None: - ... - - def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> complex: - ... - - def tolist(self) -> complex: - ... - - @property - def real(self) -> floating[_NBit1]: - ... - - @property - def imag(self) -> floating[_NBit2]: - ... - - def __abs__(self) -> floating[_NBit1]: - ... - - def __getnewargs__(self: complex128) -> tuple[float, float]: - ... - - __add__: _ComplexOp[_NBit1] - __radd__: _ComplexOp[_NBit1] - __sub__: _ComplexOp[_NBit1] - __rsub__: _ComplexOp[_NBit1] - __mul__: _ComplexOp[_NBit1] - __rmul__: _ComplexOp[_NBit1] - __truediv__: _ComplexOp[_NBit1] - __rtruediv__: _ComplexOp[_NBit1] - __pow__: _ComplexOp[_NBit1] - __rpow__: _ComplexOp[_NBit1] - - -complex64 = complexfloating[_32Bit, _32Bit] -complex128 = complexfloating[_64Bit, _64Bit] -csingle = complexfloating[_NBitSingle, _NBitSingle] -singlecomplex = complexfloating[_NBitSingle, _NBitSingle] -cdouble = complexfloating[_NBitDouble, _NBitDouble] -complex_ = complexfloating[_NBitDouble, _NBitDouble] -cfloat = complexfloating[_NBitDouble, _NBitDouble] -clongdouble = complexfloating[_NBitLongDouble, _NBitLongDouble] -clongfloat = complexfloating[_NBitLongDouble, _NBitLongDouble] -longcomplex = complexfloating[_NBitLongDouble, _NBitLongDouble] -class flexible(generic): - ... - - -class void(flexible): - @overload - def __init__(self, value: _IntLike_co | bytes, /, dtype: None = ...) -> None: - ... - - @overload - def __init__(self, value: Any, /, dtype: _DTypeLikeVoid) -> None: - ... - - @property - def real(self: _ArraySelf) -> _ArraySelf: - ... - - @property - def imag(self: _ArraySelf) -> _ArraySelf: - ... - - def setfield(self, val: ArrayLike, dtype: DTypeLike, offset: int = ...) -> None: - ... - - @overload - def __getitem__(self, key: str | SupportsIndex) -> Any: - ... - - @overload - def __getitem__(self, key: list[str]) -> void: - ... - - def __setitem__(self, key: str | list[str] | SupportsIndex, value: ArrayLike) -> None: - ... - - - -class character(flexible): - def __int__(self) -> int: - ... - - def __float__(self) -> float: - ... - - - -class bytes_(character, bytes): - @overload - def __init__(self, value: object = ..., /) -> None: - ... - - @overload - def __init__(self, value: str, /, encoding: str = ..., errors: str = ...) -> None: - ... - - def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> bytes: - ... - - def tolist(self) -> bytes: - ... - - - -string_ = bytes_ -class str_(character, str): - @overload - def __init__(self, value: object = ..., /) -> None: - ... - - @overload - def __init__(self, value: bytes, /, encoding: str = ..., errors: str = ...) -> None: - ... - - def item(self, args: L[0] | tuple[()] | tuple[L[0]] = ..., /) -> str: - ... - - def tolist(self) -> str: - ... - - - -unicode_ = str_ -Inf: Final[float] -Infinity: Final[float] -NAN: Final[float] -NINF: Final[float] -NZERO: Final[float] -NaN: Final[float] -PINF: Final[float] -PZERO: Final[float] -e: Final[float] -euler_gamma: Final[float] -inf: Final[float] -infty: Final[float] -nan: Final[float] -pi: Final[float] -ERR_IGNORE: L[0] -ERR_WARN: L[1] -ERR_RAISE: L[2] -ERR_CALL: L[3] -ERR_PRINT: L[4] -ERR_LOG: L[5] -ERR_DEFAULT: L[521] -SHIFT_DIVIDEBYZERO: L[0] -SHIFT_OVERFLOW: L[3] -SHIFT_UNDERFLOW: L[6] -SHIFT_INVALID: L[9] -FPE_DIVIDEBYZERO: L[1] -FPE_OVERFLOW: L[2] -FPE_UNDERFLOW: L[4] -FPE_INVALID: L[8] -FLOATING_POINT_SUPPORT: L[1] -UFUNC_BUFSIZE_DEFAULT = ... -little_endian: Final[bool] -True_: Final[bool_] -False_: Final[bool_] -UFUNC_PYVALS_NAME: L["UFUNC_PYVALS"] -newaxis: None -@final -class ufunc: - @property - def __name__(self) -> str: - ... - - @property - def __doc__(self) -> str: - ... - - __call__: Callable[..., Any] - @property - def nin(self) -> int: - ... - - @property - def nout(self) -> int: - ... - - @property - def nargs(self) -> int: - ... - - @property - def ntypes(self) -> int: - ... - - @property - def types(self) -> list[str]: - ... - - @property - def identity(self) -> Any: - ... - - @property - def signature(self) -> None | str: - ... - - reduce: Any - accumulate: Any - reduceat: Any - outer: Any - at: Any - - -absolute: _UFunc_Nin1_Nout1[L['absolute'], L[20], None] -add: _UFunc_Nin2_Nout1[L['add'], L[22], L[0]] -arccos: _UFunc_Nin1_Nout1[L['arccos'], L[8], None] -arccosh: _UFunc_Nin1_Nout1[L['arccosh'], L[8], None] -arcsin: _UFunc_Nin1_Nout1[L['arcsin'], L[8], None] -arcsinh: _UFunc_Nin1_Nout1[L['arcsinh'], L[8], None] -arctan2: _UFunc_Nin2_Nout1[L['arctan2'], L[5], None] -arctan: _UFunc_Nin1_Nout1[L['arctan'], L[8], None] -arctanh: _UFunc_Nin1_Nout1[L['arctanh'], L[8], None] -bitwise_and: _UFunc_Nin2_Nout1[L['bitwise_and'], L[12], L[-1]] -bitwise_not: _UFunc_Nin1_Nout1[L['invert'], L[12], None] -bitwise_or: _UFunc_Nin2_Nout1[L['bitwise_or'], L[12], L[0]] -bitwise_xor: _UFunc_Nin2_Nout1[L['bitwise_xor'], L[12], L[0]] -cbrt: _UFunc_Nin1_Nout1[L['cbrt'], L[5], None] -ceil: _UFunc_Nin1_Nout1[L['ceil'], L[7], None] -conj: _UFunc_Nin1_Nout1[L['conjugate'], L[18], None] -conjugate: _UFunc_Nin1_Nout1[L['conjugate'], L[18], None] -copysign: _UFunc_Nin2_Nout1[L['copysign'], L[4], None] -cos: _UFunc_Nin1_Nout1[L['cos'], L[9], None] -cosh: _UFunc_Nin1_Nout1[L['cosh'], L[8], None] -deg2rad: _UFunc_Nin1_Nout1[L['deg2rad'], L[5], None] -degrees: _UFunc_Nin1_Nout1[L['degrees'], L[5], None] -divide: _UFunc_Nin2_Nout1[L['true_divide'], L[11], None] -divmod: _UFunc_Nin2_Nout2[L['divmod'], L[15], None] -equal: _UFunc_Nin2_Nout1[L['equal'], L[23], None] -exp2: _UFunc_Nin1_Nout1[L['exp2'], L[8], None] -exp: _UFunc_Nin1_Nout1[L['exp'], L[10], None] -expm1: _UFunc_Nin1_Nout1[L['expm1'], L[8], None] -fabs: _UFunc_Nin1_Nout1[L['fabs'], L[5], None] -float_power: _UFunc_Nin2_Nout1[L['float_power'], L[4], None] -floor: _UFunc_Nin1_Nout1[L['floor'], L[7], None] -floor_divide: _UFunc_Nin2_Nout1[L['floor_divide'], L[21], None] -fmax: _UFunc_Nin2_Nout1[L['fmax'], L[21], None] -fmin: _UFunc_Nin2_Nout1[L['fmin'], L[21], None] -fmod: _UFunc_Nin2_Nout1[L['fmod'], L[15], None] -frexp: _UFunc_Nin1_Nout2[L['frexp'], L[4], None] -gcd: _UFunc_Nin2_Nout1[L['gcd'], L[11], L[0]] -greater: _UFunc_Nin2_Nout1[L['greater'], L[23], None] -greater_equal: _UFunc_Nin2_Nout1[L['greater_equal'], L[23], None] -heaviside: _UFunc_Nin2_Nout1[L['heaviside'], L[4], None] -hypot: _UFunc_Nin2_Nout1[L['hypot'], L[5], L[0]] -invert: _UFunc_Nin1_Nout1[L['invert'], L[12], None] -isfinite: _UFunc_Nin1_Nout1[L['isfinite'], L[20], None] -isinf: _UFunc_Nin1_Nout1[L['isinf'], L[20], None] -isnan: _UFunc_Nin1_Nout1[L['isnan'], L[20], None] -isnat: _UFunc_Nin1_Nout1[L['isnat'], L[2], None] -lcm: _UFunc_Nin2_Nout1[L['lcm'], L[11], None] -ldexp: _UFunc_Nin2_Nout1[L['ldexp'], L[8], None] -left_shift: _UFunc_Nin2_Nout1[L['left_shift'], L[11], None] -less: _UFunc_Nin2_Nout1[L['less'], L[23], None] -less_equal: _UFunc_Nin2_Nout1[L['less_equal'], L[23], None] -log10: _UFunc_Nin1_Nout1[L['log10'], L[8], None] -log1p: _UFunc_Nin1_Nout1[L['log1p'], L[8], None] -log2: _UFunc_Nin1_Nout1[L['log2'], L[8], None] -log: _UFunc_Nin1_Nout1[L['log'], L[10], None] -logaddexp2: _UFunc_Nin2_Nout1[L['logaddexp2'], L[4], float] -logaddexp: _UFunc_Nin2_Nout1[L['logaddexp'], L[4], float] -logical_and: _UFunc_Nin2_Nout1[L['logical_and'], L[20], L[True]] -logical_not: _UFunc_Nin1_Nout1[L['logical_not'], L[20], None] -logical_or: _UFunc_Nin2_Nout1[L['logical_or'], L[20], L[False]] -logical_xor: _UFunc_Nin2_Nout1[L['logical_xor'], L[19], L[False]] -matmul: _GUFunc_Nin2_Nout1[L['matmul'], L[19], None] -maximum: _UFunc_Nin2_Nout1[L['maximum'], L[21], None] -minimum: _UFunc_Nin2_Nout1[L['minimum'], L[21], None] -mod: _UFunc_Nin2_Nout1[L['remainder'], L[16], None] -modf: _UFunc_Nin1_Nout2[L['modf'], L[4], None] -multiply: _UFunc_Nin2_Nout1[L['multiply'], L[23], L[1]] -negative: _UFunc_Nin1_Nout1[L['negative'], L[19], None] -nextafter: _UFunc_Nin2_Nout1[L['nextafter'], L[4], None] -not_equal: _UFunc_Nin2_Nout1[L['not_equal'], L[23], None] -positive: _UFunc_Nin1_Nout1[L['positive'], L[19], None] -power: _UFunc_Nin2_Nout1[L['power'], L[18], None] -rad2deg: _UFunc_Nin1_Nout1[L['rad2deg'], L[5], None] -radians: _UFunc_Nin1_Nout1[L['radians'], L[5], None] -reciprocal: _UFunc_Nin1_Nout1[L['reciprocal'], L[18], None] -remainder: _UFunc_Nin2_Nout1[L['remainder'], L[16], None] -right_shift: _UFunc_Nin2_Nout1[L['right_shift'], L[11], None] -rint: _UFunc_Nin1_Nout1[L['rint'], L[10], None] -sign: _UFunc_Nin1_Nout1[L['sign'], L[19], None] -signbit: _UFunc_Nin1_Nout1[L['signbit'], L[4], None] -sin: _UFunc_Nin1_Nout1[L['sin'], L[9], None] -sinh: _UFunc_Nin1_Nout1[L['sinh'], L[8], None] -spacing: _UFunc_Nin1_Nout1[L['spacing'], L[4], None] -sqrt: _UFunc_Nin1_Nout1[L['sqrt'], L[10], None] -square: _UFunc_Nin1_Nout1[L['square'], L[18], None] -subtract: _UFunc_Nin2_Nout1[L['subtract'], L[21], None] -tan: _UFunc_Nin1_Nout1[L['tan'], L[8], None] -tanh: _UFunc_Nin1_Nout1[L['tanh'], L[8], None] -true_divide: _UFunc_Nin2_Nout1[L['true_divide'], L[11], None] -trunc: _UFunc_Nin1_Nout1[L['trunc'], L[7], None] -abs = ... -class _CopyMode(enum.Enum): - ALWAYS: L[True] - IF_NEEDED: L[False] - NEVER: L[2] - ... - - -class RankWarning(UserWarning): - ... - - -_CallType = TypeVar("_CallType", bound=_ErrFunc | _SupportsWrite[str]) -class errstate(Generic[_CallType], ContextDecorator): - call: _CallType - kwargs: _ErrDictOptional - def __init__(self, *, call: _CallType = ..., all: None | _ErrKind = ..., divide: None | _ErrKind = ..., over: None | _ErrKind = ..., under: None | _ErrKind = ..., invalid: None | _ErrKind = ...) -> None: - ... - - def __enter__(self) -> None: - ... - - def __exit__(self, exc_type: None | type[BaseException], exc_value: None | BaseException, traceback: None | TracebackType, /) -> None: - ... - - - -class ndenumerate(Generic[_ScalarType]): - iter: flatiter[NDArray[_ScalarType]] - @overload - def __new__(cls, arr: _FiniteNestedSequence[_SupportsArray[dtype[_ScalarType]]]) -> ndenumerate[_ScalarType]: - ... - - @overload - def __new__(cls, arr: str | _NestedSequence[str]) -> ndenumerate[str_]: - ... - - @overload - def __new__(cls, arr: bytes | _NestedSequence[bytes]) -> ndenumerate[bytes_]: - ... - - @overload - def __new__(cls, arr: bool | _NestedSequence[bool]) -> ndenumerate[bool_]: - ... - - @overload - def __new__(cls, arr: int | _NestedSequence[int]) -> ndenumerate[int_]: - ... - - @overload - def __new__(cls, arr: float | _NestedSequence[float]) -> ndenumerate[float_]: - ... - - @overload - def __new__(cls, arr: complex | _NestedSequence[complex]) -> ndenumerate[complex_]: - ... - - def __next__(self: ndenumerate[_ScalarType]) -> tuple[_Shape, _ScalarType]: - ... - - def __iter__(self: _T) -> _T: - ... - - - -class ndindex: - @overload - def __init__(self, shape: tuple[SupportsIndex, ...], /) -> None: - ... - - @overload - def __init__(self, *shape: SupportsIndex) -> None: - ... - - def __iter__(self: _T) -> _T: - ... - - def __next__(self) -> _Shape: - ... - - - -class DataSource: - def __init__(self, destpath: None | str | os.PathLike[str] = ...) -> None: - ... - - def __del__(self) -> None: - ... - - def abspath(self, path: str) -> str: - ... - - def exists(self, path: str) -> bool: - ... - - def open(self, path: str, mode: str = ..., encoding: None | str = ..., newline: None | str = ...) -> IO[Any]: - ... - - - -@final -class broadcast: - def __new__(cls, *args: ArrayLike) -> broadcast: - ... - - @property - def index(self) -> int: - ... - - @property - def iters(self) -> tuple[flatiter[Any], ...]: - ... - - @property - def nd(self) -> int: - ... - - @property - def ndim(self) -> int: - ... - - @property - def numiter(self) -> int: - ... - - @property - def shape(self) -> _Shape: - ... - - @property - def size(self) -> int: - ... - - def __next__(self) -> tuple[Any, ...]: - ... - - def __iter__(self: _T) -> _T: - ... - - def reset(self) -> None: - ... - - - -@final -class busdaycalendar: - def __new__(cls, weekmask: ArrayLike = ..., holidays: ArrayLike | dt.date | _NestedSequence[dt.date] = ...) -> busdaycalendar: - ... - - @property - def weekmask(self) -> NDArray[bool_]: - ... - - @property - def holidays(self) -> NDArray[datetime64]: - ... - - - -class finfo(Generic[_FloatType]): - dtype: dtype[_FloatType] - bits: int - eps: _FloatType - epsneg: _FloatType - iexp: int - machep: int - max: _FloatType - maxexp: int - min: _FloatType - minexp: int - negep: int - nexp: int - nmant: int - precision: int - resolution: _FloatType - smallest_subnormal: _FloatType - @property - def smallest_normal(self) -> _FloatType: - ... - - @property - def tiny(self) -> _FloatType: - ... - - @overload - def __new__(cls, dtype: inexact[_NBit1] | _DTypeLike[inexact[_NBit1]]) -> finfo[floating[_NBit1]]: - ... - - @overload - def __new__(cls, dtype: complex | float | type[complex] | type[float]) -> finfo[float_]: - ... - - @overload - def __new__(cls, dtype: str) -> finfo[floating[Any]]: - ... - - - -class iinfo(Generic[_IntType]): - dtype: dtype[_IntType] - kind: str - bits: int - key: str - @property - def min(self) -> int: - ... - - @property - def max(self) -> int: - ... - - @overload - def __new__(cls, dtype: _IntType | _DTypeLike[_IntType]) -> iinfo[_IntType]: - ... - - @overload - def __new__(cls, dtype: int | type[int]) -> iinfo[int_]: - ... - - @overload - def __new__(cls, dtype: str) -> iinfo[Any]: - ... - - - -class format_parser: - dtype: dtype[void] - def __init__(self, formats: DTypeLike, names: None | str | Sequence[str], titles: None | str | Sequence[str], aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> None: - ... - - - -class recarray(ndarray[_ShapeType, _DType_co]): - @overload - def __new__(subtype, shape: _ShapeLike, dtype: None = ..., buf: None | _SupportsBuffer = ..., offset: SupportsIndex = ..., strides: None | _ShapeLike = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., byteorder: None | _ByteOrder = ..., aligned: bool = ..., order: _OrderKACF = ...) -> recarray[Any, dtype[record]]: - ... - - @overload - def __new__(subtype, shape: _ShapeLike, dtype: DTypeLike, buf: None | _SupportsBuffer = ..., offset: SupportsIndex = ..., strides: None | _ShapeLike = ..., formats: None = ..., names: None = ..., titles: None = ..., byteorder: None = ..., aligned: L[False] = ..., order: _OrderKACF = ...) -> recarray[Any, dtype[Any]]: - ... - - def __array_finalize__(self, obj: object) -> None: - ... - - def __getattribute__(self, attr: str) -> Any: - ... - - def __setattr__(self, attr: str, val: ArrayLike) -> None: - ... - - @overload - def __getitem__(self, indx: (SupportsIndex | _ArrayLikeInt_co | tuple[SupportsIndex | _ArrayLikeInt_co, ...])) -> Any: - ... - - @overload - def __getitem__(self: recarray[Any, dtype[void]], indx: (None | slice | ellipsis | SupportsIndex | _ArrayLikeInt_co | tuple[None | slice | ellipsis | _ArrayLikeInt_co | SupportsIndex, ...])) -> recarray[Any, _DType_co]: - ... - - @overload - def __getitem__(self, indx: (None | slice | ellipsis | SupportsIndex | _ArrayLikeInt_co | tuple[None | slice | ellipsis | _ArrayLikeInt_co | SupportsIndex, ...])) -> ndarray[Any, _DType_co]: - ... - - @overload - def __getitem__(self, indx: str) -> NDArray[Any]: - ... - - @overload - def __getitem__(self, indx: list[str]) -> recarray[_ShapeType, dtype[record]]: - ... - - @overload - def field(self, attr: int | str, val: None = ...) -> Any: - ... - - @overload - def field(self, attr: int | str, val: ArrayLike) -> None: - ... - - - -class record(void): - def __getattribute__(self, attr: str) -> Any: - ... - - def __setattr__(self, attr: str, val: ArrayLike) -> None: - ... - - def pprint(self) -> str: - ... - - @overload - def __getitem__(self, key: str | SupportsIndex) -> Any: - ... - - @overload - def __getitem__(self, key: list[str]) -> record: - ... - - - -_NDIterFlagsKind = L["buffered", "c_index", "copy_if_overlap", "common_dtype", "delay_bufalloc", "external_loop", "f_index", "grow_inner", "growinner", "multi_index", "ranged", "refs_ok", "reduce_ok", "zerosize_ok",] -_NDIterOpFlagsKind = L["aligned", "allocate", "arraymask", "copy", "config", "nbo", "no_subtype", "no_broadcast", "overlap_assume_elementwise", "readonly", "readwrite", "updateifcopy", "virtual", "writeonly", "writemasked"] -@final -class nditer: - def __new__(cls, op: ArrayLike | Sequence[ArrayLike], flags: None | Sequence[_NDIterFlagsKind] = ..., op_flags: None | Sequence[Sequence[_NDIterOpFlagsKind]] = ..., op_dtypes: DTypeLike | Sequence[DTypeLike] = ..., order: _OrderKACF = ..., casting: _CastingKind = ..., op_axes: None | Sequence[Sequence[SupportsIndex]] = ..., itershape: None | _ShapeLike = ..., buffersize: SupportsIndex = ...) -> nditer: - ... - - def __enter__(self) -> nditer: - ... - - def __exit__(self, exc_type: None | type[BaseException], exc_value: None | BaseException, traceback: None | TracebackType) -> None: - ... - - def __iter__(self) -> nditer: - ... - - def __next__(self) -> tuple[NDArray[Any], ...]: - ... - - def __len__(self) -> int: - ... - - def __copy__(self) -> nditer: - ... - - @overload - def __getitem__(self, index: SupportsIndex) -> NDArray[Any]: - ... - - @overload - def __getitem__(self, index: slice) -> tuple[NDArray[Any], ...]: - ... - - def __setitem__(self, index: slice | SupportsIndex, value: ArrayLike) -> None: - ... - - def close(self) -> None: - ... - - def copy(self) -> nditer: - ... - - def debug_print(self) -> None: - ... - - def enable_external_loop(self) -> None: - ... - - def iternext(self) -> bool: - ... - - def remove_axis(self, i: SupportsIndex, /) -> None: - ... - - def remove_multi_index(self) -> None: - ... - - def reset(self) -> None: - ... - - @property - def dtypes(self) -> tuple[dtype[Any], ...]: - ... - - @property - def finished(self) -> bool: - ... - - @property - def has_delayed_bufalloc(self) -> bool: - ... - - @property - def has_index(self) -> bool: - ... - - @property - def has_multi_index(self) -> bool: - ... - - @property - def index(self) -> int: - ... - - @property - def iterationneedsapi(self) -> bool: - ... - - @property - def iterindex(self) -> int: - ... - - @property - def iterrange(self) -> tuple[int, ...]: - ... - - @property - def itersize(self) -> int: - ... - - @property - def itviews(self) -> tuple[NDArray[Any], ...]: - ... - - @property - def multi_index(self) -> tuple[int, ...]: - ... - - @property - def ndim(self) -> int: - ... - - @property - def nop(self) -> int: - ... - - @property - def operands(self) -> tuple[NDArray[Any], ...]: - ... - - @property - def shape(self) -> tuple[int, ...]: - ... - - @property - def value(self) -> tuple[NDArray[Any], ...]: - ... - - - -_MemMapModeKind = L["readonly", "r", "copyonwrite", "c", "readwrite", "r+", "write", "w+",] -class memmap(ndarray[_ShapeType, _DType_co]): - __array_priority__: ClassVar[float] - filename: str | None - offset: int - mode: str - @overload - def __new__(subtype, filename: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _MemMapIOProtocol, dtype: type[uint8] = ..., mode: _MemMapModeKind = ..., offset: int = ..., shape: None | int | tuple[int, ...] = ..., order: _OrderKACF = ...) -> memmap[Any, dtype[uint8]]: - ... - - @overload - def __new__(subtype, filename: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _MemMapIOProtocol, dtype: _DTypeLike[_ScalarType], mode: _MemMapModeKind = ..., offset: int = ..., shape: None | int | tuple[int, ...] = ..., order: _OrderKACF = ...) -> memmap[Any, dtype[_ScalarType]]: - ... - - @overload - def __new__(subtype, filename: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _MemMapIOProtocol, dtype: DTypeLike, mode: _MemMapModeKind = ..., offset: int = ..., shape: None | int | tuple[int, ...] = ..., order: _OrderKACF = ...) -> memmap[Any, dtype[Any]]: - ... - - def __array_finalize__(self, obj: object) -> None: - ... - - def __array_wrap__(self, array: memmap[_ShapeType, _DType_co], context: None | tuple[ufunc, tuple[Any, ...], int] = ...) -> Any: - ... - - def flush(self) -> None: - ... - - - -class vectorize: - pyfunc: Callable[..., Any] - cache: bool - signature: None | str - otypes: None | str - excluded: set[int | str] - __doc__: None | str - def __init__(self, pyfunc: Callable[..., Any], otypes: None | str | Iterable[DTypeLike] = ..., doc: None | str = ..., excluded: None | Iterable[int | str] = ..., cache: bool = ..., signature: None | str = ...) -> None: - ... - - def __call__(self, *args: Any, **kwargs: Any) -> Any: - ... - - - -class poly1d: - @property - def variable(self) -> str: - ... - - @property - def order(self) -> int: - ... - - @property - def o(self) -> int: - ... - - @property - def roots(self) -> NDArray[Any]: - ... - - @property - def r(self) -> NDArray[Any]: - ... - - @property - def coeffs(self) -> NDArray[Any]: - ... - - @coeffs.setter - def coeffs(self, value: NDArray[Any]) -> None: - ... - - @property - def c(self) -> NDArray[Any]: - ... - - @c.setter - def c(self, value: NDArray[Any]) -> None: - ... - - @property - def coef(self) -> NDArray[Any]: - ... - - @coef.setter - def coef(self, value: NDArray[Any]) -> None: - ... - - @property - def coefficients(self) -> NDArray[Any]: - ... - - @coefficients.setter - def coefficients(self, value: NDArray[Any]) -> None: - ... - - __hash__: ClassVar[None] - @overload - def __array__(self, t: None = ...) -> NDArray[Any]: - ... - - @overload - def __array__(self, t: _DType) -> ndarray[Any, _DType]: - ... - - @overload - def __call__(self, val: _ScalarLike_co) -> Any: - ... - - @overload - def __call__(self, val: poly1d) -> poly1d: - ... - - @overload - def __call__(self, val: ArrayLike) -> NDArray[Any]: - ... - - def __init__(self, c_or_r: ArrayLike, r: bool = ..., variable: None | str = ...) -> None: - ... - - def __len__(self) -> int: - ... - - def __neg__(self) -> poly1d: - ... - - def __pos__(self) -> poly1d: - ... - - def __mul__(self, other: ArrayLike) -> poly1d: - ... - - def __rmul__(self, other: ArrayLike) -> poly1d: - ... - - def __add__(self, other: ArrayLike) -> poly1d: - ... - - def __radd__(self, other: ArrayLike) -> poly1d: - ... - - def __pow__(self, val: _FloatLike_co) -> poly1d: - ... - - def __sub__(self, other: ArrayLike) -> poly1d: - ... - - def __rsub__(self, other: ArrayLike) -> poly1d: - ... - - def __div__(self, other: ArrayLike) -> poly1d: - ... - - def __truediv__(self, other: ArrayLike) -> poly1d: - ... - - def __rdiv__(self, other: ArrayLike) -> poly1d: - ... - - def __rtruediv__(self, other: ArrayLike) -> poly1d: - ... - - def __getitem__(self, val: int) -> Any: - ... - - def __setitem__(self, key: int, val: Any) -> None: - ... - - def __iter__(self) -> Iterator[Any]: - ... - - def deriv(self, m: SupportsInt | SupportsIndex = ...) -> poly1d: - ... - - def integ(self, m: SupportsInt | SupportsIndex = ..., k: None | _ArrayLikeComplex_co | _ArrayLikeObject_co = ...) -> poly1d: - ... - - - -class matrix(ndarray[_ShapeType, _DType_co]): - __array_priority__: ClassVar[float] - def __new__(subtype, data: ArrayLike, dtype: DTypeLike = ..., copy: bool = ...) -> matrix[Any, Any]: - ... - - def __array_finalize__(self, obj: object) -> None: - ... - - @overload - def __getitem__(self, key: (SupportsIndex | _ArrayLikeInt_co | tuple[SupportsIndex | _ArrayLikeInt_co, ...])) -> Any: - ... - - @overload - def __getitem__(self, key: (None | slice | ellipsis | SupportsIndex | _ArrayLikeInt_co | tuple[None | slice | ellipsis | _ArrayLikeInt_co | SupportsIndex, ...])) -> matrix[Any, _DType_co]: - ... - - @overload - def __getitem__(self: NDArray[void], key: str) -> matrix[Any, dtype[Any]]: - ... - - @overload - def __getitem__(self: NDArray[void], key: list[str]) -> matrix[_ShapeType, dtype[void]]: - ... - - def __mul__(self, other: ArrayLike) -> matrix[Any, Any]: - ... - - def __rmul__(self, other: ArrayLike) -> matrix[Any, Any]: - ... - - def __imul__(self, other: ArrayLike) -> matrix[_ShapeType, _DType_co]: - ... - - def __pow__(self, other: ArrayLike) -> matrix[Any, Any]: - ... - - def __ipow__(self, other: ArrayLike) -> matrix[_ShapeType, _DType_co]: - ... - - @overload - def sum(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: - ... - - @overload - def sum(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[Any, Any]: - ... - - @overload - def sum(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def mean(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: - ... - - @overload - def mean(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[Any, Any]: - ... - - @overload - def mean(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def std(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> Any: - ... - - @overload - def std(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> matrix[Any, Any]: - ... - - @overload - def std(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., ddof: float = ...) -> _NdArraySubClass: - ... - - @overload - def var(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> Any: - ... - - @overload - def var(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ..., ddof: float = ...) -> matrix[Any, Any]: - ... - - @overload - def var(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ..., ddof: float = ...) -> _NdArraySubClass: - ... - - @overload - def prod(self, axis: None = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: - ... - - @overload - def prod(self, axis: _ShapeLike, dtype: DTypeLike = ..., out: None = ...) -> matrix[Any, Any]: - ... - - @overload - def prod(self, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def any(self, axis: None = ..., out: None = ...) -> bool_: - ... - - @overload - def any(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[bool_]]: - ... - - @overload - def any(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def all(self, axis: None = ..., out: None = ...) -> bool_: - ... - - @overload - def all(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[bool_]]: - ... - - @overload - def all(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def max(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> _ScalarType: - ... - - @overload - def max(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, _DType_co]: - ... - - @overload - def max(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def min(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> _ScalarType: - ... - - @overload - def min(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, _DType_co]: - ... - - @overload - def min(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def argmax(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> intp: - ... - - @overload - def argmax(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[intp]]: - ... - - @overload - def argmax(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def argmin(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> intp: - ... - - @overload - def argmin(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, dtype[intp]]: - ... - - @overload - def argmin(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - @overload - def ptp(self: NDArray[_ScalarType], axis: None = ..., out: None = ...) -> _ScalarType: - ... - - @overload - def ptp(self, axis: _ShapeLike, out: None = ...) -> matrix[Any, _DType_co]: - ... - - @overload - def ptp(self, axis: None | _ShapeLike = ..., out: _NdArraySubClass = ...) -> _NdArraySubClass: - ... - - def squeeze(self, axis: None | _ShapeLike = ...) -> matrix[Any, _DType_co]: - ... - - def tolist(self: matrix[Any, dtype[_SupportsItem[_T]]]) -> list[list[_T]]: - ... - - def ravel(self, order: _OrderKACF = ...) -> matrix[Any, _DType_co]: - ... - - def flatten(self, order: _OrderKACF = ...) -> matrix[Any, _DType_co]: - ... - - @property - def T(self) -> matrix[Any, _DType_co]: - ... - - @property - def I(self) -> matrix[Any, Any]: - ... - - @property - def A(self) -> ndarray[_ShapeType, _DType_co]: - ... - - @property - def A1(self) -> ndarray[Any, _DType_co]: - ... - - @property - def H(self) -> matrix[Any, _DType_co]: - ... - - def getT(self) -> matrix[Any, _DType_co]: - ... - - def getI(self) -> matrix[Any, Any]: - ... - - def getA(self) -> ndarray[_ShapeType, _DType_co]: - ... - - def getA1(self) -> ndarray[Any, _DType_co]: - ... - - def getH(self) -> matrix[Any, _DType_co]: - ... - - - -_CharType = TypeVar("_CharType", str_, bytes_) -_CharDType = TypeVar("_CharDType", dtype[str_], dtype[bytes_]) -_CharArray = chararray[Any, dtype[_CharType]] -class chararray(ndarray[_ShapeType, _CharDType]): - @overload - def __new__(subtype, shape: _ShapeLike, itemsize: SupportsIndex | SupportsInt = ..., unicode: L[False] = ..., buffer: _SupportsBuffer = ..., offset: SupportsIndex = ..., strides: _ShapeLike = ..., order: _OrderKACF = ...) -> chararray[Any, dtype[bytes_]]: - ... - - @overload - def __new__(subtype, shape: _ShapeLike, itemsize: SupportsIndex | SupportsInt = ..., unicode: L[True] = ..., buffer: _SupportsBuffer = ..., offset: SupportsIndex = ..., strides: _ShapeLike = ..., order: _OrderKACF = ...) -> chararray[Any, dtype[str_]]: - ... - - def __array_finalize__(self, obj: object) -> None: - ... - - def __mul__(self, other: _ArrayLikeInt_co) -> chararray[Any, _CharDType]: - ... - - def __rmul__(self, other: _ArrayLikeInt_co) -> chararray[Any, _CharDType]: - ... - - def __mod__(self, i: Any) -> chararray[Any, _CharDType]: - ... - - @overload - def __eq__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> NDArray[bool_]: - ... - - @overload - def __eq__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> NDArray[bool_]: - ... - - @overload - def __ne__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> NDArray[bool_]: - ... - - @overload - def __ne__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> NDArray[bool_]: - ... - - @overload - def __ge__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> NDArray[bool_]: - ... - - @overload - def __ge__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> NDArray[bool_]: - ... - - @overload - def __le__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> NDArray[bool_]: - ... - - @overload - def __le__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> NDArray[bool_]: - ... - - @overload - def __gt__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> NDArray[bool_]: - ... - - @overload - def __gt__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> NDArray[bool_]: - ... - - @overload - def __lt__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> NDArray[bool_]: - ... - - @overload - def __lt__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> NDArray[bool_]: - ... - - @overload - def __add__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> _CharArray[str_]: - ... - - @overload - def __add__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> _CharArray[bytes_]: - ... - - @overload - def __radd__(self: _CharArray[str_], other: _ArrayLikeStr_co) -> _CharArray[str_]: - ... - - @overload - def __radd__(self: _CharArray[bytes_], other: _ArrayLikeBytes_co) -> _CharArray[bytes_]: - ... - - @overload - def center(self: _CharArray[str_], width: _ArrayLikeInt_co, fillchar: _ArrayLikeStr_co = ...) -> _CharArray[str_]: - ... - - @overload - def center(self: _CharArray[bytes_], width: _ArrayLikeInt_co, fillchar: _ArrayLikeBytes_co = ...) -> _CharArray[bytes_]: - ... - - @overload - def count(self: _CharArray[str_], sub: _ArrayLikeStr_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def count(self: _CharArray[bytes_], sub: _ArrayLikeBytes_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - def decode(self: _CharArray[bytes_], encoding: None | str = ..., errors: None | str = ...) -> _CharArray[str_]: - ... - - def encode(self: _CharArray[str_], encoding: None | str = ..., errors: None | str = ...) -> _CharArray[bytes_]: - ... - - @overload - def endswith(self: _CharArray[str_], suffix: _ArrayLikeStr_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[bool_]: - ... - - @overload - def endswith(self: _CharArray[bytes_], suffix: _ArrayLikeBytes_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[bool_]: - ... - - def expandtabs(self, tabsize: _ArrayLikeInt_co = ...) -> chararray[Any, _CharDType]: - ... - - @overload - def find(self: _CharArray[str_], sub: _ArrayLikeStr_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def find(self: _CharArray[bytes_], sub: _ArrayLikeBytes_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def index(self: _CharArray[str_], sub: _ArrayLikeStr_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def index(self: _CharArray[bytes_], sub: _ArrayLikeBytes_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def join(self: _CharArray[str_], seq: _ArrayLikeStr_co) -> _CharArray[str_]: - ... - - @overload - def join(self: _CharArray[bytes_], seq: _ArrayLikeBytes_co) -> _CharArray[bytes_]: - ... - - @overload - def ljust(self: _CharArray[str_], width: _ArrayLikeInt_co, fillchar: _ArrayLikeStr_co = ...) -> _CharArray[str_]: - ... - - @overload - def ljust(self: _CharArray[bytes_], width: _ArrayLikeInt_co, fillchar: _ArrayLikeBytes_co = ...) -> _CharArray[bytes_]: - ... - - @overload - def lstrip(self: _CharArray[str_], chars: None | _ArrayLikeStr_co = ...) -> _CharArray[str_]: - ... - - @overload - def lstrip(self: _CharArray[bytes_], chars: None | _ArrayLikeBytes_co = ...) -> _CharArray[bytes_]: - ... - - @overload - def partition(self: _CharArray[str_], sep: _ArrayLikeStr_co) -> _CharArray[str_]: - ... - - @overload - def partition(self: _CharArray[bytes_], sep: _ArrayLikeBytes_co) -> _CharArray[bytes_]: - ... - - @overload - def replace(self: _CharArray[str_], old: _ArrayLikeStr_co, new: _ArrayLikeStr_co, count: None | _ArrayLikeInt_co = ...) -> _CharArray[str_]: - ... - - @overload - def replace(self: _CharArray[bytes_], old: _ArrayLikeBytes_co, new: _ArrayLikeBytes_co, count: None | _ArrayLikeInt_co = ...) -> _CharArray[bytes_]: - ... - - @overload - def rfind(self: _CharArray[str_], sub: _ArrayLikeStr_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def rfind(self: _CharArray[bytes_], sub: _ArrayLikeBytes_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def rindex(self: _CharArray[str_], sub: _ArrayLikeStr_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def rindex(self: _CharArray[bytes_], sub: _ArrayLikeBytes_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[int_]: - ... - - @overload - def rjust(self: _CharArray[str_], width: _ArrayLikeInt_co, fillchar: _ArrayLikeStr_co = ...) -> _CharArray[str_]: - ... - - @overload - def rjust(self: _CharArray[bytes_], width: _ArrayLikeInt_co, fillchar: _ArrayLikeBytes_co = ...) -> _CharArray[bytes_]: - ... - - @overload - def rpartition(self: _CharArray[str_], sep: _ArrayLikeStr_co) -> _CharArray[str_]: - ... - - @overload - def rpartition(self: _CharArray[bytes_], sep: _ArrayLikeBytes_co) -> _CharArray[bytes_]: - ... - - @overload - def rsplit(self: _CharArray[str_], sep: None | _ArrayLikeStr_co = ..., maxsplit: None | _ArrayLikeInt_co = ...) -> NDArray[object_]: - ... - - @overload - def rsplit(self: _CharArray[bytes_], sep: None | _ArrayLikeBytes_co = ..., maxsplit: None | _ArrayLikeInt_co = ...) -> NDArray[object_]: - ... - - @overload - def rstrip(self: _CharArray[str_], chars: None | _ArrayLikeStr_co = ...) -> _CharArray[str_]: - ... - - @overload - def rstrip(self: _CharArray[bytes_], chars: None | _ArrayLikeBytes_co = ...) -> _CharArray[bytes_]: - ... - - @overload - def split(self: _CharArray[str_], sep: None | _ArrayLikeStr_co = ..., maxsplit: None | _ArrayLikeInt_co = ...) -> NDArray[object_]: - ... - - @overload - def split(self: _CharArray[bytes_], sep: None | _ArrayLikeBytes_co = ..., maxsplit: None | _ArrayLikeInt_co = ...) -> NDArray[object_]: - ... - - def splitlines(self, keepends: None | _ArrayLikeBool_co = ...) -> NDArray[object_]: - ... - - @overload - def startswith(self: _CharArray[str_], prefix: _ArrayLikeStr_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[bool_]: - ... - - @overload - def startswith(self: _CharArray[bytes_], prefix: _ArrayLikeBytes_co, start: _ArrayLikeInt_co = ..., end: None | _ArrayLikeInt_co = ...) -> NDArray[bool_]: - ... - - @overload - def strip(self: _CharArray[str_], chars: None | _ArrayLikeStr_co = ...) -> _CharArray[str_]: - ... - - @overload - def strip(self: _CharArray[bytes_], chars: None | _ArrayLikeBytes_co = ...) -> _CharArray[bytes_]: - ... - - @overload - def translate(self: _CharArray[str_], table: _ArrayLikeStr_co, deletechars: None | _ArrayLikeStr_co = ...) -> _CharArray[str_]: - ... - - @overload - def translate(self: _CharArray[bytes_], table: _ArrayLikeBytes_co, deletechars: None | _ArrayLikeBytes_co = ...) -> _CharArray[bytes_]: - ... - - def zfill(self, width: _ArrayLikeInt_co) -> chararray[Any, _CharDType]: - ... - - def capitalize(self) -> chararray[_ShapeType, _CharDType]: - ... - - def title(self) -> chararray[_ShapeType, _CharDType]: - ... - - def swapcase(self) -> chararray[_ShapeType, _CharDType]: - ... - - def lower(self) -> chararray[_ShapeType, _CharDType]: - ... - - def upper(self) -> chararray[_ShapeType, _CharDType]: - ... - - def isalnum(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def isalpha(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def isdigit(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def islower(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def isspace(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def istitle(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def isupper(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def isnumeric(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - def isdecimal(self) -> ndarray[_ShapeType, dtype[bool_]]: - ... - - - -class _SupportsDLPack(Protocol[_T_contra]): - def __dlpack__(self, *, stream: None | _T_contra = ...) -> _PyCapsule: - ... - - - -def from_dlpack(obj: _SupportsDLPack[None], /) -> NDArray[Any]: - ... - diff --git a/typings/numpy/_distributor_init.pyi b/typings/numpy/_distributor_init.pyi deleted file mode 100644 index ccc72a9..0000000 --- a/typings/numpy/_distributor_init.pyi +++ /dev/null @@ -1,14 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" Distributor init file - -Distributors: you can add custom code here to support particular distributions -of numpy. - -For example, this is a good place to put any checks for hardware requirements. - -The numpy standard source distribution will not put code in this file, so you -can safely replace this file with your own version. -""" diff --git a/typings/numpy/_globals.pyi b/typings/numpy/_globals.pyi deleted file mode 100644 index d82c2b5..0000000 --- a/typings/numpy/_globals.pyi +++ /dev/null @@ -1,82 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import enum -from ._utils import set_module as _set_module - -""" -Module defining global singleton classes. - -This module raises a RuntimeError if an attempt to reload it is made. In that -way the identities of the classes defined here are fixed and will remain so -even if numpy itself is reloaded. In particular, a function like the following -will still work correctly after numpy is reloaded:: - - def foo(arg=np._NoValue): - if arg is np._NoValue: - ... - -That was not the case when the singleton classes were defined in the numpy -``__init__.py`` file. See gh-7844 for a discussion of the reload problem that -motivated this module. - -""" -__all__ = ['_NoValue', '_CopyMode'] -if '_is_loaded' in globals(): - ... -_is_loaded = ... -class _NoValueType: - """Special keyword value. - - The instance of this class may be used as the default value assigned to a - keyword if no other obvious default (e.g., `None`) is suitable, - - Common reasons for using this keyword are: - - - A new keyword is added to a function, and that function forwards its - inputs to another function or method which can be defined outside of - NumPy. For example, ``np.std(x)`` calls ``x.std``, so when a ``keepdims`` - keyword was added that could only be forwarded if the user explicitly - specified ``keepdims``; downstream array libraries may not have added - the same keyword, so adding ``x.std(..., keepdims=keepdims)`` - unconditionally could have broken previously working code. - - A keyword is being deprecated, and a deprecation warning must only be - emitted when the keyword is used. - - """ - __instance = ... - def __new__(cls): # -> Self@_NoValueType: - ... - - def __repr__(self): # -> Literal['']: - ... - - - -_NoValue = ... -@_set_module("numpy") -class _CopyMode(enum.Enum): - """ - An enumeration for the copy modes supported - by numpy.copy() and numpy.array(). The following three modes are supported, - - - ALWAYS: This means that a deep copy of the input - array will always be taken. - - IF_NEEDED: This means that a deep copy of the input - array will be taken only if necessary. - - NEVER: This means that the deep copy will never be taken. - If a copy cannot be avoided then a `ValueError` will be - raised. - - Note that the buffer-protocol could in theory do copies. NumPy currently - assumes an object exporting the buffer protocol will never do this. - """ - ALWAYS = ... - IF_NEEDED = ... - NEVER = ... - def __bool__(self): # -> bool: - ... - - - diff --git a/typings/numpy/_pyinstaller/__init__.pyi b/typings/numpy/_pyinstaller/__init__.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/numpy/_pyinstaller/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/numpy/_pytesttester.pyi b/typings/numpy/_pytesttester.pyi deleted file mode 100644 index eb73bbb..0000000 --- a/typings/numpy/_pytesttester.pyi +++ /dev/null @@ -1,18 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Iterable -from typing import Literal as L - -__all__: list[str] -class PytestTester: - module_name: str - def __init__(self, module_name: str) -> None: - ... - - def __call__(self, label: L["fast", "full"] = ..., verbose: int = ..., extra_argv: None | Iterable[str] = ..., doctests: L[False] = ..., coverage: bool = ..., durations: int = ..., tests: None | Iterable[str] = ...) -> bool: - ... - - - diff --git a/typings/numpy/_typing/__init__.pyi b/typings/numpy/_typing/__init__.pyi deleted file mode 100644 index a8607a6..0000000 --- a/typings/numpy/_typing/__init__.pyi +++ /dev/null @@ -1,104 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from __future__ import annotations -from .. import ufunc -from .._utils import set_module -from typing import TYPE_CHECKING, final -from ._nested_sequence import _NestedSequence as _NestedSequence -from ._nbit import _NBitByte as _NBitByte, _NBitDouble as _NBitDouble, _NBitHalf as _NBitHalf, _NBitInt as _NBitInt, _NBitIntC as _NBitIntC, _NBitIntP as _NBitIntP, _NBitLongDouble as _NBitLongDouble, _NBitLongLong as _NBitLongLong, _NBitShort as _NBitShort, _NBitSingle as _NBitSingle -from ._char_codes import _BoolCodes as _BoolCodes, _ByteCodes as _ByteCodes, _BytesCodes as _BytesCodes, _CDoubleCodes as _CDoubleCodes, _CLongDoubleCodes as _CLongDoubleCodes, _CSingleCodes as _CSingleCodes, _Complex128Codes as _Complex128Codes, _Complex64Codes as _Complex64Codes, _DT64Codes as _DT64Codes, _DoubleCodes as _DoubleCodes, _Float16Codes as _Float16Codes, _Float32Codes as _Float32Codes, _Float64Codes as _Float64Codes, _HalfCodes as _HalfCodes, _Int16Codes as _Int16Codes, _Int32Codes as _Int32Codes, _Int64Codes as _Int64Codes, _Int8Codes as _Int8Codes, _IntCCodes as _IntCCodes, _IntCodes as _IntCodes, _IntPCodes as _IntPCodes, _LongDoubleCodes as _LongDoubleCodes, _LongLongCodes as _LongLongCodes, _ObjectCodes as _ObjectCodes, _ShortCodes as _ShortCodes, _SingleCodes as _SingleCodes, _StrCodes as _StrCodes, _TD64Codes as _TD64Codes, _UByteCodes as _UByteCodes, _UInt16Codes as _UInt16Codes, _UInt32Codes as _UInt32Codes, _UInt64Codes as _UInt64Codes, _UInt8Codes as _UInt8Codes, _UIntCCodes as _UIntCCodes, _UIntCodes as _UIntCodes, _UIntPCodes as _UIntPCodes, _ULongLongCodes as _ULongLongCodes, _UShortCodes as _UShortCodes, _VoidCodes as _VoidCodes -from ._scalars import _BoolLike_co as _BoolLike_co, _CharLike_co as _CharLike_co, _ComplexLike_co as _ComplexLike_co, _FloatLike_co as _FloatLike_co, _IntLike_co as _IntLike_co, _NumberLike_co as _NumberLike_co, _ScalarLike_co as _ScalarLike_co, _TD64Like_co as _TD64Like_co, _UIntLike_co as _UIntLike_co, _VoidLike_co as _VoidLike_co -from ._shape import _Shape as _Shape, _ShapeLike as _ShapeLike -from ._dtype_like import DTypeLike as DTypeLike, _DTypeLike as _DTypeLike, _DTypeLikeBool as _DTypeLikeBool, _DTypeLikeBytes as _DTypeLikeBytes, _DTypeLikeComplex as _DTypeLikeComplex, _DTypeLikeComplex_co as _DTypeLikeComplex_co, _DTypeLikeDT64 as _DTypeLikeDT64, _DTypeLikeFloat as _DTypeLikeFloat, _DTypeLikeInt as _DTypeLikeInt, _DTypeLikeObject as _DTypeLikeObject, _DTypeLikeStr as _DTypeLikeStr, _DTypeLikeTD64 as _DTypeLikeTD64, _DTypeLikeUInt as _DTypeLikeUInt, _DTypeLikeVoid as _DTypeLikeVoid, _SupportsDType as _SupportsDType, _VoidDTypeLike as _VoidDTypeLike -from ._array_like import ArrayLike as ArrayLike, NDArray as NDArray, _ArrayLike as _ArrayLike, _ArrayLikeBool_co as _ArrayLikeBool_co, _ArrayLikeBytes_co as _ArrayLikeBytes_co, _ArrayLikeComplex_co as _ArrayLikeComplex_co, _ArrayLikeDT64_co as _ArrayLikeDT64_co, _ArrayLikeFloat_co as _ArrayLikeFloat_co, _ArrayLikeInt as _ArrayLikeInt, _ArrayLikeInt_co as _ArrayLikeInt_co, _ArrayLikeNumber_co as _ArrayLikeNumber_co, _ArrayLikeObject_co as _ArrayLikeObject_co, _ArrayLikeStr_co as _ArrayLikeStr_co, _ArrayLikeTD64_co as _ArrayLikeTD64_co, _ArrayLikeUInt_co as _ArrayLikeUInt_co, _ArrayLikeUnknown as _ArrayLikeUnknown, _ArrayLikeVoid_co as _ArrayLikeVoid_co, _FiniteNestedSequence as _FiniteNestedSequence, _SupportsArray as _SupportsArray, _SupportsArrayFunc as _SupportsArrayFunc, _UnknownType as _UnknownType -from ._ufunc import _GUFunc_Nin2_Nout1 as _GUFunc_Nin2_Nout1, _UFunc_Nin1_Nout1 as _UFunc_Nin1_Nout1, _UFunc_Nin1_Nout2 as _UFunc_Nin1_Nout2, _UFunc_Nin2_Nout1 as _UFunc_Nin2_Nout1, _UFunc_Nin2_Nout2 as _UFunc_Nin2_Nout2 - -"""Private counterpart of ``numpy.typing``.""" -@final -@set_module("numpy.typing") -class NBitBase: - """ - A type representing `numpy.number` precision during static type checking. - - Used exclusively for the purpose static type checking, `NBitBase` - represents the base of a hierarchical set of subclasses. - Each subsequent subclass is herein used for representing a lower level - of precision, *e.g.* ``64Bit > 32Bit > 16Bit``. - - .. versionadded:: 1.20 - - Examples - -------- - Below is a typical usage example: `NBitBase` is herein used for annotating - a function that takes a float and integer of arbitrary precision - as arguments and returns a new float of whichever precision is largest - (*e.g.* ``np.float16 + np.int64 -> np.float64``). - - .. code-block:: python - - >>> from __future__ import annotations - >>> from typing import TypeVar, TYPE_CHECKING - >>> import numpy as np - >>> import numpy.typing as npt - - >>> T1 = TypeVar("T1", bound=npt.NBitBase) - >>> T2 = TypeVar("T2", bound=npt.NBitBase) - - >>> def add(a: np.floating[T1], b: np.integer[T2]) -> np.floating[T1 | T2]: - ... return a + b - - >>> a = np.float16() - >>> b = np.int64() - >>> out = add(a, b) - - >>> if TYPE_CHECKING: - ... reveal_locals() - ... # note: Revealed local types are: - ... # note: a: numpy.floating[numpy.typing._16Bit*] - ... # note: b: numpy.signedinteger[numpy.typing._64Bit*] - ... # note: out: numpy.floating[numpy.typing._64Bit*] - - """ - def __init_subclass__(cls) -> None: - ... - - - -class _256Bit(NBitBase): - ... - - -class _128Bit(_256Bit): - ... - - -class _96Bit(_128Bit): - ... - - -class _80Bit(_96Bit): - ... - - -class _64Bit(_80Bit): - ... - - -class _32Bit(_64Bit): - ... - - -class _16Bit(_32Bit): - ... - - -class _8Bit(_16Bit): - ... - - -if TYPE_CHECKING: - ... -else: - ... diff --git a/typings/numpy/_typing/_add_docstring.pyi b/typings/numpy/_typing/_add_docstring.pyi deleted file mode 100644 index b588a72..0000000 --- a/typings/numpy/_typing/_add_docstring.pyi +++ /dev/null @@ -1,22 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -"""A module for creating docstrings for sphinx ``data`` domains.""" -_docstrings_list = ... -def add_newdoc(name: str, value: str, doc: str) -> None: - """Append ``_docstrings_list`` with a docstring for `name`. - - Parameters - ---------- - name : str - The name of the object. - value : str - A string-representation of the object. - doc : str - The docstring of the object. - - """ - ... - -_docstrings = ... diff --git a/typings/numpy/_typing/_array_like.pyi b/typings/numpy/_typing/_array_like.pyi deleted file mode 100644 index be08a89..0000000 --- a/typings/numpy/_typing/_array_like.pyi +++ /dev/null @@ -1,56 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import sys -from collections.abc import Buffer, Callable, Collection, Sequence -from typing import Any, Protocol, TypeVar, Union, runtime_checkable -from numpy import bool_, bytes_, complexfloating, datetime64, dtype, floating, generic, integer, ndarray, number, object_, str_, timedelta64, unsignedinteger, void -from ._nested_sequence import _NestedSequence - -_T = TypeVar("_T") -_ScalarType = TypeVar("_ScalarType", bound=generic) -_ScalarType_co = TypeVar("_ScalarType_co", bound=generic, covariant=True) -_DType = TypeVar("_DType", bound=dtype[Any]) -_DType_co = TypeVar("_DType_co", covariant=True, bound=dtype[Any]) -NDArray = ndarray[Any, dtype[_ScalarType_co]] -@runtime_checkable -class _SupportsArray(Protocol[_DType_co]): - def __array__(self) -> ndarray[Any, _DType_co]: - ... - - - -@runtime_checkable -class _SupportsArrayFunc(Protocol): - """A protocol class representing `~class.__array_function__`.""" - def __array_function__(self, func: Callable[..., Any], types: Collection[type[Any]], args: tuple[Any, ...], kwargs: dict[str, Any]) -> object: - ... - - - -_FiniteNestedSequence = Union[_T, Sequence[_T], Sequence[Sequence[_T]], Sequence[Sequence[Sequence[_T]]], Sequence[Sequence[Sequence[Sequence[_T]]]],] -_ArrayLike = Union[_SupportsArray[dtype[_ScalarType]], _NestedSequence[_SupportsArray[dtype[_ScalarType]]],] -_DualArrayLike = Union[_SupportsArray[_DType], _NestedSequence[_SupportsArray[_DType]], _T, _NestedSequence[_T],] -if sys.version_info >= (3, 12): - ArrayLike = Buffer | _DualArrayLike[dtype[Any], Union[bool, int, float, complex, str, bytes],] -else: - ... -_ArrayLikeBool_co = _DualArrayLike[dtype[bool_], bool,] -_ArrayLikeUInt_co = _DualArrayLike[dtype[Union[bool_, unsignedinteger[Any]]], bool,] -_ArrayLikeInt_co = _DualArrayLike[dtype[Union[bool_, integer[Any]]], Union[bool, int],] -_ArrayLikeFloat_co = _DualArrayLike[dtype[Union[bool_, integer[Any], floating[Any]]], Union[bool, int, float],] -_ArrayLikeComplex_co = _DualArrayLike[dtype[Union[bool_, integer[Any], floating[Any], complexfloating[Any, Any],]], Union[bool, int, float, complex],] -_ArrayLikeNumber_co = _DualArrayLike[dtype[Union[bool_, number[Any]]], Union[bool, int, float, complex],] -_ArrayLikeTD64_co = _DualArrayLike[dtype[Union[bool_, integer[Any], timedelta64]], Union[bool, int],] -_ArrayLikeDT64_co = Union[_SupportsArray[dtype[datetime64]], _NestedSequence[_SupportsArray[dtype[datetime64]]],] -_ArrayLikeObject_co = Union[_SupportsArray[dtype[object_]], _NestedSequence[_SupportsArray[dtype[object_]]],] -_ArrayLikeVoid_co = Union[_SupportsArray[dtype[void]], _NestedSequence[_SupportsArray[dtype[void]]],] -_ArrayLikeStr_co = _DualArrayLike[dtype[str_], str,] -_ArrayLikeBytes_co = _DualArrayLike[dtype[bytes_], bytes,] -_ArrayLikeInt = _DualArrayLike[dtype[integer[Any]], int,] -class _UnknownType: - ... - - -_ArrayLikeUnknown = _DualArrayLike[dtype[_UnknownType], _UnknownType,] diff --git a/typings/numpy/_typing/_callable.pyi b/typings/numpy/_typing/_callable.pyi deleted file mode 100644 index 2c78d4d..0000000 --- a/typings/numpy/_typing/_callable.pyi +++ /dev/null @@ -1,462 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, NoReturn, Protocol, TypeVar, overload -from numpy import bool_, complex128, complexfloating, float64, floating, generic, int8, int_, integer, number, signedinteger, timedelta64, unsignedinteger -from ._nbit import _NBitDouble, _NBitInt -from ._scalars import _BoolLike_co, _FloatLike_co, _IntLike_co, _NumberLike_co -from . import NBitBase -from ._array_like import NDArray -from ._nested_sequence import _NestedSequence - -""" -A module with various ``typing.Protocol`` subclasses that implement -the ``__call__`` magic method. - -See the `Mypy documentation`_ on protocols for more details. - -.. _`Mypy documentation`: https://mypy.readthedocs.io/en/stable/protocols.html#callback-protocols - -""" -_T1 = TypeVar("_T1") -_T2 = TypeVar("_T2") -_T1_contra = TypeVar("_T1_contra", contravariant=True) -_T2_contra = TypeVar("_T2_contra", contravariant=True) -_2Tuple = tuple[_T1, _T1] -_NBit1 = TypeVar("_NBit1", bound=NBitBase) -_NBit2 = TypeVar("_NBit2", bound=NBitBase) -_IntType = TypeVar("_IntType", bound=integer) -_FloatType = TypeVar("_FloatType", bound=floating) -_NumberType = TypeVar("_NumberType", bound=number) -_NumberType_co = TypeVar("_NumberType_co", covariant=True, bound=number) -_GenericType_co = TypeVar("_GenericType_co", covariant=True, bound=generic) -class _BoolOp(Protocol[_GenericType_co]): - @overload - def __call__(self, other: _BoolLike_co, /) -> _GenericType_co: - ... - - @overload - def __call__(self, other: int, /) -> int_: - ... - - @overload - def __call__(self, other: float, /) -> float64: - ... - - @overload - def __call__(self, other: complex, /) -> complex128: - ... - - @overload - def __call__(self, other: _NumberType, /) -> _NumberType: - ... - - - -class _BoolBitOp(Protocol[_GenericType_co]): - @overload - def __call__(self, other: _BoolLike_co, /) -> _GenericType_co: - ... - - @overload - def __call__(self, other: int, /) -> int_: - ... - - @overload - def __call__(self, other: _IntType, /) -> _IntType: - ... - - - -class _BoolSub(Protocol): - @overload - def __call__(self, other: bool, /) -> NoReturn: - ... - - @overload - def __call__(self, other: int, /) -> int_: - ... - - @overload - def __call__(self, other: float, /) -> float64: - ... - - @overload - def __call__(self, other: complex, /) -> complex128: - ... - - @overload - def __call__(self, other: _NumberType, /) -> _NumberType: - ... - - - -class _BoolTrueDiv(Protocol): - @overload - def __call__(self, other: float | _IntLike_co, /) -> float64: - ... - - @overload - def __call__(self, other: complex, /) -> complex128: - ... - - @overload - def __call__(self, other: _NumberType, /) -> _NumberType: - ... - - - -class _BoolMod(Protocol): - @overload - def __call__(self, other: _BoolLike_co, /) -> int8: - ... - - @overload - def __call__(self, other: int, /) -> int_: - ... - - @overload - def __call__(self, other: float, /) -> float64: - ... - - @overload - def __call__(self, other: _IntType, /) -> _IntType: - ... - - @overload - def __call__(self, other: _FloatType, /) -> _FloatType: - ... - - - -class _BoolDivMod(Protocol): - @overload - def __call__(self, other: _BoolLike_co, /) -> _2Tuple[int8]: - ... - - @overload - def __call__(self, other: int, /) -> _2Tuple[int_]: - ... - - @overload - def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: - ... - - @overload - def __call__(self, other: _IntType, /) -> _2Tuple[_IntType]: - ... - - @overload - def __call__(self, other: _FloatType, /) -> _2Tuple[_FloatType]: - ... - - - -class _TD64Div(Protocol[_NumberType_co]): - @overload - def __call__(self, other: timedelta64, /) -> _NumberType_co: - ... - - @overload - def __call__(self, other: _BoolLike_co, /) -> NoReturn: - ... - - @overload - def __call__(self, other: _FloatLike_co, /) -> timedelta64: - ... - - - -class _IntTrueDiv(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> floating[_NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> floating[_NBit1 | _NBitInt]: - ... - - @overload - def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: complex, /) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: integer[_NBit2], /) -> floating[_NBit1 | _NBit2]: - ... - - - -class _UnsignedIntOp(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> unsignedinteger[_NBit1]: - ... - - @overload - def __call__(self, other: int | signedinteger[Any], /) -> Any: - ... - - @overload - def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: complex, /) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: unsignedinteger[_NBit2], /) -> unsignedinteger[_NBit1 | _NBit2]: - ... - - - -class _UnsignedIntBitOp(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> unsignedinteger[_NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> signedinteger[Any]: - ... - - @overload - def __call__(self, other: signedinteger[Any], /) -> signedinteger[Any]: - ... - - @overload - def __call__(self, other: unsignedinteger[_NBit2], /) -> unsignedinteger[_NBit1 | _NBit2]: - ... - - - -class _UnsignedIntMod(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> unsignedinteger[_NBit1]: - ... - - @overload - def __call__(self, other: int | signedinteger[Any], /) -> Any: - ... - - @overload - def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: unsignedinteger[_NBit2], /) -> unsignedinteger[_NBit1 | _NBit2]: - ... - - - -class _UnsignedIntDivMod(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> _2Tuple[signedinteger[_NBit1]]: - ... - - @overload - def __call__(self, other: int | signedinteger[Any], /) -> _2Tuple[Any]: - ... - - @overload - def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: - ... - - @overload - def __call__(self, other: unsignedinteger[_NBit2], /) -> _2Tuple[unsignedinteger[_NBit1 | _NBit2]]: - ... - - - -class _SignedIntOp(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> signedinteger[_NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> signedinteger[_NBit1 | _NBitInt]: - ... - - @overload - def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: complex, /) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: signedinteger[_NBit2], /) -> signedinteger[_NBit1 | _NBit2]: - ... - - - -class _SignedIntBitOp(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> signedinteger[_NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> signedinteger[_NBit1 | _NBitInt]: - ... - - @overload - def __call__(self, other: signedinteger[_NBit2], /) -> signedinteger[_NBit1 | _NBit2]: - ... - - - -class _SignedIntMod(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> signedinteger[_NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> signedinteger[_NBit1 | _NBitInt]: - ... - - @overload - def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: signedinteger[_NBit2], /) -> signedinteger[_NBit1 | _NBit2]: - ... - - - -class _SignedIntDivMod(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> _2Tuple[signedinteger[_NBit1]]: - ... - - @overload - def __call__(self, other: int, /) -> _2Tuple[signedinteger[_NBit1 | _NBitInt]]: - ... - - @overload - def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: - ... - - @overload - def __call__(self, other: signedinteger[_NBit2], /) -> _2Tuple[signedinteger[_NBit1 | _NBit2]]: - ... - - - -class _FloatOp(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> floating[_NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> floating[_NBit1 | _NBitInt]: - ... - - @overload - def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: complex, /) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: integer[_NBit2] | floating[_NBit2], /) -> floating[_NBit1 | _NBit2]: - ... - - - -class _FloatMod(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> floating[_NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> floating[_NBit1 | _NBitInt]: - ... - - @overload - def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: integer[_NBit2] | floating[_NBit2], /) -> floating[_NBit1 | _NBit2]: - ... - - - -class _FloatDivMod(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> _2Tuple[floating[_NBit1]]: - ... - - @overload - def __call__(self, other: int, /) -> _2Tuple[floating[_NBit1 | _NBitInt]]: - ... - - @overload - def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: - ... - - @overload - def __call__(self, other: integer[_NBit2] | floating[_NBit2], /) -> _2Tuple[floating[_NBit1 | _NBit2]]: - ... - - - -class _ComplexOp(Protocol[_NBit1]): - @overload - def __call__(self, other: bool, /) -> complexfloating[_NBit1, _NBit1]: - ... - - @overload - def __call__(self, other: int, /) -> complexfloating[_NBit1 | _NBitInt, _NBit1 | _NBitInt]: - ... - - @overload - def __call__(self, other: complex, /) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: - ... - - @overload - def __call__(self, other: (integer[_NBit2] | floating[_NBit2] | complexfloating[_NBit2, _NBit2]), /) -> complexfloating[_NBit1 | _NBit2, _NBit1 | _NBit2]: - ... - - - -class _NumberOp(Protocol): - def __call__(self, other: _NumberLike_co, /) -> Any: - ... - - - -class _SupportsLT(Protocol): - def __lt__(self, other: Any, /) -> object: - ... - - - -class _SupportsGT(Protocol): - def __gt__(self, other: Any, /) -> object: - ... - - - -class _ComparisonOp(Protocol[_T1_contra, _T2_contra]): - @overload - def __call__(self, other: _T1_contra, /) -> bool_: - ... - - @overload - def __call__(self, other: _T2_contra, /) -> NDArray[bool_]: - ... - - @overload - def __call__(self, other: _SupportsLT | _SupportsGT | _NestedSequence[_SupportsLT | _SupportsGT], /) -> Any: - ... - - - diff --git a/typings/numpy/_typing/_char_codes.pyi b/typings/numpy/_typing/_char_codes.pyi deleted file mode 100644 index ea9f77c..0000000 --- a/typings/numpy/_typing/_char_codes.pyi +++ /dev/null @@ -1,45 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Literal - -_BoolCodes = Literal["?", "=?", "?", "bool", "bool_", "bool8"] -_UInt8Codes = Literal["uint8", "u1", "=u1", "u1"] -_UInt16Codes = Literal["uint16", "u2", "=u2", "u2"] -_UInt32Codes = Literal["uint32", "u4", "=u4", "u4"] -_UInt64Codes = Literal["uint64", "u8", "=u8", "u8"] -_Int8Codes = Literal["int8", "i1", "=i1", "i1"] -_Int16Codes = Literal["int16", "i2", "=i2", "i2"] -_Int32Codes = Literal["int32", "i4", "=i4", "i4"] -_Int64Codes = Literal["int64", "i8", "=i8", "i8"] -_Float16Codes = Literal["float16", "f2", "=f2", "f2"] -_Float32Codes = Literal["float32", "f4", "=f4", "f4"] -_Float64Codes = Literal["float64", "f8", "=f8", "f8"] -_Complex64Codes = Literal["complex64", "c8", "=c8", "c8"] -_Complex128Codes = Literal["complex128", "c16", "=c16", "c16"] -_ByteCodes = Literal["byte", "b", "=b", "b"] -_ShortCodes = Literal["short", "h", "=h", "h"] -_IntCCodes = Literal["intc", "i", "=i", "i"] -_IntPCodes = Literal["intp", "int0", "p", "=p", "p"] -_IntCodes = Literal["long", "int", "int_", "l", "=l", "l"] -_LongLongCodes = Literal["longlong", "q", "=q", "q"] -_UByteCodes = Literal["ubyte", "B", "=B", "B"] -_UShortCodes = Literal["ushort", "H", "=H", "H"] -_UIntCCodes = Literal["uintc", "I", "=I", "I"] -_UIntPCodes = Literal["uintp", "uint0", "P", "=P", "P"] -_UIntCodes = Literal["ulong", "uint", "L", "=L", "L"] -_ULongLongCodes = Literal["ulonglong", "Q", "=Q", "Q"] -_HalfCodes = Literal["half", "e", "=e", "e"] -_SingleCodes = Literal["single", "f", "=f", "f"] -_DoubleCodes = Literal["double", "float", "float_", "d", "=d", "d"] -_LongDoubleCodes = Literal["longdouble", "longfloat", "g", "=g", "g"] -_CSingleCodes = Literal["csingle", "singlecomplex", "F", "=F", "F"] -_CDoubleCodes = Literal["cdouble", "complex", "complex_", "cfloat", "D", "=D", "D"] -_CLongDoubleCodes = Literal["clongdouble", "clongfloat", "longcomplex", "G", "=G", "G"] -_StrCodes = Literal["str", "str_", "str0", "unicode", "unicode_", "U", "=U", "U"] -_BytesCodes = Literal["bytes", "bytes_", "bytes0", "S", "=S", "S"] -_VoidCodes = Literal["void", "void0", "V", "=V", "V"] -_ObjectCodes = Literal["object", "object_", "O", "=O", "O"] -_DT64Codes = Literal["datetime64", "=datetime64", "datetime64", "datetime64[Y]", "=datetime64[Y]", "datetime64[Y]", "datetime64[M]", "=datetime64[M]", "datetime64[M]", "datetime64[W]", "=datetime64[W]", "datetime64[W]", "datetime64[D]", "=datetime64[D]", "datetime64[D]", "datetime64[h]", "=datetime64[h]", "datetime64[h]", "datetime64[m]", "=datetime64[m]", "datetime64[m]", "datetime64[s]", "=datetime64[s]", "datetime64[s]", "datetime64[ms]", "=datetime64[ms]", "datetime64[ms]", "datetime64[us]", "=datetime64[us]", "datetime64[us]", "datetime64[ns]", "=datetime64[ns]", "datetime64[ns]", "datetime64[ps]", "=datetime64[ps]", "datetime64[ps]", "datetime64[fs]", "=datetime64[fs]", "datetime64[fs]", "datetime64[as]", "=datetime64[as]", "datetime64[as]", "M", "=M", "M", "M8", "=M8", "M8", "M8[Y]", "=M8[Y]", "M8[Y]", "M8[M]", "=M8[M]", "M8[M]", "M8[W]", "=M8[W]", "M8[W]", "M8[D]", "=M8[D]", "M8[D]", "M8[h]", "=M8[h]", "M8[h]", "M8[m]", "=M8[m]", "M8[m]", "M8[s]", "=M8[s]", "M8[s]", "M8[ms]", "=M8[ms]", "M8[ms]", "M8[us]", "=M8[us]", "M8[us]", "M8[ns]", "=M8[ns]", "M8[ns]", "M8[ps]", "=M8[ps]", "M8[ps]", "M8[fs]", "=M8[fs]", "M8[fs]", "M8[as]", "=M8[as]", "M8[as]",] -_TD64Codes = Literal["timedelta64", "=timedelta64", "timedelta64", "timedelta64[Y]", "=timedelta64[Y]", "timedelta64[Y]", "timedelta64[M]", "=timedelta64[M]", "timedelta64[M]", "timedelta64[W]", "=timedelta64[W]", "timedelta64[W]", "timedelta64[D]", "=timedelta64[D]", "timedelta64[D]", "timedelta64[h]", "=timedelta64[h]", "timedelta64[h]", "timedelta64[m]", "=timedelta64[m]", "timedelta64[m]", "timedelta64[s]", "=timedelta64[s]", "timedelta64[s]", "timedelta64[ms]", "=timedelta64[ms]", "timedelta64[ms]", "timedelta64[us]", "=timedelta64[us]", "timedelta64[us]", "timedelta64[ns]", "=timedelta64[ns]", "timedelta64[ns]", "timedelta64[ps]", "=timedelta64[ps]", "timedelta64[ps]", "timedelta64[fs]", "=timedelta64[fs]", "timedelta64[fs]", "timedelta64[as]", "=timedelta64[as]", "timedelta64[as]", "m", "=m", "m", "m8", "=m8", "m8", "m8[Y]", "=m8[Y]", "m8[Y]", "m8[M]", "=m8[M]", "m8[M]", "m8[W]", "=m8[W]", "m8[W]", "m8[D]", "=m8[D]", "m8[D]", "m8[h]", "=m8[h]", "m8[h]", "m8[m]", "=m8[m]", "m8[m]", "m8[s]", "=m8[s]", "m8[s]", "m8[ms]", "=m8[ms]", "m8[ms]", "m8[us]", "=m8[us]", "m8[us]", "m8[ns]", "=m8[ns]", "m8[ns]", "m8[ps]", "=m8[ps]", "m8[ps]", "m8[fs]", "=m8[fs]", "m8[fs]", "m8[as]", "=m8[as]", "m8[as]",] diff --git a/typings/numpy/_typing/_dtype_like.pyi b/typings/numpy/_typing/_dtype_like.pyi deleted file mode 100644 index 54fbfef..0000000 --- a/typings/numpy/_typing/_dtype_like.pyi +++ /dev/null @@ -1,50 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from collections.abc import Sequence -from typing import Any, Protocol, Sequence, TypeVar, TypedDict, Union, runtime_checkable -from ._shape import _ShapeLike -from ._char_codes import _BoolCodes, _ByteCodes, _BytesCodes, _CDoubleCodes, _CLongDoubleCodes, _CSingleCodes, _Complex128Codes, _Complex64Codes, _DT64Codes, _DoubleCodes, _Float16Codes, _Float32Codes, _Float64Codes, _HalfCodes, _Int16Codes, _Int32Codes, _Int64Codes, _Int8Codes, _IntCCodes, _IntCodes, _IntPCodes, _LongDoubleCodes, _LongLongCodes, _ObjectCodes, _ShortCodes, _SingleCodes, _StrCodes, _TD64Codes, _UByteCodes, _UInt16Codes, _UInt32Codes, _UInt64Codes, _UInt8Codes, _UIntCCodes, _UIntCodes, _UIntPCodes, _ULongLongCodes, _UShortCodes, _VoidCodes - -_SCT = TypeVar("_SCT", bound=np.generic) -_DType_co = TypeVar("_DType_co", covariant=True, bound=np.dtype[Any]) -_DTypeLikeNested = Any -class _DTypeDictBase(TypedDict): - names: Sequence[str] - formats: Sequence[_DTypeLikeNested] - ... - - -class _DTypeDict(_DTypeDictBase, total=False): - offsets: Sequence[int] - titles: Sequence[Any] - itemsize: int - aligned: bool - ... - - -@runtime_checkable -class _SupportsDType(Protocol[_DType_co]): - @property - def dtype(self) -> _DType_co: - ... - - - -_DTypeLike = Union[np.dtype[_SCT], type[_SCT], _SupportsDType[np.dtype[_SCT]],] -_VoidDTypeLike = Union[tuple[_DTypeLikeNested, int], tuple[_DTypeLikeNested, _ShapeLike], list[Any], _DTypeDict, tuple[_DTypeLikeNested, _DTypeLikeNested],] -DTypeLike = Union[np.dtype[Any], None, type[Any], _SupportsDType[np.dtype[Any]], str, _VoidDTypeLike,] -_DTypeLikeBool = Union[type[bool], type[np.bool_], np.dtype[np.bool_], _SupportsDType[np.dtype[np.bool_]], _BoolCodes,] -_DTypeLikeUInt = Union[type[np.unsignedinteger], np.dtype[np.unsignedinteger], _SupportsDType[np.dtype[np.unsignedinteger]], _UInt8Codes, _UInt16Codes, _UInt32Codes, _UInt64Codes, _UByteCodes, _UShortCodes, _UIntCCodes, _UIntPCodes, _UIntCodes, _ULongLongCodes,] -_DTypeLikeInt = Union[type[int], type[np.signedinteger], np.dtype[np.signedinteger], _SupportsDType[np.dtype[np.signedinteger]], _Int8Codes, _Int16Codes, _Int32Codes, _Int64Codes, _ByteCodes, _ShortCodes, _IntCCodes, _IntPCodes, _IntCodes, _LongLongCodes,] -_DTypeLikeFloat = Union[type[float], type[np.floating], np.dtype[np.floating], _SupportsDType[np.dtype[np.floating]], _Float16Codes, _Float32Codes, _Float64Codes, _HalfCodes, _SingleCodes, _DoubleCodes, _LongDoubleCodes,] -_DTypeLikeComplex = Union[type[complex], type[np.complexfloating], np.dtype[np.complexfloating], _SupportsDType[np.dtype[np.complexfloating]], _Complex64Codes, _Complex128Codes, _CSingleCodes, _CDoubleCodes, _CLongDoubleCodes,] -_DTypeLikeDT64 = Union[type[np.timedelta64], np.dtype[np.timedelta64], _SupportsDType[np.dtype[np.timedelta64]], _TD64Codes,] -_DTypeLikeTD64 = Union[type[np.datetime64], np.dtype[np.datetime64], _SupportsDType[np.dtype[np.datetime64]], _DT64Codes,] -_DTypeLikeStr = Union[type[str], type[np.str_], np.dtype[np.str_], _SupportsDType[np.dtype[np.str_]], _StrCodes,] -_DTypeLikeBytes = Union[type[bytes], type[np.bytes_], np.dtype[np.bytes_], _SupportsDType[np.dtype[np.bytes_]], _BytesCodes,] -_DTypeLikeVoid = Union[type[np.void], np.dtype[np.void], _SupportsDType[np.dtype[np.void]], _VoidCodes, _VoidDTypeLike,] -_DTypeLikeObject = Union[type, np.dtype[np.object_], _SupportsDType[np.dtype[np.object_]], _ObjectCodes,] -_DTypeLikeComplex_co = Union[_DTypeLikeBool, _DTypeLikeUInt, _DTypeLikeInt, _DTypeLikeFloat, _DTypeLikeComplex,] diff --git a/typings/numpy/_typing/_extended_precision.pyi b/typings/numpy/_typing/_extended_precision.pyi deleted file mode 100644 index 0e6aee8..0000000 --- a/typings/numpy/_typing/_extended_precision.pyi +++ /dev/null @@ -1,25 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from . import _128Bit, _256Bit, _80Bit, _96Bit - -"""A module with platform-specific extended precision -`numpy.number` subclasses. - -The subclasses are defined here (instead of ``__init__.pyi``) such -that they can be imported conditionally via the numpy's mypy plugin. -""" -uint128 = np.unsignedinteger[_128Bit] -uint256 = np.unsignedinteger[_256Bit] -int128 = np.signedinteger[_128Bit] -int256 = np.signedinteger[_256Bit] -float80 = np.floating[_80Bit] -float96 = np.floating[_96Bit] -float128 = np.floating[_128Bit] -float256 = np.floating[_256Bit] -complex160 = np.complexfloating[_80Bit, _80Bit] -complex192 = np.complexfloating[_96Bit, _96Bit] -complex256 = np.complexfloating[_128Bit, _128Bit] -complex512 = np.complexfloating[_256Bit, _256Bit] diff --git a/typings/numpy/_typing/_nbit.pyi b/typings/numpy/_typing/_nbit.pyi deleted file mode 100644 index 83e1efd..0000000 --- a/typings/numpy/_typing/_nbit.pyi +++ /dev/null @@ -1,17 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any - -"""A module with the precisions of platform-specific `~numpy.number`s.""" -_NBitByte = Any -_NBitShort = Any -_NBitIntC = Any -_NBitIntP = Any -_NBitInt = Any -_NBitLongLong = Any -_NBitHalf = Any -_NBitSingle = Any -_NBitDouble = Any -_NBitLongDouble = Any diff --git a/typings/numpy/_typing/_nested_sequence.pyi b/typings/numpy/_typing/_nested_sequence.pyi deleted file mode 100644 index 6cf0234..0000000 --- a/typings/numpy/_typing/_nested_sequence.pyi +++ /dev/null @@ -1,81 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Iterator -from typing import Any, Protocol, TypeVar, runtime_checkable - -"""A module containing the `_NestedSequence` protocol.""" -__all__ = ["_NestedSequence"] -_T_co = TypeVar("_T_co", covariant=True) -@runtime_checkable -class _NestedSequence(Protocol[_T_co]): - """A protocol for representing nested sequences. - - Warning - ------- - `_NestedSequence` currently does not work in combination with typevars, - *e.g.* ``def func(a: _NestedSequnce[T]) -> T: ...``. - - See Also - -------- - collections.abc.Sequence - ABCs for read-only and mutable :term:`sequences`. - - Examples - -------- - .. code-block:: python - - >>> from __future__ import annotations - - >>> from typing import TYPE_CHECKING - >>> import numpy as np - >>> from numpy._typing import _NestedSequence - - >>> def get_dtype(seq: _NestedSequence[float]) -> np.dtype[np.float64]: - ... return np.asarray(seq).dtype - - >>> a = get_dtype([1.0]) - >>> b = get_dtype([[1.0]]) - >>> c = get_dtype([[[1.0]]]) - >>> d = get_dtype([[[[1.0]]]]) - - >>> if TYPE_CHECKING: - ... reveal_locals() - ... # note: Revealed local types are: - ... # note: a: numpy.dtype[numpy.floating[numpy._typing._64Bit]] - ... # note: b: numpy.dtype[numpy.floating[numpy._typing._64Bit]] - ... # note: c: numpy.dtype[numpy.floating[numpy._typing._64Bit]] - ... # note: d: numpy.dtype[numpy.floating[numpy._typing._64Bit]] - - """ - def __len__(self, /) -> int: - """Implement ``len(self)``.""" - ... - - def __getitem__(self, index: int, /) -> _T_co | _NestedSequence[_T_co]: - """Implement ``self[x]``.""" - ... - - def __contains__(self, x: object, /) -> bool: - """Implement ``x in self``.""" - ... - - def __iter__(self, /) -> Iterator[_T_co | _NestedSequence[_T_co]]: - """Implement ``iter(self)``.""" - ... - - def __reversed__(self, /) -> Iterator[_T_co | _NestedSequence[_T_co]]: - """Implement ``reversed(self)``.""" - ... - - def count(self, value: Any, /) -> int: - """Return the number of occurrences of `value`.""" - ... - - def index(self, value: Any, /) -> int: - """Return the first index of `value`.""" - ... - - - diff --git a/typings/numpy/_typing/_scalars.pyi b/typings/numpy/_typing/_scalars.pyi deleted file mode 100644 index b0cd431..0000000 --- a/typings/numpy/_typing/_scalars.pyi +++ /dev/null @@ -1,17 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from typing import Any, Union - -_CharLike_co = Union[str, bytes] -_BoolLike_co = Union[bool, np.bool_] -_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger[Any]] -_IntLike_co = Union[_BoolLike_co, int, np.integer[Any]] -_FloatLike_co = Union[_IntLike_co, float, np.floating[Any]] -_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating[Any, Any]] -_TD64Like_co = Union[_IntLike_co, np.timedelta64] -_NumberLike_co = Union[int, float, complex, np.number[Any], np.bool_] -_ScalarLike_co = Union[int, float, complex, str, bytes, np.generic,] -_VoidLike_co = Union[tuple[Any, ...], np.void] diff --git a/typings/numpy/_typing/_shape.pyi b/typings/numpy/_typing/_shape.pyi deleted file mode 100644 index e9121e8..0000000 --- a/typings/numpy/_typing/_shape.pyi +++ /dev/null @@ -1,9 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Sequence -from typing import SupportsIndex, Union - -_Shape = tuple[int, ...] -_ShapeLike = Union[SupportsIndex, Sequence[SupportsIndex]] diff --git a/typings/numpy/_typing/_ufunc.pyi b/typings/numpy/_typing/_ufunc.pyi deleted file mode 100644 index 092817e..0000000 --- a/typings/numpy/_typing/_ufunc.pyi +++ /dev/null @@ -1,335 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, Generic, Literal, Protocol, SupportsIndex, TypeVar, overload -from numpy import _CastingKind, _OrderKACF, ufunc -from numpy.typing import NDArray -from ._shape import _ShapeLike -from ._scalars import _ScalarLike_co -from ._array_like import ArrayLike, _ArrayLikeBool_co, _ArrayLikeInt_co -from ._dtype_like import DTypeLike - -"""A module with private type-check-only `numpy.ufunc` subclasses. - -The signatures of the ufuncs are too varied to reasonably type -with a single class. So instead, `ufunc` has been expanded into -four private subclasses, one for each combination of -`~ufunc.nin` and `~ufunc.nout`. - -""" -_T = TypeVar("_T") -_2Tuple = tuple[_T, _T] -_3Tuple = tuple[_T, _T, _T] -_4Tuple = tuple[_T, _T, _T, _T] -_NTypes = TypeVar("_NTypes", bound=int) -_IDType = TypeVar("_IDType", bound=Any) -_NameType = TypeVar("_NameType", bound=str) -class _SupportsArrayUFunc(Protocol): - def __array_ufunc__(self, ufunc: ufunc, method: Literal["__call__", "reduce", "reduceat", "accumulate", "outer", "inner"], *inputs: Any, **kwargs: Any) -> Any: - ... - - - -class _UFunc_Nin1_Nout1(ufunc, Generic[_NameType, _NTypes, _IDType]): - @property - def __name__(self) -> _NameType: - ... - - @property - def ntypes(self) -> _NTypes: - ... - - @property - def identity(self) -> _IDType: - ... - - @property - def nin(self) -> Literal[1]: - ... - - @property - def nout(self) -> Literal[1]: - ... - - @property - def nargs(self) -> Literal[2]: - ... - - @property - def signature(self) -> None: - ... - - @property - def reduce(self) -> None: - ... - - @property - def accumulate(self) -> None: - ... - - @property - def reduceat(self) -> None: - ... - - @property - def outer(self) -> None: - ... - - @overload - def __call__(self, __x1: _ScalarLike_co, out: None = ..., *, where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _2Tuple[None | str] = ..., extobj: list[Any] = ...) -> Any: - ... - - @overload - def __call__(self, __x1: ArrayLike, out: None | NDArray[Any] | tuple[NDArray[Any]] = ..., *, where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _2Tuple[None | str] = ..., extobj: list[Any] = ...) -> NDArray[Any]: - ... - - @overload - def __call__(self, __x1: _SupportsArrayUFunc, out: None | NDArray[Any] | tuple[NDArray[Any]] = ..., *, where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _2Tuple[None | str] = ..., extobj: list[Any] = ...) -> Any: - ... - - def at(self, a: _SupportsArrayUFunc, indices: _ArrayLikeInt_co, /) -> None: - ... - - - -class _UFunc_Nin2_Nout1(ufunc, Generic[_NameType, _NTypes, _IDType]): - @property - def __name__(self) -> _NameType: - ... - - @property - def ntypes(self) -> _NTypes: - ... - - @property - def identity(self) -> _IDType: - ... - - @property - def nin(self) -> Literal[2]: - ... - - @property - def nout(self) -> Literal[1]: - ... - - @property - def nargs(self) -> Literal[3]: - ... - - @property - def signature(self) -> None: - ... - - @overload - def __call__(self, __x1: _ScalarLike_co, __x2: _ScalarLike_co, out: None = ..., *, where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ...) -> Any: - ... - - @overload - def __call__(self, __x1: ArrayLike, __x2: ArrayLike, out: None | NDArray[Any] | tuple[NDArray[Any]] = ..., *, where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ...) -> NDArray[Any]: - ... - - def at(self, a: NDArray[Any], indices: _ArrayLikeInt_co, b: ArrayLike, /) -> None: - ... - - def reduce(self, array: ArrayLike, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None | NDArray[Any] = ..., keepdims: bool = ..., initial: Any = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - - def accumulate(self, array: ArrayLike, axis: SupportsIndex = ..., dtype: DTypeLike = ..., out: None | NDArray[Any] = ...) -> NDArray[Any]: - ... - - def reduceat(self, array: ArrayLike, indices: _ArrayLikeInt_co, axis: SupportsIndex = ..., dtype: DTypeLike = ..., out: None | NDArray[Any] = ...) -> NDArray[Any]: - ... - - @overload - def outer(self, A: _ScalarLike_co, B: _ScalarLike_co, /, *, out: None = ..., where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ...) -> Any: - ... - - @overload - def outer(self, A: ArrayLike, B: ArrayLike, /, *, out: None | NDArray[Any] | tuple[NDArray[Any]] = ..., where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ...) -> NDArray[Any]: - ... - - - -class _UFunc_Nin1_Nout2(ufunc, Generic[_NameType, _NTypes, _IDType]): - @property - def __name__(self) -> _NameType: - ... - - @property - def ntypes(self) -> _NTypes: - ... - - @property - def identity(self) -> _IDType: - ... - - @property - def nin(self) -> Literal[1]: - ... - - @property - def nout(self) -> Literal[2]: - ... - - @property - def nargs(self) -> Literal[3]: - ... - - @property - def signature(self) -> None: - ... - - @property - def at(self) -> None: - ... - - @property - def reduce(self) -> None: - ... - - @property - def accumulate(self) -> None: - ... - - @property - def reduceat(self) -> None: - ... - - @property - def outer(self) -> None: - ... - - @overload - def __call__(self, __x1: _ScalarLike_co, __out1: None = ..., __out2: None = ..., *, where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ...) -> _2Tuple[Any]: - ... - - @overload - def __call__(self, __x1: ArrayLike, __out1: None | NDArray[Any] = ..., __out2: None | NDArray[Any] = ..., *, out: _2Tuple[NDArray[Any]] = ..., where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ...) -> _2Tuple[NDArray[Any]]: - ... - - @overload - def __call__(self, __x1: _SupportsArrayUFunc, __out1: None | NDArray[Any] = ..., __out2: None | NDArray[Any] = ..., *, out: _2Tuple[NDArray[Any]] = ..., where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ...) -> _2Tuple[Any]: - ... - - - -class _UFunc_Nin2_Nout2(ufunc, Generic[_NameType, _NTypes, _IDType]): - @property - def __name__(self) -> _NameType: - ... - - @property - def ntypes(self) -> _NTypes: - ... - - @property - def identity(self) -> _IDType: - ... - - @property - def nin(self) -> Literal[2]: - ... - - @property - def nout(self) -> Literal[2]: - ... - - @property - def nargs(self) -> Literal[4]: - ... - - @property - def signature(self) -> None: - ... - - @property - def at(self) -> None: - ... - - @property - def reduce(self) -> None: - ... - - @property - def accumulate(self) -> None: - ... - - @property - def reduceat(self) -> None: - ... - - @property - def outer(self) -> None: - ... - - @overload - def __call__(self, __x1: _ScalarLike_co, __x2: _ScalarLike_co, __out1: None = ..., __out2: None = ..., *, where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _4Tuple[None | str] = ..., extobj: list[Any] = ...) -> _2Tuple[Any]: - ... - - @overload - def __call__(self, __x1: ArrayLike, __x2: ArrayLike, __out1: None | NDArray[Any] = ..., __out2: None | NDArray[Any] = ..., *, out: _2Tuple[NDArray[Any]] = ..., where: None | _ArrayLikeBool_co = ..., casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _4Tuple[None | str] = ..., extobj: list[Any] = ...) -> _2Tuple[NDArray[Any]]: - ... - - - -class _GUFunc_Nin2_Nout1(ufunc, Generic[_NameType, _NTypes, _IDType]): - @property - def __name__(self) -> _NameType: - ... - - @property - def ntypes(self) -> _NTypes: - ... - - @property - def identity(self) -> _IDType: - ... - - @property - def nin(self) -> Literal[2]: - ... - - @property - def nout(self) -> Literal[1]: - ... - - @property - def nargs(self) -> Literal[3]: - ... - - @property - def signature(self) -> Literal["(n?,k),(k,m?)->(n?,m?)"]: - ... - - @property - def reduce(self) -> None: - ... - - @property - def accumulate(self) -> None: - ... - - @property - def reduceat(self) -> None: - ... - - @property - def outer(self) -> None: - ... - - @property - def at(self) -> None: - ... - - @overload - def __call__(self, __x1: ArrayLike, __x2: ArrayLike, out: None = ..., *, casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ..., axes: list[_2Tuple[SupportsIndex]] = ...) -> Any: - ... - - @overload - def __call__(self, __x1: ArrayLike, __x2: ArrayLike, out: NDArray[Any] | tuple[NDArray[Any]], *, casting: _CastingKind = ..., order: _OrderKACF = ..., dtype: DTypeLike = ..., subok: bool = ..., signature: str | _3Tuple[None | str] = ..., extobj: list[Any] = ..., axes: list[_2Tuple[SupportsIndex]] = ...) -> NDArray[Any]: - ... - - - diff --git a/typings/numpy/_utils/__init__.pyi b/typings/numpy/_utils/__init__.pyi deleted file mode 100644 index 4dac46e..0000000 --- a/typings/numpy/_utils/__init__.pyi +++ /dev/null @@ -1,28 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._convertions import asbytes, asunicode - -""" -This is a module for defining private helpers which do not depend on the -rest of NumPy. - -Everything in here must be self-contained so that it can be -imported anywhere else without creating circular imports. -If a utility requires the import of NumPy, it probably belongs -in ``numpy.core``. -""" -def set_module(module): # -> (func: Unknown) -> Unknown: - """Private decorator for overriding __module__ on a function or class. - - Example usage:: - - @set_module('numpy') - def example(): - pass - - assert example.__module__ == 'numpy' - """ - ... - diff --git a/typings/numpy/_utils/_convertions.pyi b/typings/numpy/_utils/_convertions.pyi deleted file mode 100644 index e16a31a..0000000 --- a/typings/numpy/_utils/_convertions.pyi +++ /dev/null @@ -1,15 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -""" -A set of methods retained from np.compat module that -are still used across codebase. -""" -__all__ = ["asunicode", "asbytes"] -def asunicode(s): # -> str: - ... - -def asbytes(s): # -> bytes: - ... - diff --git a/typings/numpy/_utils/_inspect.pyi b/typings/numpy/_utils/_inspect.pyi deleted file mode 100644 index 29a7aa3..0000000 --- a/typings/numpy/_utils/_inspect.pyi +++ /dev/null @@ -1,123 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -"""Subset of inspect module from upstream python - -We use this instead of upstream because upstream inspect is slow to import, and -significantly contributes to numpy import times. Importing this copy has almost -no overhead. - -""" -__all__ = ['getargspec', 'formatargspec'] -def ismethod(object): # -> bool: - """Return true if the object is an instance method. - - Instance method objects provide these attributes: - __doc__ documentation string - __name__ name with which this method was defined - im_class class object in which this method belongs - im_func function object containing implementation of method - im_self instance to which this method is bound, or None - - """ - ... - -def isfunction(object): # -> bool: - """Return true if the object is a user-defined function. - - Function objects provide these attributes: - __doc__ documentation string - __name__ name with which this function was defined - func_code code object containing compiled function bytecode - func_defaults tuple of any default values for arguments - func_doc (same as __doc__) - func_globals global namespace in which this function was defined - func_name (same as __name__) - - """ - ... - -def iscode(object): # -> bool: - """Return true if the object is a code object. - - Code objects provide these attributes: - co_argcount number of arguments (not including * or ** args) - co_code string of raw compiled bytecode - co_consts tuple of constants used in the bytecode - co_filename name of file in which this code object was created - co_firstlineno number of first line in Python source code - co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg - co_lnotab encoded mapping of line numbers to bytecode indices - co_name name with which this code object was defined - co_names tuple of names of local variables - co_nlocals number of local variables - co_stacksize virtual machine stack space required - co_varnames tuple of names of arguments and local variables - - """ - ... - -def getargs(co): # -> tuple[list[Unknown], Unknown | None, Unknown | None]: - """Get information about the arguments accepted by a code object. - - Three things are returned: (args, varargs, varkw), where 'args' is - a list of argument names (possibly containing nested lists), and - 'varargs' and 'varkw' are the names of the * and ** arguments or None. - - """ - ... - -def getargspec(func): # -> tuple[list[Unknown], Unknown | None, Unknown | None, Unknown]: - """Get the names and default values of a function's arguments. - - A tuple of four things is returned: (args, varargs, varkw, defaults). - 'args' is a list of the argument names (it may contain nested lists). - 'varargs' and 'varkw' are the names of the * and ** arguments or None. - 'defaults' is an n-tuple of the default values of the last n arguments. - - """ - ... - -def getargvalues(frame): # -> tuple[list[Unknown], Unknown | None, Unknown | None, Unknown]: - """Get information about arguments passed into a particular frame. - - A tuple of four things is returned: (args, varargs, varkw, locals). - 'args' is a list of the argument names (it may contain nested lists). - 'varargs' and 'varkw' are the names of the * and ** arguments or None. - 'locals' is the locals dictionary of the given frame. - - """ - ... - -def joinseq(seq): # -> str: - ... - -def strseq(object, convert, join=...): - """Recursively walk a sequence, stringifying each element. - - """ - ... - -def formatargspec(args, varargs=..., varkw=..., defaults=..., formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=..., join=...): # -> LiteralString: - """Format an argument spec from the 4 values returned by getargspec. - - The first four arguments are (args, varargs, varkw, defaults). The - other four arguments are the corresponding optional formatting functions - that are called to turn names and values into strings. The ninth - argument is an optional function to format the sequence of arguments. - - """ - ... - -def formatargvalues(args, varargs, varkw, locals, formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=..., join=...): # -> LiteralString: - """Format an argument spec from the 4 values returned by getargvalues. - - The first four arguments are (args, varargs, varkw, locals). The - next four arguments are the corresponding optional formatting functions - that are called to turn names and values into strings. The ninth - argument is an optional function to format the sequence of arguments. - - """ - ... - diff --git a/typings/numpy/array_api/__init__.pyi b/typings/numpy/array_api/__init__.pyi deleted file mode 100644 index b47d549..0000000 --- a/typings/numpy/array_api/__init__.pyi +++ /dev/null @@ -1,152 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import warnings -from ._constants import e, inf, nan, pi -from ._creation_functions import arange, asarray, empty, empty_like, eye, from_dlpack, full, full_like, linspace, meshgrid, ones, ones_like, tril, triu, zeros, zeros_like -from ._data_type_functions import astype, broadcast_arrays, broadcast_to, can_cast, finfo, iinfo, isdtype, result_type -from ._dtypes import bool, complex128, complex64, float32, float64, int16, int32, int64, int8, uint16, uint32, uint64, uint8 -from ._elementwise_functions import abs, acos, acosh, add, asin, asinh, atan, atan2, atanh, bitwise_and, bitwise_invert, bitwise_left_shift, bitwise_or, bitwise_right_shift, bitwise_xor, ceil, conj, cos, cosh, divide, equal, exp, expm1, floor, floor_divide, greater, greater_equal, imag, isfinite, isinf, isnan, less, less_equal, log, log10, log1p, log2, logaddexp, logical_and, logical_not, logical_or, logical_xor, multiply, negative, not_equal, positive, pow, real, remainder, round, sign, sin, sinh, sqrt, square, subtract, tan, tanh, trunc -from ._indexing_functions import take -from . import linalg -from .linalg import matmul, matrix_transpose, tensordot, vecdot -from ._manipulation_functions import concat, expand_dims, flip, permute_dims, reshape, roll, squeeze, stack -from ._searching_functions import argmax, argmin, nonzero, where -from ._set_functions import unique_all, unique_counts, unique_inverse, unique_values -from ._sorting_functions import argsort, sort -from ._statistical_functions import max, mean, min, prod, std, sum, var -from ._utility_functions import all, any - -""" -A NumPy sub-namespace that conforms to the Python array API standard. - -This submodule accompanies NEP 47, which proposes its inclusion in NumPy. It -is still considered experimental, and will issue a warning when imported. - -This is a proof-of-concept namespace that wraps the corresponding NumPy -functions to give a conforming implementation of the Python array API standard -(https://data-apis.github.io/array-api/latest/). The standard is currently in -an RFC phase and comments on it are both welcome and encouraged. Comments -should be made either at https://github.com/data-apis/array-api or at -https://github.com/data-apis/consortium-feedback/discussions. - -NumPy already follows the proposed spec for the most part, so this module -serves mostly as a thin wrapper around it. However, NumPy also implements a -lot of behavior that is not included in the spec, so this serves as a -restricted subset of the API. Only those functions that are part of the spec -are included in this namespace, and all functions are given with the exact -signature given in the spec, including the use of position-only arguments, and -omitting any extra keyword arguments implemented by NumPy but not part of the -spec. The behavior of some functions is also modified from the NumPy behavior -to conform to the standard. Note that the underlying array object itself is -wrapped in a wrapper Array() class, but is otherwise unchanged. This submodule -is implemented in pure Python with no C extensions. - -The array API spec is designed as a "minimal API subset" and explicitly allows -libraries to include behaviors not specified by it. But users of this module -that intend to write portable code should be aware that only those behaviors -that are listed in the spec are guaranteed to be implemented across libraries. -Consequently, the NumPy implementation was chosen to be both conforming and -minimal, so that users can use this implementation of the array API namespace -and be sure that behaviors that it defines will be available in conforming -namespaces from other libraries. - -A few notes about the current state of this submodule: - -- There is a test suite that tests modules against the array API standard at - https://github.com/data-apis/array-api-tests. The test suite is still a work - in progress, but the existing tests pass on this module, with a few - exceptions: - - - DLPack support (see https://github.com/data-apis/array-api/pull/106) is - not included here, as it requires a full implementation in NumPy proper - first. - - The test suite is not yet complete, and even the tests that exist are not - guaranteed to give a comprehensive coverage of the spec. Therefore, when - reviewing and using this submodule, you should refer to the standard - documents themselves. There are some tests in numpy.array_api.tests, but - they primarily focus on things that are not tested by the official array API - test suite. - -- There is a custom array object, numpy.array_api.Array, which is returned by - all functions in this module. All functions in the array API namespace - implicitly assume that they will only receive this object as input. The only - way to create instances of this object is to use one of the array creation - functions. It does not have a public constructor on the object itself. The - object is a small wrapper class around numpy.ndarray. The main purpose of it - is to restrict the namespace of the array object to only those dtypes and - only those methods that are required by the spec, as well as to limit/change - certain behavior that differs in the spec. In particular: - - - The array API namespace does not have scalar objects, only 0-D arrays. - Operations on Array that would create a scalar in NumPy create a 0-D - array. - - - Indexing: Only a subset of indices supported by NumPy are required by the - spec. The Array object restricts indexing to only allow those types of - indices that are required by the spec. See the docstring of the - numpy.array_api.Array._validate_indices helper function for more - information. - - - Type promotion: Some type promotion rules are different in the spec. In - particular, the spec does not have any value-based casting. The spec also - does not require cross-kind casting, like integer -> floating-point. Only - those promotions that are explicitly required by the array API - specification are allowed in this module. See NEP 47 for more info. - - - Functions do not automatically call asarray() on their input, and will not - work if the input type is not Array. The exception is array creation - functions, and Python operators on the Array object, which accept Python - scalars of the same type as the array dtype. - -- All functions include type annotations, corresponding to those given in the - spec (see _typing.py for definitions of some custom types). These do not - currently fully pass mypy due to some limitations in mypy. - -- Dtype objects are just the NumPy dtype objects, e.g., float64 = - np.dtype('float64'). The spec does not require any behavior on these dtype - objects other than that they be accessible by name and be comparable by - equality, but it was considered too much extra complexity to create custom - objects to represent dtypes. - -- All places where the implementations in this submodule are known to deviate - from their corresponding functions in NumPy are marked with "# Note:" - comments. - -Still TODO in this module are: - -- DLPack support for numpy.ndarray is still in progress. See - https://github.com/numpy/numpy/pull/19083. - -- The copy=False keyword argument to asarray() is not yet implemented. This - requires support in numpy.asarray() first. - -- Some functions are not yet fully tested in the array API test suite, and may - require updates that are not yet known until the tests are written. - -- The spec is still in an RFC phase and may still have minor updates, which - will need to be reflected here. - -- Complex number support in array API spec is planned but not yet finalized, - as are the fft extension and certain linear algebra functions such as eig - that require complex dtypes. - -""" -__array_api_version__ = ... -__all__ = ["__array_api_version__"] -__all__ += ["e", "inf", "nan", "pi"] -__all__ += ["asarray", "arange", "empty", "empty_like", "eye", "from_dlpack", "full", "full_like", "linspace", "meshgrid", "ones", "ones_like", "tril", "triu", "zeros", "zeros_like"] -__all__ += ["astype", "broadcast_arrays", "broadcast_to", "can_cast", "finfo", "iinfo", "result_type"] -__all__ += ["int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "float32", "float64", "bool"] -__all__ += ["abs", "acos", "acosh", "add", "asin", "asinh", "atan", "atan2", "atanh", "bitwise_and", "bitwise_left_shift", "bitwise_invert", "bitwise_or", "bitwise_right_shift", "bitwise_xor", "ceil", "cos", "cosh", "divide", "equal", "exp", "expm1", "floor", "floor_divide", "greater", "greater_equal", "isfinite", "isinf", "isnan", "less", "less_equal", "log", "log1p", "log2", "log10", "logaddexp", "logical_and", "logical_not", "logical_or", "logical_xor", "multiply", "negative", "not_equal", "positive", "pow", "remainder", "round", "sign", "sin", "sinh", "square", "sqrt", "subtract", "tan", "tanh", "trunc"] -__all__ += ["take"] -__all__ += ["linalg"] -__all__ += ["matmul", "tensordot", "matrix_transpose", "vecdot"] -__all__ += ["concat", "expand_dims", "flip", "permute_dims", "reshape", "roll", "squeeze", "stack"] -__all__ += ["argmax", "argmin", "nonzero", "where"] -__all__ += ["unique_all", "unique_counts", "unique_inverse", "unique_values"] -__all__ += ["argsort", "sort"] -__all__ += ["max", "mean", "min", "prod", "std", "sum", "var"] -__all__ += ["all", "any"] diff --git a/typings/numpy/array_api/_array_object.pyi b/typings/numpy/array_api/_array_object.pyi deleted file mode 100644 index 5504c83..0000000 --- a/typings/numpy/array_api/_array_object.pyi +++ /dev/null @@ -1,476 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import types -import numpy.typing as npt -import numpy as np -from enum import IntEnum -from typing import Any, Optional, TYPE_CHECKING, Tuple, Union -from ._typing import Any, Device, Dtype, PyCapsule - -""" -Wrapper class around the ndarray object for the array API standard. - -The array API standard defines some behaviors differently than ndarray, in -particular, type promotion rules are different (the standard has no -value-based casting). The standard also specifies a more limited subset of -array methods and functionalities than are implemented on ndarray. Since the -goal of the array_api namespace is to be a minimal implementation of the array -API standard, we need to define a separate wrapper class for the array_api -namespace. - -The standard compliant class is only a wrapper class. It is *not* a subclass -of ndarray. -""" -if TYPE_CHECKING: - ... -class Array: - """ - n-d array object for the array API namespace. - - See the docstring of :py:obj:`np.ndarray ` for more - information. - - This is a wrapper around numpy.ndarray that restricts the usage to only - those things that are required by the array API namespace. Note, - attributes on this object that start with a single underscore are not part - of the API specification and should only be used internally. This object - should not be constructed directly. Rather, use one of the creation - functions, such as asarray(). - - """ - _array: np.ndarray[Any, Any] - def __new__(cls, *args, **kwargs): - ... - - def __str__(self: Array, /) -> str: - """ - Performs the operation __str__. - """ - ... - - def __repr__(self: Array, /) -> str: - """ - Performs the operation __repr__. - """ - ... - - def __array__(self, dtype: None | np.dtype[Any] = ...) -> npt.NDArray[Any]: - """ - Warning: this method is NOT part of the array API spec. Implementers - of other libraries need not include it, and users should not assume it - will be present in other implementations. - - """ - ... - - def __abs__(self: Array, /) -> Array: - """ - Performs the operation __abs__. - """ - ... - - def __add__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __add__. - """ - ... - - def __and__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __and__. - """ - ... - - def __array_namespace__(self: Array, /, *, api_version: Optional[str] = ...) -> types.ModuleType: - ... - - def __bool__(self: Array, /) -> bool: - """ - Performs the operation __bool__. - """ - ... - - def __complex__(self: Array, /) -> complex: - """ - Performs the operation __complex__. - """ - ... - - def __dlpack__(self: Array, /, *, stream: None = ...) -> PyCapsule: - """ - Performs the operation __dlpack__. - """ - ... - - def __dlpack_device__(self: Array, /) -> Tuple[IntEnum, int]: - """ - Performs the operation __dlpack_device__. - """ - ... - - def __eq__(self: Array, other: Union[int, float, bool, Array], /) -> Array: - """ - Performs the operation __eq__. - """ - ... - - def __float__(self: Array, /) -> float: - """ - Performs the operation __float__. - """ - ... - - def __floordiv__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __floordiv__. - """ - ... - - def __ge__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __ge__. - """ - ... - - def __getitem__(self: Array, key: Union[int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], Array], /) -> Array: - """ - Performs the operation __getitem__. - """ - ... - - def __gt__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __gt__. - """ - ... - - def __int__(self: Array, /) -> int: - """ - Performs the operation __int__. - """ - ... - - def __index__(self: Array, /) -> int: - """ - Performs the operation __index__. - """ - ... - - def __invert__(self: Array, /) -> Array: - """ - Performs the operation __invert__. - """ - ... - - def __le__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __le__. - """ - ... - - def __lshift__(self: Array, other: Union[int, Array], /) -> Array: - """ - Performs the operation __lshift__. - """ - ... - - def __lt__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __lt__. - """ - ... - - def __matmul__(self: Array, other: Array, /) -> Array: - """ - Performs the operation __matmul__. - """ - ... - - def __mod__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __mod__. - """ - ... - - def __mul__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __mul__. - """ - ... - - def __ne__(self: Array, other: Union[int, float, bool, Array], /) -> Array: - """ - Performs the operation __ne__. - """ - ... - - def __neg__(self: Array, /) -> Array: - """ - Performs the operation __neg__. - """ - ... - - def __or__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __or__. - """ - ... - - def __pos__(self: Array, /) -> Array: - """ - Performs the operation __pos__. - """ - ... - - def __pow__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __pow__. - """ - ... - - def __rshift__(self: Array, other: Union[int, Array], /) -> Array: - """ - Performs the operation __rshift__. - """ - ... - - def __setitem__(self, key: Union[int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], Array], value: Union[int, float, bool, Array], /) -> None: - """ - Performs the operation __setitem__. - """ - ... - - def __sub__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __sub__. - """ - ... - - def __truediv__(self: Array, other: Union[float, Array], /) -> Array: - """ - Performs the operation __truediv__. - """ - ... - - def __xor__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __xor__. - """ - ... - - def __iadd__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __iadd__. - """ - ... - - def __radd__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __radd__. - """ - ... - - def __iand__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __iand__. - """ - ... - - def __rand__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __rand__. - """ - ... - - def __ifloordiv__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __ifloordiv__. - """ - ... - - def __rfloordiv__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __rfloordiv__. - """ - ... - - def __ilshift__(self: Array, other: Union[int, Array], /) -> Array: - """ - Performs the operation __ilshift__. - """ - ... - - def __rlshift__(self: Array, other: Union[int, Array], /) -> Array: - """ - Performs the operation __rlshift__. - """ - ... - - def __imatmul__(self: Array, other: Array, /) -> Array: - """ - Performs the operation __imatmul__. - """ - ... - - def __rmatmul__(self: Array, other: Array, /) -> Array: - """ - Performs the operation __rmatmul__. - """ - ... - - def __imod__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __imod__. - """ - ... - - def __rmod__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __rmod__. - """ - ... - - def __imul__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __imul__. - """ - ... - - def __rmul__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __rmul__. - """ - ... - - def __ior__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __ior__. - """ - ... - - def __ror__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __ror__. - """ - ... - - def __ipow__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __ipow__. - """ - ... - - def __rpow__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __rpow__. - """ - ... - - def __irshift__(self: Array, other: Union[int, Array], /) -> Array: - """ - Performs the operation __irshift__. - """ - ... - - def __rrshift__(self: Array, other: Union[int, Array], /) -> Array: - """ - Performs the operation __rrshift__. - """ - ... - - def __isub__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __isub__. - """ - ... - - def __rsub__(self: Array, other: Union[int, float, Array], /) -> Array: - """ - Performs the operation __rsub__. - """ - ... - - def __itruediv__(self: Array, other: Union[float, Array], /) -> Array: - """ - Performs the operation __itruediv__. - """ - ... - - def __rtruediv__(self: Array, other: Union[float, Array], /) -> Array: - """ - Performs the operation __rtruediv__. - """ - ... - - def __ixor__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __ixor__. - """ - ... - - def __rxor__(self: Array, other: Union[int, bool, Array], /) -> Array: - """ - Performs the operation __rxor__. - """ - ... - - def to_device(self: Array, device: Device, /, stream: None = ...) -> Array: - ... - - @property - def dtype(self) -> Dtype: - """ - Array API compatible wrapper for :py:meth:`np.ndarray.dtype `. - - See its docstring for more information. - """ - ... - - @property - def device(self) -> Device: - ... - - @property - def mT(self) -> Array: - ... - - @property - def ndim(self) -> int: - """ - Array API compatible wrapper for :py:meth:`np.ndarray.ndim `. - - See its docstring for more information. - """ - ... - - @property - def shape(self) -> Tuple[int, ...]: - """ - Array API compatible wrapper for :py:meth:`np.ndarray.shape `. - - See its docstring for more information. - """ - ... - - @property - def size(self) -> int: - """ - Array API compatible wrapper for :py:meth:`np.ndarray.size `. - - See its docstring for more information. - """ - ... - - @property - def T(self) -> Array: - """ - Array API compatible wrapper for :py:meth:`np.ndarray.T `. - - See its docstring for more information. - """ - ... - - - diff --git a/typings/numpy/array_api/_constants.pyi b/typings/numpy/array_api/_constants.pyi deleted file mode 100644 index 8c0e4f8..0000000 --- a/typings/numpy/array_api/_constants.pyi +++ /dev/null @@ -1,8 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -e = ... -inf = ... -nan = ... -pi = ... diff --git a/typings/numpy/array_api/_creation_functions.pyi b/typings/numpy/array_api/_creation_functions.pyi deleted file mode 100644 index 1285930..0000000 --- a/typings/numpy/array_api/_creation_functions.pyi +++ /dev/null @@ -1,133 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from typing import List, Optional, TYPE_CHECKING, Tuple, Union -from ._typing import Array, Device, Dtype, NestedSequence, SupportsBufferProtocol - -if TYPE_CHECKING: - ... -def asarray(obj: Union[Array, bool, int, float, NestedSequence[bool | int | float], SupportsBufferProtocol,], /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ..., copy: Optional[Union[bool, np._CopyMode]] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.asarray `. - - See its docstring for more information. - """ - ... - -def arange(start: Union[int, float], /, stop: Optional[Union[int, float]] = ..., step: Union[int, float] = ..., *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arange `. - - See its docstring for more information. - """ - ... - -def empty(shape: Union[int, Tuple[int, ...]], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.empty `. - - See its docstring for more information. - """ - ... - -def empty_like(x: Array, /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.empty_like `. - - See its docstring for more information. - """ - ... - -def eye(n_rows: int, n_cols: Optional[int] = ..., /, *, k: int = ..., dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.eye `. - - See its docstring for more information. - """ - ... - -def from_dlpack(x: object, /) -> Array: - ... - -def full(shape: Union[int, Tuple[int, ...]], fill_value: Union[int, float], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.full `. - - See its docstring for more information. - """ - ... - -def full_like(x: Array, /, fill_value: Union[int, float], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.full_like `. - - See its docstring for more information. - """ - ... - -def linspace(start: Union[int, float], stop: Union[int, float], /, num: int, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ..., endpoint: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linspace `. - - See its docstring for more information. - """ - ... - -def meshgrid(*arrays: Array, indexing: str = ...) -> List[Array]: - """ - Array API compatible wrapper for :py:func:`np.meshgrid `. - - See its docstring for more information. - """ - ... - -def ones(shape: Union[int, Tuple[int, ...]], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.ones `. - - See its docstring for more information. - """ - ... - -def ones_like(x: Array, /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.ones_like `. - - See its docstring for more information. - """ - ... - -def tril(x: Array, /, *, k: int = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.tril `. - - See its docstring for more information. - """ - ... - -def triu(x: Array, /, *, k: int = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.triu `. - - See its docstring for more information. - """ - ... - -def zeros(shape: Union[int, Tuple[int, ...]], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.zeros `. - - See its docstring for more information. - """ - ... - -def zeros_like(x: Array, /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.zeros_like `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_data_type_functions.pyi b/typings/numpy/array_api/_data_type_functions.pyi deleted file mode 100644 index a08e6ff..0000000 --- a/typings/numpy/array_api/_data_type_functions.pyi +++ /dev/null @@ -1,92 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array -from dataclasses import dataclass -from typing import List, TYPE_CHECKING, Tuple, Union -from ._typing import Dtype - -if TYPE_CHECKING: - ... -def astype(x: Array, dtype: Dtype, /, *, copy: bool = ...) -> Array: - ... - -def broadcast_arrays(*arrays: Array) -> List[Array]: - """ - Array API compatible wrapper for :py:func:`np.broadcast_arrays `. - - See its docstring for more information. - """ - ... - -def broadcast_to(x: Array, /, shape: Tuple[int, ...]) -> Array: - """ - Array API compatible wrapper for :py:func:`np.broadcast_to `. - - See its docstring for more information. - """ - ... - -def can_cast(from_: Union[Dtype, Array], to: Dtype, /) -> bool: - """ - Array API compatible wrapper for :py:func:`np.can_cast `. - - See its docstring for more information. - """ - ... - -@dataclass -class finfo_object: - bits: int - eps: float - max: float - min: float - smallest_normal: float - dtype: Dtype - ... - - -@dataclass -class iinfo_object: - bits: int - max: int - min: int - dtype: Dtype - ... - - -def finfo(type: Union[Dtype, Array], /) -> finfo_object: - """ - Array API compatible wrapper for :py:func:`np.finfo `. - - See its docstring for more information. - """ - ... - -def iinfo(type: Union[Dtype, Array], /) -> iinfo_object: - """ - Array API compatible wrapper for :py:func:`np.iinfo `. - - See its docstring for more information. - """ - ... - -def isdtype(dtype: Dtype, kind: Union[Dtype, str, Tuple[Union[Dtype, str], ...]]) -> bool: - """ - Returns a boolean indicating whether a provided dtype is of a specified data type ``kind``. - - See - https://data-apis.org/array-api/latest/API_specification/generated/array_api.isdtype.html - for more details - """ - ... - -def result_type(*arrays_and_dtypes: Union[Array, Dtype]) -> Dtype: - """ - Array API compatible wrapper for :py:func:`np.result_type `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_dtypes.pyi b/typings/numpy/array_api/_dtypes.pyi deleted file mode 100644 index 405ab08..0000000 --- a/typings/numpy/array_api/_dtypes.pyi +++ /dev/null @@ -1,30 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -int8 = ... -int16 = ... -int32 = ... -int64 = ... -uint8 = ... -uint16 = ... -uint32 = ... -uint64 = ... -float32 = ... -float64 = ... -complex64 = ... -complex128 = ... -bool = ... -_all_dtypes = ... -_boolean_dtypes = ... -_real_floating_dtypes = ... -_floating_dtypes = ... -_complex_floating_dtypes = ... -_integer_dtypes = ... -_signed_integer_dtypes = ... -_unsigned_integer_dtypes = ... -_integer_or_boolean_dtypes = ... -_real_numeric_dtypes = ... -_numeric_dtypes = ... -_dtype_categories = ... -_promotion_table = ... diff --git a/typings/numpy/array_api/_elementwise_functions.pyi b/typings/numpy/array_api/_elementwise_functions.pyi deleted file mode 100644 index 7958ffa..0000000 --- a/typings/numpy/array_api/_elementwise_functions.pyi +++ /dev/null @@ -1,478 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array - -def abs(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.abs `. - - See its docstring for more information. - """ - ... - -def acos(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arccos `. - - See its docstring for more information. - """ - ... - -def acosh(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arccosh `. - - See its docstring for more information. - """ - ... - -def add(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.add `. - - See its docstring for more information. - """ - ... - -def asin(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arcsin `. - - See its docstring for more information. - """ - ... - -def asinh(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arcsinh `. - - See its docstring for more information. - """ - ... - -def atan(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arctan `. - - See its docstring for more information. - """ - ... - -def atan2(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arctan2 `. - - See its docstring for more information. - """ - ... - -def atanh(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.arctanh `. - - See its docstring for more information. - """ - ... - -def bitwise_and(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.bitwise_and `. - - See its docstring for more information. - """ - ... - -def bitwise_left_shift(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.left_shift `. - - See its docstring for more information. - """ - ... - -def bitwise_invert(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.invert `. - - See its docstring for more information. - """ - ... - -def bitwise_or(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.bitwise_or `. - - See its docstring for more information. - """ - ... - -def bitwise_right_shift(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.right_shift `. - - See its docstring for more information. - """ - ... - -def bitwise_xor(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.bitwise_xor `. - - See its docstring for more information. - """ - ... - -def ceil(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.ceil `. - - See its docstring for more information. - """ - ... - -def conj(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.conj `. - - See its docstring for more information. - """ - ... - -def cos(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.cos `. - - See its docstring for more information. - """ - ... - -def cosh(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.cosh `. - - See its docstring for more information. - """ - ... - -def divide(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.divide `. - - See its docstring for more information. - """ - ... - -def equal(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.equal `. - - See its docstring for more information. - """ - ... - -def exp(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.exp `. - - See its docstring for more information. - """ - ... - -def expm1(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.expm1 `. - - See its docstring for more information. - """ - ... - -def floor(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.floor `. - - See its docstring for more information. - """ - ... - -def floor_divide(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.floor_divide `. - - See its docstring for more information. - """ - ... - -def greater(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.greater `. - - See its docstring for more information. - """ - ... - -def greater_equal(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.greater_equal `. - - See its docstring for more information. - """ - ... - -def imag(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.imag `. - - See its docstring for more information. - """ - ... - -def isfinite(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.isfinite `. - - See its docstring for more information. - """ - ... - -def isinf(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.isinf `. - - See its docstring for more information. - """ - ... - -def isnan(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.isnan `. - - See its docstring for more information. - """ - ... - -def less(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.less `. - - See its docstring for more information. - """ - ... - -def less_equal(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.less_equal `. - - See its docstring for more information. - """ - ... - -def log(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.log `. - - See its docstring for more information. - """ - ... - -def log1p(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.log1p `. - - See its docstring for more information. - """ - ... - -def log2(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.log2 `. - - See its docstring for more information. - """ - ... - -def log10(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.log10 `. - - See its docstring for more information. - """ - ... - -def logaddexp(x1: Array, x2: Array) -> Array: - """ - Array API compatible wrapper for :py:func:`np.logaddexp `. - - See its docstring for more information. - """ - ... - -def logical_and(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.logical_and `. - - See its docstring for more information. - """ - ... - -def logical_not(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.logical_not `. - - See its docstring for more information. - """ - ... - -def logical_or(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.logical_or `. - - See its docstring for more information. - """ - ... - -def logical_xor(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.logical_xor `. - - See its docstring for more information. - """ - ... - -def multiply(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.multiply `. - - See its docstring for more information. - """ - ... - -def negative(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.negative `. - - See its docstring for more information. - """ - ... - -def not_equal(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.not_equal `. - - See its docstring for more information. - """ - ... - -def positive(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.positive `. - - See its docstring for more information. - """ - ... - -def pow(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.power `. - - See its docstring for more information. - """ - ... - -def real(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.real `. - - See its docstring for more information. - """ - ... - -def remainder(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.remainder `. - - See its docstring for more information. - """ - ... - -def round(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.round `. - - See its docstring for more information. - """ - ... - -def sign(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.sign `. - - See its docstring for more information. - """ - ... - -def sin(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.sin `. - - See its docstring for more information. - """ - ... - -def sinh(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.sinh `. - - See its docstring for more information. - """ - ... - -def square(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.square `. - - See its docstring for more information. - """ - ... - -def sqrt(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.sqrt `. - - See its docstring for more information. - """ - ... - -def subtract(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.subtract `. - - See its docstring for more information. - """ - ... - -def tan(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.tan `. - - See its docstring for more information. - """ - ... - -def tanh(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.tanh `. - - See its docstring for more information. - """ - ... - -def trunc(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.trunc `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_indexing_functions.pyi b/typings/numpy/array_api/_indexing_functions.pyi deleted file mode 100644 index 0b94dbe..0000000 --- a/typings/numpy/array_api/_indexing_functions.pyi +++ /dev/null @@ -1,14 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array - -def take(x: Array, indices: Array, /, *, axis: Optional[int] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.take `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_manipulation_functions.pyi b/typings/numpy/array_api/_manipulation_functions.pyi deleted file mode 100644 index 383f2ff..0000000 --- a/typings/numpy/array_api/_manipulation_functions.pyi +++ /dev/null @@ -1,71 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array -from typing import List, Optional, Tuple, Union - -def concat(arrays: Union[Tuple[Array, ...], List[Array]], /, *, axis: Optional[int] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.concatenate `. - - See its docstring for more information. - """ - ... - -def expand_dims(x: Array, /, *, axis: int) -> Array: - """ - Array API compatible wrapper for :py:func:`np.expand_dims `. - - See its docstring for more information. - """ - ... - -def flip(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.flip `. - - See its docstring for more information. - """ - ... - -def permute_dims(x: Array, /, axes: Tuple[int, ...]) -> Array: - """ - Array API compatible wrapper for :py:func:`np.transpose `. - - See its docstring for more information. - """ - ... - -def reshape(x: Array, /, shape: Tuple[int, ...], *, copy: Optional[Bool] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.reshape `. - - See its docstring for more information. - """ - ... - -def roll(x: Array, /, shift: Union[int, Tuple[int, ...]], *, axis: Optional[Union[int, Tuple[int, ...]]] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.roll `. - - See its docstring for more information. - """ - ... - -def squeeze(x: Array, /, axis: Union[int, Tuple[int, ...]]) -> Array: - """ - Array API compatible wrapper for :py:func:`np.squeeze `. - - See its docstring for more information. - """ - ... - -def stack(arrays: Union[Tuple[Array, ...], List[Array]], /, *, axis: int = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.stack `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_searching_functions.pyi b/typings/numpy/array_api/_searching_functions.pyi deleted file mode 100644 index caf870a..0000000 --- a/typings/numpy/array_api/_searching_functions.pyi +++ /dev/null @@ -1,39 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array -from typing import Optional, Tuple - -def argmax(x: Array, /, *, axis: Optional[int] = ..., keepdims: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.argmax `. - - See its docstring for more information. - """ - ... - -def argmin(x: Array, /, *, axis: Optional[int] = ..., keepdims: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.argmin `. - - See its docstring for more information. - """ - ... - -def nonzero(x: Array, /) -> Tuple[Array, ...]: - """ - Array API compatible wrapper for :py:func:`np.nonzero `. - - See its docstring for more information. - """ - ... - -def where(condition: Array, x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.where `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_set_functions.pyi b/typings/numpy/array_api/_set_functions.pyi deleted file mode 100644 index 1784345..0000000 --- a/typings/numpy/array_api/_set_functions.pyi +++ /dev/null @@ -1,54 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array -from typing import NamedTuple - -class UniqueAllResult(NamedTuple): - values: Array - indices: Array - inverse_indices: Array - counts: Array - ... - - -class UniqueCountsResult(NamedTuple): - values: Array - counts: Array - ... - - -class UniqueInverseResult(NamedTuple): - values: Array - inverse_indices: Array - ... - - -def unique_all(x: Array, /) -> UniqueAllResult: - """ - Array API compatible wrapper for :py:func:`np.unique `. - - See its docstring for more information. - """ - ... - -def unique_counts(x: Array, /) -> UniqueCountsResult: - ... - -def unique_inverse(x: Array, /) -> UniqueInverseResult: - """ - Array API compatible wrapper for :py:func:`np.unique `. - - See its docstring for more information. - """ - ... - -def unique_values(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.unique `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_sorting_functions.pyi b/typings/numpy/array_api/_sorting_functions.pyi deleted file mode 100644 index c5d242b..0000000 --- a/typings/numpy/array_api/_sorting_functions.pyi +++ /dev/null @@ -1,22 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array - -def argsort(x: Array, /, *, axis: int = ..., descending: bool = ..., stable: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.argsort `. - - See its docstring for more information. - """ - ... - -def sort(x: Array, /, *, axis: int = ..., descending: bool = ..., stable: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.sort `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/_statistical_functions.pyi b/typings/numpy/array_api/_statistical_functions.pyi deleted file mode 100644 index 9af3d56..0000000 --- a/typings/numpy/array_api/_statistical_functions.pyi +++ /dev/null @@ -1,31 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array -from typing import Optional, TYPE_CHECKING, Tuple, Union -from ._typing import Dtype - -if TYPE_CHECKING: - ... -def max(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array: - ... - -def mean(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array: - ... - -def min(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array: - ... - -def prod(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., dtype: Optional[Dtype] = ..., keepdims: bool = ...) -> Array: - ... - -def std(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., correction: Union[int, float] = ..., keepdims: bool = ...) -> Array: - ... - -def sum(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., dtype: Optional[Dtype] = ..., keepdims: bool = ...) -> Array: - ... - -def var(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., correction: Union[int, float] = ..., keepdims: bool = ...) -> Array: - ... - diff --git a/typings/numpy/array_api/_typing.pyi b/typings/numpy/array_api/_typing.pyi deleted file mode 100644 index bab0bac..0000000 --- a/typings/numpy/array_api/_typing.pyi +++ /dev/null @@ -1,39 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import sys -from typing import Any, Literal, Protocol, TypeVar, Union -from numpy import dtype, float32, float64, int16, int32, int64, int8, uint16, uint32, uint64, uint8 - -""" -This file defines the types for type annotations. - -These names aren't part of the module namespace, but they are used in the -annotations in the function signatures. The functions in the module are only -valid for inputs that match the given type annotations. -""" -__all__ = ["Array", "Device", "Dtype", "SupportsDLPack", "SupportsBufferProtocol", "PyCapsule"] -_T_co = TypeVar("_T_co", covariant=True) -class NestedSequence(Protocol[_T_co]): - def __getitem__(self, key: int, /) -> _T_co | NestedSequence[_T_co]: - ... - - def __len__(self, /) -> int: - ... - - - -Device = Literal["cpu"] -Dtype = dtype[Union[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64,]] -if sys.version_info >= (3, 12): - ... -else: - ... -PyCapsule = Any -class SupportsDLPack(Protocol): - def __dlpack__(self, /, *, stream: None = ...) -> PyCapsule: - ... - - - diff --git a/typings/numpy/array_api/_utility_functions.pyi b/typings/numpy/array_api/_utility_functions.pyi deleted file mode 100644 index e5a911f..0000000 --- a/typings/numpy/array_api/_utility_functions.pyi +++ /dev/null @@ -1,23 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array -from typing import Optional, Tuple, Union - -def all(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.all `. - - See its docstring for more information. - """ - ... - -def any(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.any `. - - See its docstring for more information. - """ - ... - diff --git a/typings/numpy/array_api/linalg.pyi b/typings/numpy/array_api/linalg.pyi deleted file mode 100644 index 5634ea3..0000000 --- a/typings/numpy/array_api/linalg.pyi +++ /dev/null @@ -1,200 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._array_object import Array -from typing import NamedTuple, TYPE_CHECKING -from ._typing import Dtype, Literal, Optional, Sequence, Tuple, Union - -if TYPE_CHECKING: - ... -class EighResult(NamedTuple): - eigenvalues: Array - eigenvectors: Array - ... - - -class QRResult(NamedTuple): - Q: Array - R: Array - ... - - -class SlogdetResult(NamedTuple): - sign: Array - logabsdet: Array - ... - - -class SVDResult(NamedTuple): - U: Array - S: Array - Vh: Array - ... - - -def cholesky(x: Array, /, *, upper: bool = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.cholesky `. - - See its docstring for more information. - """ - ... - -def cross(x1: Array, x2: Array, /, *, axis: int = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.cross `. - - See its docstring for more information. - """ - ... - -def det(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.det `. - - See its docstring for more information. - """ - ... - -def diagonal(x: Array, /, *, offset: int = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.diagonal `. - - See its docstring for more information. - """ - ... - -def eigh(x: Array, /) -> EighResult: - """ - Array API compatible wrapper for :py:func:`np.linalg.eigh `. - - See its docstring for more information. - """ - ... - -def eigvalsh(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.eigvalsh `. - - See its docstring for more information. - """ - ... - -def inv(x: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.inv `. - - See its docstring for more information. - """ - ... - -def matmul(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.matmul `. - - See its docstring for more information. - """ - ... - -def matrix_norm(x: Array, /, *, keepdims: bool = ..., ord: Optional[Union[int, float, Literal[fro, nuc]]] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.norm `. - - See its docstring for more information. - """ - ... - -def matrix_power(x: Array, n: int, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.matrix_power `. - - See its docstring for more information. - """ - ... - -def matrix_rank(x: Array, /, *, rtol: Optional[Union[float, Array]] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.matrix_rank `. - - See its docstring for more information. - """ - ... - -def matrix_transpose(x: Array, /) -> Array: - ... - -def outer(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.outer `. - - See its docstring for more information. - """ - ... - -def pinv(x: Array, /, *, rtol: Optional[Union[float, Array]] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.pinv `. - - See its docstring for more information. - """ - ... - -def qr(x: Array, /, *, mode: Literal[reduced, complete] = ...) -> QRResult: - """ - Array API compatible wrapper for :py:func:`np.linalg.qr `. - - See its docstring for more information. - """ - ... - -def slogdet(x: Array, /) -> SlogdetResult: - """ - Array API compatible wrapper for :py:func:`np.linalg.slogdet `. - - See its docstring for more information. - """ - ... - -def solve(x1: Array, x2: Array, /) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.solve `. - - See its docstring for more information. - """ - ... - -def svd(x: Array, /, *, full_matrices: bool = ...) -> SVDResult: - """ - Array API compatible wrapper for :py:func:`np.linalg.svd `. - - See its docstring for more information. - """ - ... - -def svdvals(x: Array, /) -> Union[Array, Tuple[Array, ...]]: - ... - -def tensordot(x1: Array, x2: Array, /, *, axes: Union[int, Tuple[Sequence[int], Sequence[int]]] = ...) -> Array: - ... - -def trace(x: Array, /, *, offset: int = ..., dtype: Optional[Dtype] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.trace `. - - See its docstring for more information. - """ - ... - -def vecdot(x1: Array, x2: Array, /, *, axis: int = ...) -> Array: - ... - -def vector_norm(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ..., ord: Optional[Union[int, float]] = ...) -> Array: - """ - Array API compatible wrapper for :py:func:`np.linalg.norm `. - - See its docstring for more information. - """ - ... - -__all__ = ['cholesky', 'cross', 'det', 'diagonal', 'eigh', 'eigvalsh', 'inv', 'matmul', 'matrix_norm', 'matrix_power', 'matrix_rank', 'matrix_transpose', 'outer', 'pinv', 'qr', 'slogdet', 'solve', 'svd', 'svdvals', 'tensordot', 'trace', 'vecdot', 'vector_norm'] diff --git a/typings/numpy/compat/__init__.pyi b/typings/numpy/compat/__init__.pyi deleted file mode 100644 index a940069..0000000 --- a/typings/numpy/compat/__init__.pyi +++ /dev/null @@ -1,20 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .._utils import _inspect -from .._utils._inspect import formatargspec, getargspec -from . import py3k -from .py3k import * - -""" -Compatibility module. - -This module contains duplicated code from Python itself or 3rd party -extensions, which may be included for the following reasons: - - * compatibility - * we may only need a small subset of the copied library/module - -""" -__all__ = [] diff --git a/typings/numpy/compat/py3k.pyi b/typings/numpy/compat/py3k.pyi deleted file mode 100644 index bc1814e..0000000 --- a/typings/numpy/compat/py3k.pyi +++ /dev/null @@ -1,110 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os - -""" -Python 3.X compatibility tools. - -While this file was originally intended for Python 2 -> 3 transition, -it is now used to create a compatibility layer between different -minor versions of Python 3. - -While the active version of numpy may not support a given version of python, we -allow downstream libraries to continue to use these shims for forward -compatibility with numpy while they transition their code to newer versions of -Python. -""" -__all__ = ['bytes', 'asbytes', 'isfileobj', 'getexception', 'strchar', 'unicode', 'asunicode', 'asbytes_nested', 'asunicode_nested', 'asstr', 'open_latin1', 'long', 'basestring', 'sixu', 'integer_types', 'is_pathlib_path', 'npy_load_module', 'Path', 'pickle', 'contextlib_nullcontext', 'os_fspath', 'os_PathLike'] -long = int -integer_types = ... -basestring = str -unicode = str -bytes = bytes -def asunicode(s): # -> str: - ... - -def asbytes(s): # -> bytes: - ... - -def asstr(s): # -> str: - ... - -def isfileobj(f): # -> bool: - ... - -def open_latin1(filename, mode=...): # -> IO[Any]: - ... - -def sixu(s): - ... - -strchar = ... -def getexception(): # -> BaseException | None: - ... - -def asbytes_nested(x): # -> list[Unknown] | bytes: - ... - -def asunicode_nested(x): # -> list[Unknown] | str: - ... - -def is_pathlib_path(obj): # -> bool: - """ - Check whether obj is a `pathlib.Path` object. - - Prefer using ``isinstance(obj, os.PathLike)`` instead of this function. - """ - ... - -class contextlib_nullcontext: - """Context manager that does no additional processing. - - Used as a stand-in for a normal context manager, when a particular - block of code is only sometimes used with a normal context manager: - - cm = optional_cm if condition else nullcontext() - with cm: - # Perform operation, using optional_cm if condition is True - - .. note:: - Prefer using `contextlib.nullcontext` instead of this context manager. - """ - def __init__(self, enter_result=...) -> None: - ... - - def __enter__(self): # -> None: - ... - - def __exit__(self, *excinfo): # -> None: - ... - - - -def npy_load_module(name, fn, info=...): # -> ModuleType: - """ - Load a module. Uses ``load_module`` which will be deprecated in python - 3.12. An alternative that uses ``exec_module`` is in - numpy.distutils.misc_util.exec_mod_from_location - - .. versionadded:: 1.11.2 - - Parameters - ---------- - name : str - Full module name. - fn : str - Path to module file. - info : tuple, optional - Only here for backward compatibility with Python 2.*. - - Returns - ------- - mod : module - - """ - ... - -os_fspath = ... -os_PathLike = os.PathLike diff --git a/typings/numpy/conftest.pyi b/typings/numpy/conftest.pyi deleted file mode 100644 index 943b007..0000000 --- a/typings/numpy/conftest.pyi +++ /dev/null @@ -1,56 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import pytest - -""" -Pytest configuration and fixtures for the Numpy test suite. -""" -_old_fpu_mode = ... -_collect_results = ... -_pytest_ini = ... -def pytest_configure(config): # -> None: - ... - -def pytest_addoption(parser): # -> None: - ... - -def pytest_sessionstart(session): # -> None: - ... - -@pytest.hookimpl() -def pytest_itemcollected(item): # -> None: - """ - Check FPU precision mode was not changed during test collection. - - The clumsy way we do it here is mainly necessary because numpy - still uses yield tests, which can execute code at test collection - time. - """ - ... - -@pytest.fixture(scope="function", autouse=True) -def check_fpu_mode(request): # -> Generator[None, Any, None]: - """ - Check FPU precision mode was not changed during the test. - """ - ... - -@pytest.fixture(autouse=True) -def add_np(doctest_namespace): # -> None: - ... - -@pytest.fixture(autouse=True) -def env_setup(monkeypatch): # -> None: - ... - -@pytest.fixture(params=[True, False]) -def weak_promotion(request): # -> Generator[Unknown, Any, None]: - """ - Fixture to ensure "legacy" promotion state or change it to use the new - weak promotion (plus warning). `old_promotion` should be used as a - parameter in the function. - """ - ... - diff --git a/typings/numpy/core/__init__.pyi b/typings/numpy/core/__init__.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/numpy/core/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/numpy/core/_asarray.pyi b/typings/numpy/core/_asarray.pyi deleted file mode 100644 index c46dee4..0000000 --- a/typings/numpy/core/_asarray.pyi +++ /dev/null @@ -1,25 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Iterable -from typing import Any, Literal, TypeVar, Union, overload -from numpy import ndarray -from numpy._typing import DTypeLike, _SupportsArrayFunc - -_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any]) -_Requirements = Literal["C", "C_CONTIGUOUS", "CONTIGUOUS", "F", "F_CONTIGUOUS", "FORTRAN", "A", "ALIGNED", "W", "WRITEABLE", "O", "OWNDATA"] -_E = Literal["E", "ENSUREARRAY"] -_RequirementsWithE = Union[_Requirements, _E] -@overload -def require(a: _ArrayType, dtype: None = ..., requirements: None | _Requirements | Iterable[_Requirements] = ..., *, like: _SupportsArrayFunc = ...) -> _ArrayType: - ... - -@overload -def require(a: object, dtype: DTypeLike = ..., requirements: _E | Iterable[_RequirementsWithE] = ..., *, like: _SupportsArrayFunc = ...) -> ndarray[Any, Any]: - ... - -@overload -def require(a: object, dtype: DTypeLike = ..., requirements: None | _Requirements | Iterable[_Requirements] = ..., *, like: _SupportsArrayFunc = ...) -> ndarray[Any, Any]: - ... - diff --git a/typings/numpy/core/_internal.pyi b/typings/numpy/core/_internal.pyi deleted file mode 100644 index f6e37ca..0000000 --- a/typings/numpy/core/_internal.pyi +++ /dev/null @@ -1,44 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import ctypes as ct -from typing import Any, Generic, TypeVar, overload -from numpy import ndarray -from numpy.ctypeslib import c_intp - -_CastT = TypeVar("_CastT", bound=ct._CanCastTo) -_CT = TypeVar("_CT", bound=ct._CData) -_PT = TypeVar("_PT", bound=None | int) -class _ctypes(Generic[_PT]): - @overload - def __new__(cls, array: ndarray[Any, Any], ptr: None = ...) -> _ctypes[None]: - ... - - @overload - def __new__(cls, array: ndarray[Any, Any], ptr: _PT) -> _ctypes[_PT]: - ... - - @property - def data(self) -> _PT: - ... - - @property - def shape(self) -> ct.Array[c_intp]: - ... - - @property - def strides(self) -> ct.Array[c_intp]: - ... - - def data_as(self, obj: type[_CastT]) -> _CastT: - ... - - def shape_as(self, obj: type[_CT]) -> ct.Array[_CT]: - ... - - def strides_as(self, obj: type[_CT]) -> ct.Array[_CT]: - ... - - - diff --git a/typings/numpy/core/_type_aliases.pyi b/typings/numpy/core/_type_aliases.pyi deleted file mode 100644 index a18b74f..0000000 --- a/typings/numpy/core/_type_aliases.pyi +++ /dev/null @@ -1,18 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, TypedDict -from numpy import complexfloating, floating, generic, signedinteger, unsignedinteger - -class _SCTypes(TypedDict): - int: list[type[signedinteger[Any]]] - uint: list[type[unsignedinteger[Any]]] - float: list[type[floating[Any]]] - complex: list[type[complexfloating[Any, Any]]] - others: list[type] - ... - - -sctypeDict: dict[int | str, type[generic]] -sctypes: _SCTypes diff --git a/typings/numpy/core/_ufunc_config.pyi b/typings/numpy/core/_ufunc_config.pyi deleted file mode 100644 index 82ff48c..0000000 --- a/typings/numpy/core/_ufunc_config.pyi +++ /dev/null @@ -1,45 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable -from typing import Any, Literal, TypedDict -from numpy import _SupportsWrite - -_ErrKind = Literal["ignore", "warn", "raise", "call", "print", "log"] -_ErrFunc = Callable[[str, int], Any] -class _ErrDict(TypedDict): - divide: _ErrKind - over: _ErrKind - under: _ErrKind - invalid: _ErrKind - ... - - -class _ErrDictOptional(TypedDict, total=False): - all: None | _ErrKind - divide: None | _ErrKind - over: None | _ErrKind - under: None | _ErrKind - invalid: None | _ErrKind - ... - - -def seterr(all: None | _ErrKind = ..., divide: None | _ErrKind = ..., over: None | _ErrKind = ..., under: None | _ErrKind = ..., invalid: None | _ErrKind = ...) -> _ErrDict: - ... - -def geterr() -> _ErrDict: - ... - -def setbufsize(size: int) -> int: - ... - -def getbufsize() -> int: - ... - -def seterrcall(func: None | _ErrFunc | _SupportsWrite[str]) -> None | _ErrFunc | _SupportsWrite[str]: - ... - -def geterrcall() -> None | _ErrFunc | _SupportsWrite[str]: - ... - diff --git a/typings/numpy/core/arrayprint.pyi b/typings/numpy/core/arrayprint.pyi deleted file mode 100644 index 9a5ebdc..0000000 --- a/typings/numpy/core/arrayprint.pyi +++ /dev/null @@ -1,73 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable -from typing import Any, Literal, SupportsIndex, TypedDict -from contextlib import _GeneratorContextManager -from numpy import bool_, clongdouble, complexfloating, datetime64, floating, integer, longdouble, ndarray, timedelta64, void -from numpy._typing import _CharLike_co, _FloatLike_co - -_FloatMode = Literal["fixed", "unique", "maxprec", "maxprec_equal"] -class _FormatDict(TypedDict, total=False): - bool: Callable[[bool_], str] - int: Callable[[integer[Any]], str] - timedelta: Callable[[timedelta64], str] - datetime: Callable[[datetime64], str] - float: Callable[[floating[Any]], str] - longfloat: Callable[[longdouble], str] - complexfloat: Callable[[complexfloating[Any, Any]], str] - longcomplexfloat: Callable[[clongdouble], str] - void: Callable[[void], str] - numpystr: Callable[[_CharLike_co], str] - object: Callable[[object], str] - all: Callable[[object], str] - int_kind: Callable[[integer[Any]], str] - float_kind: Callable[[floating[Any]], str] - complex_kind: Callable[[complexfloating[Any, Any]], str] - str_kind: Callable[[_CharLike_co], str] - ... - - -class _FormatOptions(TypedDict): - precision: int - threshold: int - edgeitems: int - linewidth: int - suppress: bool - nanstr: str - infstr: str - formatter: None | _FormatDict - sign: Literal["-", "+", " "] - floatmode: _FloatMode - legacy: Literal[False, "1.13", "1.21"] - ... - - -def set_printoptions(precision: None | SupportsIndex = ..., threshold: None | int = ..., edgeitems: None | int = ..., linewidth: None | int = ..., suppress: None | bool = ..., nanstr: None | str = ..., infstr: None | str = ..., formatter: None | _FormatDict = ..., sign: Literal[None, "-", "+", " "] = ..., floatmode: None | _FloatMode = ..., *, legacy: Literal[None, False, "1.13", "1.21"] = ...) -> None: - ... - -def get_printoptions() -> _FormatOptions: - ... - -def array2string(a: ndarray[Any, Any], max_line_width: None | int = ..., precision: None | SupportsIndex = ..., suppress_small: None | bool = ..., separator: str = ..., prefix: str = ..., *, formatter: None | _FormatDict = ..., threshold: None | int = ..., edgeitems: None | int = ..., sign: Literal[None, "-", "+", " "] = ..., floatmode: None | _FloatMode = ..., suffix: str = ..., legacy: Literal[None, False, "1.13", "1.21"] = ...) -> str: - ... - -def format_float_scientific(x: _FloatLike_co, precision: None | int = ..., unique: bool = ..., trim: Literal["k", ".", "0", "-"] = ..., sign: bool = ..., pad_left: None | int = ..., exp_digits: None | int = ..., min_digits: None | int = ...) -> str: - ... - -def format_float_positional(x: _FloatLike_co, precision: None | int = ..., unique: bool = ..., fractional: bool = ..., trim: Literal["k", ".", "0", "-"] = ..., sign: bool = ..., pad_left: None | int = ..., pad_right: None | int = ..., min_digits: None | int = ...) -> str: - ... - -def array_repr(arr: ndarray[Any, Any], max_line_width: None | int = ..., precision: None | SupportsIndex = ..., suppress_small: None | bool = ...) -> str: - ... - -def array_str(a: ndarray[Any, Any], max_line_width: None | int = ..., precision: None | SupportsIndex = ..., suppress_small: None | bool = ...) -> str: - ... - -def set_string_function(f: None | Callable[[ndarray[Any, Any]], str], repr: bool = ...) -> None: - ... - -def printoptions(precision: None | SupportsIndex = ..., threshold: None | int = ..., edgeitems: None | int = ..., linewidth: None | int = ..., suppress: None | bool = ..., nanstr: None | str = ..., infstr: None | str = ..., formatter: None | _FormatDict = ..., sign: Literal[None, "-", "+", " "] = ..., floatmode: None | _FloatMode = ..., *, legacy: Literal[None, False, "1.13", "1.21"] = ...) -> _GeneratorContextManager[_FormatOptions]: - ... - diff --git a/typings/numpy/core/defchararray.pyi b/typings/numpy/core/defchararray.pyi deleted file mode 100644 index 06cf826..0000000 --- a/typings/numpy/core/defchararray.pyi +++ /dev/null @@ -1,375 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, Literal as L, TypeVar, overload -from numpy import _OrderKACF, bool_, bytes_, chararray as chararray, dtype, int_, object_, str_ -from numpy._typing import NDArray, _ArrayLikeBool_co as b_co, _ArrayLikeBytes_co as S_co, _ArrayLikeInt_co as i_co, _ArrayLikeStr_co as U_co - -_SCT = TypeVar("_SCT", str_, bytes_) -_CharArray = chararray[Any, dtype[_SCT]] -__all__: list[str] -@overload -def equal(x1: U_co, x2: U_co) -> NDArray[bool_]: - ... - -@overload -def equal(x1: S_co, x2: S_co) -> NDArray[bool_]: - ... - -@overload -def not_equal(x1: U_co, x2: U_co) -> NDArray[bool_]: - ... - -@overload -def not_equal(x1: S_co, x2: S_co) -> NDArray[bool_]: - ... - -@overload -def greater_equal(x1: U_co, x2: U_co) -> NDArray[bool_]: - ... - -@overload -def greater_equal(x1: S_co, x2: S_co) -> NDArray[bool_]: - ... - -@overload -def less_equal(x1: U_co, x2: U_co) -> NDArray[bool_]: - ... - -@overload -def less_equal(x1: S_co, x2: S_co) -> NDArray[bool_]: - ... - -@overload -def greater(x1: U_co, x2: U_co) -> NDArray[bool_]: - ... - -@overload -def greater(x1: S_co, x2: S_co) -> NDArray[bool_]: - ... - -@overload -def less(x1: U_co, x2: U_co) -> NDArray[bool_]: - ... - -@overload -def less(x1: S_co, x2: S_co) -> NDArray[bool_]: - ... - -@overload -def add(x1: U_co, x2: U_co) -> NDArray[str_]: - ... - -@overload -def add(x1: S_co, x2: S_co) -> NDArray[bytes_]: - ... - -@overload -def multiply(a: U_co, i: i_co) -> NDArray[str_]: - ... - -@overload -def multiply(a: S_co, i: i_co) -> NDArray[bytes_]: - ... - -@overload -def mod(a: U_co, value: Any) -> NDArray[str_]: - ... - -@overload -def mod(a: S_co, value: Any) -> NDArray[bytes_]: - ... - -@overload -def capitalize(a: U_co) -> NDArray[str_]: - ... - -@overload -def capitalize(a: S_co) -> NDArray[bytes_]: - ... - -@overload -def center(a: U_co, width: i_co, fillchar: U_co = ...) -> NDArray[str_]: - ... - -@overload -def center(a: S_co, width: i_co, fillchar: S_co = ...) -> NDArray[bytes_]: - ... - -def decode(a: S_co, encoding: None | str = ..., errors: None | str = ...) -> NDArray[str_]: - ... - -def encode(a: U_co, encoding: None | str = ..., errors: None | str = ...) -> NDArray[bytes_]: - ... - -@overload -def expandtabs(a: U_co, tabsize: i_co = ...) -> NDArray[str_]: - ... - -@overload -def expandtabs(a: S_co, tabsize: i_co = ...) -> NDArray[bytes_]: - ... - -@overload -def join(sep: U_co, seq: U_co) -> NDArray[str_]: - ... - -@overload -def join(sep: S_co, seq: S_co) -> NDArray[bytes_]: - ... - -@overload -def ljust(a: U_co, width: i_co, fillchar: U_co = ...) -> NDArray[str_]: - ... - -@overload -def ljust(a: S_co, width: i_co, fillchar: S_co = ...) -> NDArray[bytes_]: - ... - -@overload -def lower(a: U_co) -> NDArray[str_]: - ... - -@overload -def lower(a: S_co) -> NDArray[bytes_]: - ... - -@overload -def lstrip(a: U_co, chars: None | U_co = ...) -> NDArray[str_]: - ... - -@overload -def lstrip(a: S_co, chars: None | S_co = ...) -> NDArray[bytes_]: - ... - -@overload -def partition(a: U_co, sep: U_co) -> NDArray[str_]: - ... - -@overload -def partition(a: S_co, sep: S_co) -> NDArray[bytes_]: - ... - -@overload -def replace(a: U_co, old: U_co, new: U_co, count: None | i_co = ...) -> NDArray[str_]: - ... - -@overload -def replace(a: S_co, old: S_co, new: S_co, count: None | i_co = ...) -> NDArray[bytes_]: - ... - -@overload -def rjust(a: U_co, width: i_co, fillchar: U_co = ...) -> NDArray[str_]: - ... - -@overload -def rjust(a: S_co, width: i_co, fillchar: S_co = ...) -> NDArray[bytes_]: - ... - -@overload -def rpartition(a: U_co, sep: U_co) -> NDArray[str_]: - ... - -@overload -def rpartition(a: S_co, sep: S_co) -> NDArray[bytes_]: - ... - -@overload -def rsplit(a: U_co, sep: None | U_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]: - ... - -@overload -def rsplit(a: S_co, sep: None | S_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]: - ... - -@overload -def rstrip(a: U_co, chars: None | U_co = ...) -> NDArray[str_]: - ... - -@overload -def rstrip(a: S_co, chars: None | S_co = ...) -> NDArray[bytes_]: - ... - -@overload -def split(a: U_co, sep: None | U_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]: - ... - -@overload -def split(a: S_co, sep: None | S_co = ..., maxsplit: None | i_co = ...) -> NDArray[object_]: - ... - -@overload -def splitlines(a: U_co, keepends: None | b_co = ...) -> NDArray[object_]: - ... - -@overload -def splitlines(a: S_co, keepends: None | b_co = ...) -> NDArray[object_]: - ... - -@overload -def strip(a: U_co, chars: None | U_co = ...) -> NDArray[str_]: - ... - -@overload -def strip(a: S_co, chars: None | S_co = ...) -> NDArray[bytes_]: - ... - -@overload -def swapcase(a: U_co) -> NDArray[str_]: - ... - -@overload -def swapcase(a: S_co) -> NDArray[bytes_]: - ... - -@overload -def title(a: U_co) -> NDArray[str_]: - ... - -@overload -def title(a: S_co) -> NDArray[bytes_]: - ... - -@overload -def translate(a: U_co, table: U_co, deletechars: None | U_co = ...) -> NDArray[str_]: - ... - -@overload -def translate(a: S_co, table: S_co, deletechars: None | S_co = ...) -> NDArray[bytes_]: - ... - -@overload -def upper(a: U_co) -> NDArray[str_]: - ... - -@overload -def upper(a: S_co) -> NDArray[bytes_]: - ... - -@overload -def zfill(a: U_co, width: i_co) -> NDArray[str_]: - ... - -@overload -def zfill(a: S_co, width: i_co) -> NDArray[bytes_]: - ... - -@overload -def count(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def count(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def endswith(a: U_co, suffix: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]: - ... - -@overload -def endswith(a: S_co, suffix: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]: - ... - -@overload -def find(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def find(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def index(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def index(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -def isalpha(a: U_co | S_co) -> NDArray[bool_]: - ... - -def isalnum(a: U_co | S_co) -> NDArray[bool_]: - ... - -def isdecimal(a: U_co | S_co) -> NDArray[bool_]: - ... - -def isdigit(a: U_co | S_co) -> NDArray[bool_]: - ... - -def islower(a: U_co | S_co) -> NDArray[bool_]: - ... - -def isnumeric(a: U_co | S_co) -> NDArray[bool_]: - ... - -def isspace(a: U_co | S_co) -> NDArray[bool_]: - ... - -def istitle(a: U_co | S_co) -> NDArray[bool_]: - ... - -def isupper(a: U_co | S_co) -> NDArray[bool_]: - ... - -@overload -def rfind(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def rfind(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def rindex(a: U_co, sub: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def rindex(a: S_co, sub: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[int_]: - ... - -@overload -def startswith(a: U_co, prefix: U_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]: - ... - -@overload -def startswith(a: S_co, prefix: S_co, start: i_co = ..., end: None | i_co = ...) -> NDArray[bool_]: - ... - -def str_len(A: U_co | S_co) -> NDArray[int_]: - ... - -@overload -def array(obj: U_co, itemsize: None | int = ..., copy: bool = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[str_]: - ... - -@overload -def array(obj: S_co, itemsize: None | int = ..., copy: bool = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]: - ... - -@overload -def array(obj: object, itemsize: None | int = ..., copy: bool = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]: - ... - -@overload -def array(obj: object, itemsize: None | int = ..., copy: bool = ..., unicode: L[True] = ..., order: _OrderKACF = ...) -> _CharArray[str_]: - ... - -@overload -def asarray(obj: U_co, itemsize: None | int = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[str_]: - ... - -@overload -def asarray(obj: S_co, itemsize: None | int = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]: - ... - -@overload -def asarray(obj: object, itemsize: None | int = ..., unicode: L[False] = ..., order: _OrderKACF = ...) -> _CharArray[bytes_]: - ... - -@overload -def asarray(obj: object, itemsize: None | int = ..., unicode: L[True] = ..., order: _OrderKACF = ...) -> _CharArray[str_]: - ... - diff --git a/typings/numpy/core/einsumfunc.pyi b/typings/numpy/core/einsumfunc.pyi deleted file mode 100644 index 9984ab9..0000000 --- a/typings/numpy/core/einsumfunc.pyi +++ /dev/null @@ -1,65 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Sequence -from typing import Any, Literal, TypeVar, Union, overload -from numpy import _OrderKACF, bool_, dtype, ndarray, number -from numpy._typing import _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeUInt_co, _DTypeLikeBool, _DTypeLikeComplex, _DTypeLikeComplex_co, _DTypeLikeFloat, _DTypeLikeInt, _DTypeLikeObject, _DTypeLikeUInt - -_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, dtype[Union[bool_, number[Any]]]]) -_OptimizeKind = None | bool | Literal["greedy", "optimal"] | Sequence[Any] -_CastingSafe = Literal["no", "equiv", "safe", "same_kind"] -_CastingUnsafe = Literal["unsafe"] -__all__: list[str] -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeBool_co, out: None = ..., dtype: None | _DTypeLikeBool = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeUInt_co, out: None = ..., dtype: None | _DTypeLikeUInt = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeInt_co, out: None = ..., dtype: None | _DTypeLikeInt = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeFloat_co, out: None = ..., dtype: None | _DTypeLikeFloat = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeComplex_co, out: None = ..., dtype: None | _DTypeLikeComplex = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, casting: _CastingUnsafe, dtype: None | _DTypeLikeComplex_co = ..., out: None = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeComplex_co, out: _ArrayType, dtype: None | _DTypeLikeComplex_co = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> _ArrayType: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, out: _ArrayType, casting: _CastingUnsafe, dtype: None | _DTypeLikeComplex_co = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> _ArrayType: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeObject_co, out: None = ..., dtype: None | _DTypeLikeObject = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, casting: _CastingUnsafe, dtype: None | _DTypeLikeObject = ..., out: None = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> Any: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeObject_co, out: _ArrayType, dtype: None | _DTypeLikeObject = ..., order: _OrderKACF = ..., casting: _CastingSafe = ..., optimize: _OptimizeKind = ...) -> _ArrayType: - ... - -@overload -def einsum(subscripts: str | _ArrayLikeInt_co, /, *operands: Any, out: _ArrayType, casting: _CastingUnsafe, dtype: None | _DTypeLikeObject = ..., order: _OrderKACF = ..., optimize: _OptimizeKind = ...) -> _ArrayType: - ... - -def einsum_path(subscripts: str | _ArrayLikeInt_co, /, *operands: _ArrayLikeComplex_co | _DTypeLikeObject, optimize: _OptimizeKind = ...) -> tuple[list[Any], str]: - ... - diff --git a/typings/numpy/core/fromnumeric.pyi b/typings/numpy/core/fromnumeric.pyi deleted file mode 100644 index 59886b5..0000000 --- a/typings/numpy/core/fromnumeric.pyi +++ /dev/null @@ -1,489 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Sequence -from typing import Any, Literal, SupportsIndex, TypeVar, overload -from numpy import _CastingKind, _ModeKind, _OrderACF, _OrderKACF, _PartitionKind, _SortKind, _SortSide, bool_, complexfloating, float16, floating, generic, int64, int_, intp, number, object_, uint64 -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeUInt_co, _BoolLike_co, _ComplexLike_co, _DTypeLike, _IntLike_co, _NumberLike_co, _ScalarLike_co, _Shape, _ShapeLike - -_SCT = TypeVar("_SCT", bound=generic) -_SCT_uifcO = TypeVar("_SCT_uifcO", bound=number[Any] | object_) -_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) -__all__: list[str] -@overload -def take(a: _ArrayLike[_SCT], indices: _IntLike_co, axis: None = ..., out: None = ..., mode: _ModeKind = ...) -> _SCT: - ... - -@overload -def take(a: ArrayLike, indices: _IntLike_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> Any: - ... - -@overload -def take(a: _ArrayLike[_SCT], indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> NDArray[_SCT]: - ... - -@overload -def take(a: ArrayLike, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: None = ..., mode: _ModeKind = ...) -> NDArray[Any]: - ... - -@overload -def take(a: ArrayLike, indices: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., out: _ArrayType = ..., mode: _ModeKind = ...) -> _ArrayType: - ... - -@overload -def reshape(a: _ArrayLike[_SCT], newshape: _ShapeLike, order: _OrderACF = ...) -> NDArray[_SCT]: - ... - -@overload -def reshape(a: ArrayLike, newshape: _ShapeLike, order: _OrderACF = ...) -> NDArray[Any]: - ... - -@overload -def choose(a: _IntLike_co, choices: ArrayLike, out: None = ..., mode: _ModeKind = ...) -> Any: - ... - -@overload -def choose(a: _ArrayLikeInt_co, choices: _ArrayLike[_SCT], out: None = ..., mode: _ModeKind = ...) -> NDArray[_SCT]: - ... - -@overload -def choose(a: _ArrayLikeInt_co, choices: ArrayLike, out: None = ..., mode: _ModeKind = ...) -> NDArray[Any]: - ... - -@overload -def choose(a: _ArrayLikeInt_co, choices: ArrayLike, out: _ArrayType = ..., mode: _ModeKind = ...) -> _ArrayType: - ... - -@overload -def repeat(a: _ArrayLike[_SCT], repeats: _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> NDArray[_SCT]: - ... - -@overload -def repeat(a: ArrayLike, repeats: _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> NDArray[Any]: - ... - -def put(a: NDArray[Any], ind: _ArrayLikeInt_co, v: ArrayLike, mode: _ModeKind = ...) -> None: - ... - -@overload -def swapaxes(a: _ArrayLike[_SCT], axis1: SupportsIndex, axis2: SupportsIndex) -> NDArray[_SCT]: - ... - -@overload -def swapaxes(a: ArrayLike, axis1: SupportsIndex, axis2: SupportsIndex) -> NDArray[Any]: - ... - -@overload -def transpose(a: _ArrayLike[_SCT], axes: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def transpose(a: ArrayLike, axes: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def partition(a: _ArrayLike[_SCT], kth: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[_SCT]: - ... - -@overload -def partition(a: ArrayLike, kth: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[Any]: - ... - -def argpartition(a: ArrayLike, kth: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., kind: _PartitionKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[intp]: - ... - -@overload -def sort(a: _ArrayLike[_SCT], axis: None | SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[_SCT]: - ... - -@overload -def sort(a: ArrayLike, axis: None | SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[Any]: - ... - -def argsort(a: ArrayLike, axis: None | SupportsIndex = ..., kind: None | _SortKind = ..., order: None | str | Sequence[str] = ...) -> NDArray[intp]: - ... - -@overload -def argmax(a: ArrayLike, axis: None = ..., out: None = ..., *, keepdims: Literal[False] = ...) -> intp: - ... - -@overload -def argmax(a: ArrayLike, axis: None | SupportsIndex = ..., out: None = ..., *, keepdims: bool = ...) -> Any: - ... - -@overload -def argmax(a: ArrayLike, axis: None | SupportsIndex = ..., out: _ArrayType = ..., *, keepdims: bool = ...) -> _ArrayType: - ... - -@overload -def argmin(a: ArrayLike, axis: None = ..., out: None = ..., *, keepdims: Literal[False] = ...) -> intp: - ... - -@overload -def argmin(a: ArrayLike, axis: None | SupportsIndex = ..., out: None = ..., *, keepdims: bool = ...) -> Any: - ... - -@overload -def argmin(a: ArrayLike, axis: None | SupportsIndex = ..., out: _ArrayType = ..., *, keepdims: bool = ...) -> _ArrayType: - ... - -@overload -def searchsorted(a: ArrayLike, v: _ScalarLike_co, side: _SortSide = ..., sorter: None | _ArrayLikeInt_co = ...) -> intp: - ... - -@overload -def searchsorted(a: ArrayLike, v: ArrayLike, side: _SortSide = ..., sorter: None | _ArrayLikeInt_co = ...) -> NDArray[intp]: - ... - -@overload -def resize(a: _ArrayLike[_SCT], new_shape: _ShapeLike) -> NDArray[_SCT]: - ... - -@overload -def resize(a: ArrayLike, new_shape: _ShapeLike) -> NDArray[Any]: - ... - -@overload -def squeeze(a: _SCT, axis: None | _ShapeLike = ...) -> _SCT: - ... - -@overload -def squeeze(a: _ArrayLike[_SCT], axis: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def squeeze(a: ArrayLike, axis: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def diagonal(a: _ArrayLike[_SCT], offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ...) -> NDArray[_SCT]: - ... - -@overload -def diagonal(a: ArrayLike, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ...) -> NDArray[Any]: - ... - -@overload -def trace(a: ArrayLike, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> Any: - ... - -@overload -def trace(a: ArrayLike, offset: SupportsIndex = ..., axis1: SupportsIndex = ..., axis2: SupportsIndex = ..., dtype: DTypeLike = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def ravel(a: _ArrayLike[_SCT], order: _OrderKACF = ...) -> NDArray[_SCT]: - ... - -@overload -def ravel(a: ArrayLike, order: _OrderKACF = ...) -> NDArray[Any]: - ... - -def nonzero(a: ArrayLike) -> tuple[NDArray[intp], ...]: - ... - -def shape(a: ArrayLike) -> _Shape: - ... - -@overload -def compress(condition: _ArrayLikeBool_co, a: _ArrayLike[_SCT], axis: None | SupportsIndex = ..., out: None = ...) -> NDArray[_SCT]: - ... - -@overload -def compress(condition: _ArrayLikeBool_co, a: ArrayLike, axis: None | SupportsIndex = ..., out: None = ...) -> NDArray[Any]: - ... - -@overload -def compress(condition: _ArrayLikeBool_co, a: ArrayLike, axis: None | SupportsIndex = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def clip(a: _SCT, a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> _SCT: - ... - -@overload -def clip(a: _ScalarLike_co, a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> Any: - ... - -@overload -def clip(a: _ArrayLike[_SCT], a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def clip(a: ArrayLike, a_min: None | ArrayLike, a_max: None | ArrayLike, out: None = ..., *, dtype: None = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> NDArray[Any]: - ... - -@overload -def clip(a: ArrayLike, a_min: None | ArrayLike, a_max: None | ArrayLike, out: _ArrayType = ..., *, dtype: DTypeLike, where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> Any: - ... - -@overload -def clip(a: ArrayLike, a_min: None | ArrayLike, a_max: None | ArrayLike, out: _ArrayType, *, dtype: DTypeLike = ..., where: None | _ArrayLikeBool_co = ..., order: _OrderKACF = ..., subok: bool = ..., signature: str | tuple[None | str, ...] = ..., extobj: list[Any] = ..., casting: _CastingKind = ...) -> _ArrayType: - ... - -@overload -def sum(a: _ArrayLike[_SCT], axis: None = ..., dtype: None = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT: - ... - -@overload -def sum(a: ArrayLike, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def sum(a: ArrayLike, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def all(a: ArrayLike, axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> bool_: - ... - -@overload -def all(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def all(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def any(a: ArrayLike, axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> bool_: - ... - -@overload -def any(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def any(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def cumsum(a: _ArrayLike[_SCT], axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[_SCT]: - ... - -@overload -def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[Any]: - ... - -@overload -def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ...) -> NDArray[_SCT]: - ... - -@overload -def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> NDArray[Any]: - ... - -@overload -def cumsum(a: ArrayLike, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def ptp(a: _ArrayLike[_SCT], axis: None = ..., out: None = ..., keepdims: Literal[False] = ...) -> _SCT: - ... - -@overload -def ptp(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ...) -> Any: - ... - -@overload -def ptp(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ...) -> _ArrayType: - ... - -@overload -def amax(a: _ArrayLike[_SCT], axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT: - ... - -@overload -def amax(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def amax(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def amin(a: _ArrayLike[_SCT], axis: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT: - ... - -@overload -def amin(a: ArrayLike, axis: None | _ShapeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def amin(a: ArrayLike, axis: None | _ShapeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def prod(a: _ArrayLikeBool_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> int_: - ... - -@overload -def prod(a: _ArrayLikeUInt_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> uint64: - ... - -@overload -def prod(a: _ArrayLikeInt_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> int64: - ... - -@overload -def prod(a: _ArrayLikeFloat_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> floating[Any]: - ... - -@overload -def prod(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> complexfloating[Any, Any]: - ... - -@overload -def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., keepdims: Literal[False] = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _SCT: - ... - -@overload -def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None | DTypeLike = ..., out: None = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def prod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None | DTypeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., initial: _NumberLike_co = ..., where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def cumprod(a: _ArrayLikeBool_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[int_]: - ... - -@overload -def cumprod(a: _ArrayLikeUInt_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[uint64]: - ... - -@overload -def cumprod(a: _ArrayLikeInt_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[int64]: - ... - -@overload -def cumprod(a: _ArrayLikeFloat_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[floating[Any]]: - ... - -@overload -def cumprod(a: _ArrayLikeComplex_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def cumprod(a: _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: None = ..., out: None = ...) -> NDArray[object_]: - ... - -@overload -def cumprod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ...) -> NDArray[_SCT]: - ... - -@overload -def cumprod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: None = ...) -> NDArray[Any]: - ... - -@overload -def cumprod(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | SupportsIndex = ..., dtype: DTypeLike = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -def ndim(a: ArrayLike) -> int: - ... - -def size(a: ArrayLike, axis: None | int = ...) -> int: - ... - -@overload -def around(a: _BoolLike_co, decimals: SupportsIndex = ..., out: None = ...) -> float16: - ... - -@overload -def around(a: _SCT_uifcO, decimals: SupportsIndex = ..., out: None = ...) -> _SCT_uifcO: - ... - -@overload -def around(a: _ComplexLike_co | object_, decimals: SupportsIndex = ..., out: None = ...) -> Any: - ... - -@overload -def around(a: _ArrayLikeBool_co, decimals: SupportsIndex = ..., out: None = ...) -> NDArray[float16]: - ... - -@overload -def around(a: _ArrayLike[_SCT_uifcO], decimals: SupportsIndex = ..., out: None = ...) -> NDArray[_SCT_uifcO]: - ... - -@overload -def around(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, decimals: SupportsIndex = ..., out: None = ...) -> NDArray[Any]: - ... - -@overload -def around(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, decimals: SupportsIndex = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def mean(a: _ArrayLikeFloat_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> floating[Any]: - ... - -@overload -def mean(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> complexfloating[Any, Any]: - ... - -@overload -def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> _SCT: - ... - -@overload -def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def mean(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def std(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> floating[Any]: - ... - -@overload -def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> _SCT: - ... - -@overload -def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def std(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -@overload -def var(a: _ArrayLikeComplex_co, axis: None = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> floating[Any]: - ... - -@overload -def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: None = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None = ..., dtype: _DTypeLike[_SCT] = ..., out: None = ..., ddof: float = ..., keepdims: Literal[False] = ..., *, where: _ArrayLikeBool_co = ...) -> _SCT: - ... - -@overload -def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: None = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> Any: - ... - -@overload -def var(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., dtype: DTypeLike = ..., out: _ArrayType = ..., ddof: float = ..., keepdims: bool = ..., *, where: _ArrayLikeBool_co = ...) -> _ArrayType: - ... - -max = ... -min = ... -round = ... diff --git a/typings/numpy/core/function_base.pyi b/typings/numpy/core/function_base.pyi deleted file mode 100644 index 32271f3..0000000 --- a/typings/numpy/core/function_base.pyi +++ /dev/null @@ -1,77 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, Literal as L, SupportsIndex, TypeVar, overload -from numpy import complexfloating, floating, generic -from numpy._typing import DTypeLike, NDArray, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _DTypeLike - -_SCT = TypeVar("_SCT", bound=generic) -__all__: list[str] -@overload -def linspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[floating[Any]]: - ... - -@overload -def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> NDArray[_SCT]: - ... - -@overload -def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[False] = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> NDArray[Any]: - ... - -@overload -def linspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> tuple[NDArray[floating[Any]], floating[Any]]: - ... - -@overload -def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: None = ..., axis: SupportsIndex = ...) -> tuple[NDArray[complexfloating[Any, Any]], complexfloating[Any, Any]]: - ... - -@overload -def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> tuple[NDArray[_SCT], _SCT]: - ... - -@overload -def linspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., retstep: L[True] = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> tuple[NDArray[Any], Any]: - ... - -@overload -def logspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeFloat_co = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[floating[Any]]: - ... - -@overload -def logspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeComplex_co = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def logspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeComplex_co = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> NDArray[_SCT]: - ... - -@overload -def logspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., base: _ArrayLikeComplex_co = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> NDArray[Any]: - ... - -@overload -def geomspace(start: _ArrayLikeFloat_co, stop: _ArrayLikeFloat_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[floating[Any]]: - ... - -@overload -def geomspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: None = ..., axis: SupportsIndex = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def geomspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: _DTypeLike[_SCT] = ..., axis: SupportsIndex = ...) -> NDArray[_SCT]: - ... - -@overload -def geomspace(start: _ArrayLikeComplex_co, stop: _ArrayLikeComplex_co, num: SupportsIndex = ..., endpoint: bool = ..., dtype: DTypeLike = ..., axis: SupportsIndex = ...) -> NDArray[Any]: - ... - -def add_newdoc(place: str, obj: str, doc: str | tuple[str, str] | list[tuple[str, str]], warn_on_python: bool = ...) -> None: - ... - diff --git a/typings/numpy/core/multiarray.pyi b/typings/numpy/core/multiarray.pyi deleted file mode 100644 index 4062936..0000000 --- a/typings/numpy/core/multiarray.pyi +++ /dev/null @@ -1,521 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import datetime as dt -from collections.abc import Callable, Iterable, Sequence -from typing import Any, ClassVar, Final, Literal as L, Protocol, SupportsIndex, TypeVar, final, overload -from numpy import _CastingKind, _CopyMode, _IOProtocol, _ModeKind, _NDIterFlagsKind, _NDIterOpFlagsKind, _OrderCF, _OrderKACF, _SupportsBuffer, bool_, busdaycalendar as busdaycalendar, complexfloating, datetime64, dtype as dtype, float64, floating, generic, int_, intp, nditer as nditer, signedinteger, str_, timedelta64, ufunc, uint8, unsignedinteger -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeBytes_co, _ArrayLikeComplex_co, _ArrayLikeDT64_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeStr_co, _ArrayLikeTD64_co, _ArrayLikeUInt_co, _DTypeLike, _FloatLike_co, _IntLike_co, _NestedSequence, _ScalarLike_co, _ShapeLike, _SupportsArrayFunc, _TD64Like_co - -_T_co = TypeVar("_T_co", covariant=True) -_T_contra = TypeVar("_T_contra", contravariant=True) -_SCT = TypeVar("_SCT", bound=generic) -_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) -_UnitKind = L["Y", "M", "D", "h", "m", "s", "ms", "us", "μs", "ns", "ps", "fs", "as",] -_RollKind = L["nat", "forward", "following", "backward", "preceding", "modifiedfollowing", "modifiedpreceding",] -class _SupportsLenAndGetItem(Protocol[_T_contra, _T_co]): - def __len__(self) -> int: - ... - - def __getitem__(self, key: _T_contra, /) -> _T_co: - ... - - - -__all__: list[str] -ALLOW_THREADS: Final[int] -BUFSIZE: L[8192] -CLIP: L[0] -WRAP: L[1] -RAISE: L[2] -MAXDIMS: L[32] -MAY_SHARE_BOUNDS: L[0] -MAY_SHARE_EXACT: L[-1] -tracemalloc_domain: L[389047] -@overload -def empty_like(prototype: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> _ArrayType: - ... - -@overload -def empty_like(prototype: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def empty_like(prototype: object, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def empty_like(prototype: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def empty_like(prototype: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def array(object: _ArrayType, dtype: None = ..., *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: L[True], ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> _ArrayType: - ... - -@overload -def array(object: _ArrayLike[_SCT], dtype: None = ..., *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def array(object: object, dtype: None = ..., *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def array(object: Any, dtype: _DTypeLike[_SCT], *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def array(object: Any, dtype: DTypeLike, *, copy: bool | _CopyMode = ..., order: _OrderKACF = ..., subok: bool = ..., ndmin: int = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def zeros(shape: _ShapeLike, dtype: None = ..., order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def zeros(shape: _ShapeLike, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def zeros(shape: _ShapeLike, dtype: DTypeLike, order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def empty(shape: _ShapeLike, dtype: None = ..., order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def empty(shape: _ShapeLike, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def empty(shape: _ShapeLike, dtype: DTypeLike, order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def unravel_index(indices: _IntLike_co, shape: _ShapeLike, order: _OrderCF = ...) -> tuple[intp, ...]: - ... - -@overload -def unravel_index(indices: _ArrayLikeInt_co, shape: _ShapeLike, order: _OrderCF = ...) -> tuple[NDArray[intp], ...]: - ... - -@overload -def ravel_multi_index(multi_index: Sequence[_IntLike_co], dims: Sequence[SupportsIndex], mode: _ModeKind | tuple[_ModeKind, ...] = ..., order: _OrderCF = ...) -> intp: - ... - -@overload -def ravel_multi_index(multi_index: Sequence[_ArrayLikeInt_co], dims: Sequence[SupportsIndex], mode: _ModeKind | tuple[_ModeKind, ...] = ..., order: _OrderCF = ...) -> NDArray[intp]: - ... - -@overload -def concatenate(arrays: _ArrayLike[_SCT], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: None = ..., casting: None | _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: None = ..., casting: None | _CastingKind = ...) -> NDArray[Any]: - ... - -@overload -def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: _DTypeLike[_SCT], casting: None | _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: None = ..., *, dtype: DTypeLike, casting: None | _CastingKind = ...) -> NDArray[Any]: - ... - -@overload -def concatenate(arrays: _SupportsLenAndGetItem[int, ArrayLike], /, axis: None | SupportsIndex = ..., out: _ArrayType = ..., *, dtype: DTypeLike = ..., casting: None | _CastingKind = ...) -> _ArrayType: - ... - -def inner(a: ArrayLike, b: ArrayLike, /) -> Any: - ... - -@overload -def where(condition: ArrayLike, /) -> tuple[NDArray[intp], ...]: - ... - -@overload -def where(condition: ArrayLike, x: ArrayLike, y: ArrayLike, /) -> NDArray[Any]: - ... - -def lexsort(keys: ArrayLike, axis: None | SupportsIndex = ...) -> Any: - ... - -def can_cast(from_: ArrayLike | DTypeLike, to: DTypeLike, casting: None | _CastingKind = ...) -> bool: - ... - -def min_scalar_type(a: ArrayLike, /) -> dtype[Any]: - ... - -def result_type(*arrays_and_dtypes: ArrayLike | DTypeLike) -> dtype[Any]: - ... - -@overload -def dot(a: ArrayLike, b: ArrayLike, out: None = ...) -> Any: - ... - -@overload -def dot(a: ArrayLike, b: ArrayLike, out: _ArrayType) -> _ArrayType: - ... - -@overload -def vdot(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, /) -> bool_: - ... - -@overload -def vdot(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, /) -> unsignedinteger[Any]: - ... - -@overload -def vdot(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, /) -> signedinteger[Any]: - ... - -@overload -def vdot(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, /) -> floating[Any]: - ... - -@overload -def vdot(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, /) -> complexfloating[Any, Any]: - ... - -@overload -def vdot(a: _ArrayLikeTD64_co, b: _ArrayLikeTD64_co, /) -> timedelta64: - ... - -@overload -def vdot(a: _ArrayLikeObject_co, b: Any, /) -> Any: - ... - -@overload -def vdot(a: Any, b: _ArrayLikeObject_co, /) -> Any: - ... - -def bincount(x: ArrayLike, /, weights: None | ArrayLike = ..., minlength: SupportsIndex = ...) -> NDArray[intp]: - ... - -def copyto(dst: NDArray[Any], src: ArrayLike, casting: None | _CastingKind = ..., where: None | _ArrayLikeBool_co = ...) -> None: - ... - -def putmask(a: NDArray[Any], /, mask: _ArrayLikeBool_co, values: ArrayLike) -> None: - ... - -def packbits(a: _ArrayLikeInt_co, /, axis: None | SupportsIndex = ..., bitorder: L["big", "little"] = ...) -> NDArray[uint8]: - ... - -def unpackbits(a: _ArrayLike[uint8], /, axis: None | SupportsIndex = ..., count: None | SupportsIndex = ..., bitorder: L["big", "little"] = ...) -> NDArray[uint8]: - ... - -def shares_memory(a: object, b: object, /, max_work: None | int = ...) -> bool: - ... - -def may_share_memory(a: object, b: object, /, max_work: None | int = ...) -> bool: - ... - -@overload -def asarray(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def asarray(a: object, dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def asarray(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def asarray(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def asanyarray(a: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> _ArrayType: - ... - -@overload -def asanyarray(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def asanyarray(a: object, dtype: None = ..., order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def asanyarray(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def asanyarray(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def ascontiguousarray(a: _ArrayLike[_SCT], dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def ascontiguousarray(a: object, dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def ascontiguousarray(a: Any, dtype: _DTypeLike[_SCT], *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def ascontiguousarray(a: Any, dtype: DTypeLike, *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def asfortranarray(a: _ArrayLike[_SCT], dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def asfortranarray(a: object, dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def asfortranarray(a: Any, dtype: _DTypeLike[_SCT], *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def asfortranarray(a: Any, dtype: DTypeLike, *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -def geterrobj() -> list[Any]: - ... - -def seterrobj(errobj: list[Any], /) -> None: - ... - -def promote_types(__type1: DTypeLike, __type2: DTypeLike) -> dtype[Any]: - ... - -@overload -def fromstring(string: str | bytes, dtype: None = ..., count: SupportsIndex = ..., *, sep: str, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def fromstring(string: str | bytes, dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., *, sep: str, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def fromstring(string: str | bytes, dtype: DTypeLike, count: SupportsIndex = ..., *, sep: str, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -def frompyfunc(func: Callable[..., Any], /, nin: SupportsIndex, nout: SupportsIndex, *, identity: Any = ...) -> ufunc: - ... - -@overload -def fromfile(file: str | bytes | os.PathLike[Any] | _IOProtocol, dtype: None = ..., count: SupportsIndex = ..., sep: str = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def fromfile(file: str | bytes | os.PathLike[Any] | _IOProtocol, dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., sep: str = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def fromfile(file: str | bytes | os.PathLike[Any] | _IOProtocol, dtype: DTypeLike, count: SupportsIndex = ..., sep: str = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def fromiter(iter: Iterable[Any], dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def fromiter(iter: Iterable[Any], dtype: DTypeLike, count: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def frombuffer(buffer: _SupportsBuffer, dtype: None = ..., count: SupportsIndex = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def frombuffer(buffer: _SupportsBuffer, dtype: _DTypeLike[_SCT], count: SupportsIndex = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def frombuffer(buffer: _SupportsBuffer, dtype: DTypeLike, count: SupportsIndex = ..., offset: SupportsIndex = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def arange(stop: _IntLike_co, /, *, dtype: None = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def arange(start: _IntLike_co, stop: _IntLike_co, step: _IntLike_co = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def arange(stop: _FloatLike_co, /, *, dtype: None = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[floating[Any]]: - ... - -@overload -def arange(start: _FloatLike_co, stop: _FloatLike_co, step: _FloatLike_co = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[floating[Any]]: - ... - -@overload -def arange(stop: _TD64Like_co, /, *, dtype: None = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[timedelta64]: - ... - -@overload -def arange(start: _TD64Like_co, stop: _TD64Like_co, step: _TD64Like_co = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[timedelta64]: - ... - -@overload -def arange(start: datetime64, stop: datetime64, step: datetime64 = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[datetime64]: - ... - -@overload -def arange(stop: Any, /, *, dtype: _DTypeLike[_SCT], like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def arange(start: Any, stop: Any, step: Any = ..., dtype: _DTypeLike[_SCT] = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def arange(stop: Any, /, *, dtype: DTypeLike, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def arange(start: Any, stop: Any, step: Any = ..., dtype: DTypeLike = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -def datetime_data(dtype: str | _DTypeLike[datetime64] | _DTypeLike[timedelta64], /) -> tuple[str, int]: - ... - -@overload -def busday_count(begindates: _ScalarLike_co | dt.date, enddates: _ScalarLike_co | dt.date, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> int_: - ... - -@overload -def busday_count(begindates: ArrayLike | dt.date | _NestedSequence[dt.date], enddates: ArrayLike | dt.date | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[int_]: - ... - -@overload -def busday_count(begindates: ArrayLike | dt.date | _NestedSequence[dt.date], enddates: ArrayLike | dt.date | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def busday_offset(dates: datetime64 | dt.date, offsets: _TD64Like_co | dt.timedelta, roll: L["raise"] = ..., weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> datetime64: - ... - -@overload -def busday_offset(dates: _ArrayLike[datetime64] | dt.date | _NestedSequence[dt.date], offsets: _ArrayLikeTD64_co | dt.timedelta | _NestedSequence[dt.timedelta], roll: L["raise"] = ..., weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[datetime64]: - ... - -@overload -def busday_offset(dates: _ArrayLike[datetime64] | dt.date | _NestedSequence[dt.date], offsets: _ArrayLikeTD64_co | dt.timedelta | _NestedSequence[dt.timedelta], roll: L["raise"] = ..., weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def busday_offset(dates: _ScalarLike_co | dt.date, offsets: _ScalarLike_co | dt.timedelta, roll: _RollKind, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> datetime64: - ... - -@overload -def busday_offset(dates: ArrayLike | dt.date | _NestedSequence[dt.date], offsets: ArrayLike | dt.timedelta | _NestedSequence[dt.timedelta], roll: _RollKind, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[datetime64]: - ... - -@overload -def busday_offset(dates: ArrayLike | dt.date | _NestedSequence[dt.date], offsets: ArrayLike | dt.timedelta | _NestedSequence[dt.timedelta], roll: _RollKind, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def is_busday(dates: _ScalarLike_co | dt.date, weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> bool_: - ... - -@overload -def is_busday(dates: ArrayLike | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: None = ...) -> NDArray[bool_]: - ... - -@overload -def is_busday(dates: ArrayLike | _NestedSequence[dt.date], weekmask: ArrayLike = ..., holidays: None | ArrayLike | dt.date | _NestedSequence[dt.date] = ..., busdaycal: None | busdaycalendar = ..., out: _ArrayType = ...) -> _ArrayType: - ... - -@overload -def datetime_as_string(arr: datetime64 | dt.date, unit: None | L["auto"] | _UnitKind = ..., timezone: L["naive", "UTC", "local"] | dt.tzinfo = ..., casting: _CastingKind = ...) -> str_: - ... - -@overload -def datetime_as_string(arr: _ArrayLikeDT64_co | _NestedSequence[dt.date], unit: None | L["auto"] | _UnitKind = ..., timezone: L["naive", "UTC", "local"] | dt.tzinfo = ..., casting: _CastingKind = ...) -> NDArray[str_]: - ... - -@overload -def compare_chararrays(a1: _ArrayLikeStr_co, a2: _ArrayLikeStr_co, cmp: L["<", "<=", "==", ">=", ">", "!="], rstrip: bool) -> NDArray[bool_]: - ... - -@overload -def compare_chararrays(a1: _ArrayLikeBytes_co, a2: _ArrayLikeBytes_co, cmp: L["<", "<=", "==", ">=", ">", "!="], rstrip: bool) -> NDArray[bool_]: - ... - -def add_docstring(obj: Callable[..., Any], docstring: str, /) -> None: - ... - -_GetItemKeys = L["C", "CONTIGUOUS", "C_CONTIGUOUS", "F", "FORTRAN", "F_CONTIGUOUS", "W", "WRITEABLE", "B", "BEHAVED", "O", "OWNDATA", "A", "ALIGNED", "X", "WRITEBACKIFCOPY", "CA", "CARRAY", "FA", "FARRAY", "FNC", "FORC",] -_SetItemKeys = L["A", "ALIGNED", "W", "WRITEABLE", "X", "WRITEBACKIFCOPY",] -@final -class flagsobj: - __hash__: ClassVar[None] - aligned: bool - writeable: bool - writebackifcopy: bool - @property - def behaved(self) -> bool: - ... - - @property - def c_contiguous(self) -> bool: - ... - - @property - def carray(self) -> bool: - ... - - @property - def contiguous(self) -> bool: - ... - - @property - def f_contiguous(self) -> bool: - ... - - @property - def farray(self) -> bool: - ... - - @property - def fnc(self) -> bool: - ... - - @property - def forc(self) -> bool: - ... - - @property - def fortran(self) -> bool: - ... - - @property - def num(self) -> int: - ... - - @property - def owndata(self) -> bool: - ... - - def __getitem__(self, key: _GetItemKeys) -> bool: - ... - - def __setitem__(self, key: _SetItemKeys, value: bool) -> None: - ... - - - -def nested_iters(op: ArrayLike | Sequence[ArrayLike], axes: Sequence[Sequence[SupportsIndex]], flags: None | Sequence[_NDIterFlagsKind] = ..., op_flags: None | Sequence[Sequence[_NDIterOpFlagsKind]] = ..., op_dtypes: DTypeLike | Sequence[DTypeLike] = ..., order: _OrderKACF = ..., casting: _CastingKind = ..., buffersize: SupportsIndex = ...) -> tuple[nditer, ...]: - ... - diff --git a/typings/numpy/core/numeric.pyi b/typings/numpy/core/numeric.pyi deleted file mode 100644 index 236c93d..0000000 --- a/typings/numpy/core/numeric.pyi +++ /dev/null @@ -1,359 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable, Sequence -from typing import Any, Literal, NoReturn, SupportsAbs, SupportsIndex, TypeGuard, TypeVar, overload -from typing_extensions import TypeGuard -from numpy import _OrderCF, _OrderKACF, bool_, complexfloating, float64, floating, generic, int_, intp, object_, signedinteger, timedelta64, unsignedinteger -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeTD64_co, _ArrayLikeUInt_co, _ArrayLikeUnknown, _DTypeLike, _ScalarLike_co, _ShapeLike, _SupportsArrayFunc - -if sys.version_info >= (3, 10): - ... -else: - ... -_T = TypeVar("_T") -_SCT = TypeVar("_SCT", bound=generic) -_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) -_CorrelateMode = Literal["valid", "same", "full"] -__all__: list[str] -@overload -def zeros_like(a: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., subok: Literal[True] = ..., shape: None = ...) -> _ArrayType: - ... - -@overload -def zeros_like(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def zeros_like(a: object, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def zeros_like(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def zeros_like(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def ones(shape: _ShapeLike, dtype: None = ..., order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def ones(shape: _ShapeLike, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def ones(shape: _ShapeLike, dtype: DTypeLike, order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def ones_like(a: _ArrayType, dtype: None = ..., order: _OrderKACF = ..., subok: Literal[True] = ..., shape: None = ...) -> _ArrayType: - ... - -@overload -def ones_like(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def ones_like(a: object, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def ones_like(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def ones_like(a: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def full(shape: _ShapeLike, fill_value: Any, dtype: None = ..., order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def full(shape: _ShapeLike, fill_value: Any, dtype: _DTypeLike[_SCT], order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def full(shape: _ShapeLike, fill_value: Any, dtype: DTypeLike, order: _OrderCF = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def full_like(a: _ArrayType, fill_value: Any, dtype: None = ..., order: _OrderKACF = ..., subok: Literal[True] = ..., shape: None = ...) -> _ArrayType: - ... - -@overload -def full_like(a: _ArrayLike[_SCT], fill_value: Any, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def full_like(a: object, fill_value: Any, dtype: None = ..., order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def full_like(a: Any, fill_value: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def full_like(a: Any, fill_value: Any, dtype: DTypeLike, order: _OrderKACF = ..., subok: bool = ..., shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def count_nonzero(a: ArrayLike, axis: None = ..., *, keepdims: Literal[False] = ...) -> int: - ... - -@overload -def count_nonzero(a: ArrayLike, axis: _ShapeLike = ..., *, keepdims: bool = ...) -> Any: - ... - -def isfortran(a: NDArray[Any] | generic) -> bool: - ... - -def argwhere(a: ArrayLike) -> NDArray[intp]: - ... - -def flatnonzero(a: ArrayLike) -> NDArray[intp]: - ... - -@overload -def correlate(a: _ArrayLikeUnknown, v: _ArrayLikeUnknown, mode: _CorrelateMode = ...) -> NDArray[Any]: - ... - -@overload -def correlate(a: _ArrayLikeBool_co, v: _ArrayLikeBool_co, mode: _CorrelateMode = ...) -> NDArray[bool_]: - ... - -@overload -def correlate(a: _ArrayLikeUInt_co, v: _ArrayLikeUInt_co, mode: _CorrelateMode = ...) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def correlate(a: _ArrayLikeInt_co, v: _ArrayLikeInt_co, mode: _CorrelateMode = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def correlate(a: _ArrayLikeFloat_co, v: _ArrayLikeFloat_co, mode: _CorrelateMode = ...) -> NDArray[floating[Any]]: - ... - -@overload -def correlate(a: _ArrayLikeComplex_co, v: _ArrayLikeComplex_co, mode: _CorrelateMode = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def correlate(a: _ArrayLikeTD64_co, v: _ArrayLikeTD64_co, mode: _CorrelateMode = ...) -> NDArray[timedelta64]: - ... - -@overload -def correlate(a: _ArrayLikeObject_co, v: _ArrayLikeObject_co, mode: _CorrelateMode = ...) -> NDArray[object_]: - ... - -@overload -def convolve(a: _ArrayLikeUnknown, v: _ArrayLikeUnknown, mode: _CorrelateMode = ...) -> NDArray[Any]: - ... - -@overload -def convolve(a: _ArrayLikeBool_co, v: _ArrayLikeBool_co, mode: _CorrelateMode = ...) -> NDArray[bool_]: - ... - -@overload -def convolve(a: _ArrayLikeUInt_co, v: _ArrayLikeUInt_co, mode: _CorrelateMode = ...) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def convolve(a: _ArrayLikeInt_co, v: _ArrayLikeInt_co, mode: _CorrelateMode = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def convolve(a: _ArrayLikeFloat_co, v: _ArrayLikeFloat_co, mode: _CorrelateMode = ...) -> NDArray[floating[Any]]: - ... - -@overload -def convolve(a: _ArrayLikeComplex_co, v: _ArrayLikeComplex_co, mode: _CorrelateMode = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def convolve(a: _ArrayLikeTD64_co, v: _ArrayLikeTD64_co, mode: _CorrelateMode = ...) -> NDArray[timedelta64]: - ... - -@overload -def convolve(a: _ArrayLikeObject_co, v: _ArrayLikeObject_co, mode: _CorrelateMode = ...) -> NDArray[object_]: - ... - -@overload -def outer(a: _ArrayLikeUnknown, b: _ArrayLikeUnknown, out: None = ...) -> NDArray[Any]: - ... - -@overload -def outer(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, out: None = ...) -> NDArray[bool_]: - ... - -@overload -def outer(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, out: None = ...) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def outer(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, out: None = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def outer(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, out: None = ...) -> NDArray[floating[Any]]: - ... - -@overload -def outer(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, out: None = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def outer(a: _ArrayLikeTD64_co, b: _ArrayLikeTD64_co, out: None = ...) -> NDArray[timedelta64]: - ... - -@overload -def outer(a: _ArrayLikeObject_co, b: _ArrayLikeObject_co, out: None = ...) -> NDArray[object_]: - ... - -@overload -def outer(a: _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, b: _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, out: _ArrayType) -> _ArrayType: - ... - -@overload -def tensordot(a: _ArrayLikeUnknown, b: _ArrayLikeUnknown, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[Any]: - ... - -@overload -def tensordot(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[bool_]: - ... - -@overload -def tensordot(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def tensordot(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def tensordot(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[floating[Any]]: - ... - -@overload -def tensordot(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def tensordot(a: _ArrayLikeTD64_co, b: _ArrayLikeTD64_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[timedelta64]: - ... - -@overload -def tensordot(a: _ArrayLikeObject_co, b: _ArrayLikeObject_co, axes: int | tuple[_ShapeLike, _ShapeLike] = ...) -> NDArray[object_]: - ... - -@overload -def roll(a: _ArrayLike[_SCT], shift: _ShapeLike, axis: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def roll(a: ArrayLike, shift: _ShapeLike, axis: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -def rollaxis(a: NDArray[_SCT], axis: int, start: int = ...) -> NDArray[_SCT]: - ... - -def moveaxis(a: NDArray[_SCT], source: _ShapeLike, destination: _ShapeLike) -> NDArray[_SCT]: - ... - -@overload -def cross(a: _ArrayLikeUnknown, b: _ArrayLikeUnknown, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[Any]: - ... - -@overload -def cross(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NoReturn: - ... - -@overload -def cross(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def cross(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def cross(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[floating[Any]]: - ... - -@overload -def cross(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def cross(a: _ArrayLikeObject_co, b: _ArrayLikeObject_co, axisa: int = ..., axisb: int = ..., axisc: int = ..., axis: None | int = ...) -> NDArray[object_]: - ... - -@overload -def indices(dimensions: Sequence[int], dtype: type[int] = ..., sparse: Literal[False] = ...) -> NDArray[int_]: - ... - -@overload -def indices(dimensions: Sequence[int], dtype: type[int] = ..., sparse: Literal[True] = ...) -> tuple[NDArray[int_], ...]: - ... - -@overload -def indices(dimensions: Sequence[int], dtype: _DTypeLike[_SCT], sparse: Literal[False] = ...) -> NDArray[_SCT]: - ... - -@overload -def indices(dimensions: Sequence[int], dtype: _DTypeLike[_SCT], sparse: Literal[True]) -> tuple[NDArray[_SCT], ...]: - ... - -@overload -def indices(dimensions: Sequence[int], dtype: DTypeLike, sparse: Literal[False] = ...) -> NDArray[Any]: - ... - -@overload -def indices(dimensions: Sequence[int], dtype: DTypeLike, sparse: Literal[True]) -> tuple[NDArray[Any], ...]: - ... - -def fromfunction(function: Callable[..., _T], shape: Sequence[int], *, dtype: DTypeLike = ..., like: _SupportsArrayFunc = ..., **kwargs: Any) -> _T: - ... - -def isscalar(element: object) -> TypeGuard[generic | bool | int | float | complex | str | bytes | memoryview]: - ... - -def binary_repr(num: SupportsIndex, width: None | int = ...) -> str: - ... - -def base_repr(number: SupportsAbs[float], base: float = ..., padding: SupportsIndex = ...) -> str: - ... - -@overload -def identity(n: int, dtype: None = ..., *, like: _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def identity(n: int, dtype: _DTypeLike[_SCT], *, like: _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def identity(n: int, dtype: DTypeLike, *, like: _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -def allclose(a: ArrayLike, b: ArrayLike, rtol: float = ..., atol: float = ..., equal_nan: bool = ...) -> bool: - ... - -@overload -def isclose(a: _ScalarLike_co, b: _ScalarLike_co, rtol: float = ..., atol: float = ..., equal_nan: bool = ...) -> bool_: - ... - -@overload -def isclose(a: ArrayLike, b: ArrayLike, rtol: float = ..., atol: float = ..., equal_nan: bool = ...) -> NDArray[bool_]: - ... - -def array_equal(a1: ArrayLike, a2: ArrayLike, equal_nan: bool = ...) -> bool: - ... - -def array_equiv(a1: ArrayLike, a2: ArrayLike) -> bool: - ... - diff --git a/typings/numpy/core/numerictypes.pyi b/typings/numpy/core/numerictypes.pyi deleted file mode 100644 index 08a9157..0000000 --- a/typings/numpy/core/numerictypes.pyi +++ /dev/null @@ -1,103 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import sys -import types -from typing import Any, Literal as L, Protocol, TypeVar, TypedDict, Union, overload -from numpy import bool_, byte, bytes_, cdouble, clongdouble, csingle, datetime64, double, dtype, generic, half, int_, intc, longdouble, longlong, ndarray, object_, short, single, str_, timedelta64, ubyte, uint, uintc, ulonglong, ushort, void -from numpy._typing import ArrayLike, DTypeLike, _DTypeLike - -_T = TypeVar("_T") -_SCT = TypeVar("_SCT", bound=generic) -class _CastFunc(Protocol): - def __call__(self, x: ArrayLike, k: DTypeLike = ...) -> ndarray[Any, dtype[Any]]: - ... - - - -class _TypeCodes(TypedDict): - Character: L['c'] - Integer: L['bhilqp'] - UnsignedInteger: L['BHILQP'] - Float: L['efdg'] - Complex: L['FDG'] - AllInteger: L['bBhHiIlLqQpP'] - AllFloat: L['efdgFDG'] - Datetime: L['Mm'] - All: L['?bhilqpBHILQPefdgFDGSUVOMm'] - ... - - -class _typedict(dict[type[generic], _T]): - def __getitem__(self, key: DTypeLike) -> _T: - ... - - - -if sys.version_info >= (3, 10): - _TypeTuple = Union[type[Any], types.UnionType, tuple[Union[type[Any], types.UnionType, tuple[Any, ...]], ...],] -else: - ... -__all__: list[str] -@overload -def maximum_sctype(t: _DTypeLike[_SCT]) -> type[_SCT]: - ... - -@overload -def maximum_sctype(t: DTypeLike) -> type[Any]: - ... - -@overload -def issctype(rep: dtype[Any] | type[Any]) -> bool: - ... - -@overload -def issctype(rep: object) -> L[False]: - ... - -@overload -def obj2sctype(rep: _DTypeLike[_SCT], default: None = ...) -> None | type[_SCT]: - ... - -@overload -def obj2sctype(rep: _DTypeLike[_SCT], default: _T) -> _T | type[_SCT]: - ... - -@overload -def obj2sctype(rep: DTypeLike, default: None = ...) -> None | type[Any]: - ... - -@overload -def obj2sctype(rep: DTypeLike, default: _T) -> _T | type[Any]: - ... - -@overload -def obj2sctype(rep: object, default: None = ...) -> None: - ... - -@overload -def obj2sctype(rep: object, default: _T) -> _T: - ... - -@overload -def issubclass_(arg1: type[Any], arg2: _TypeTuple) -> bool: - ... - -@overload -def issubclass_(arg1: object, arg2: object) -> L[False]: - ... - -def issubsctype(arg1: DTypeLike, arg2: DTypeLike) -> bool: - ... - -def issubdtype(arg1: DTypeLike, arg2: DTypeLike) -> bool: - ... - -def sctype2char(sctype: DTypeLike) -> str: - ... - -cast: _typedict[_CastFunc] -nbytes: _typedict[int] -typecodes: _TypeCodes -ScalarType: tuple[type[int], type[float], type[complex], type[bool], type[bytes], type[str], type[memoryview], type[bool_], type[csingle], type[cdouble], type[clongdouble], type[half], type[single], type[double], type[longdouble], type[byte], type[short], type[intc], type[int_], type[longlong], type[timedelta64], type[datetime64], type[object_], type[bytes_], type[str_], type[ubyte], type[ushort], type[uintc], type[uint], type[ulonglong], type[void],] diff --git a/typings/numpy/core/records.pyi b/typings/numpy/core/records.pyi deleted file mode 100644 index 64cd7ff..0000000 --- a/typings/numpy/core/records.pyi +++ /dev/null @@ -1,85 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -from collections.abc import Iterable, Sequence -from typing import Any, Protocol, TypeVar, overload -from numpy import _ByteOrder, _SupportsBuffer, dtype, generic, recarray as recarray, record as record -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLikeVoid_co, _NestedSequence, _ShapeLike - -_SCT = TypeVar("_SCT", bound=generic) -_RecArray = recarray[Any, dtype[_SCT]] -class _SupportsReadInto(Protocol): - def seek(self, offset: int, whence: int, /) -> object: - ... - - def tell(self, /) -> int: - ... - - def readinto(self, buffer: memoryview, /) -> int: - ... - - - -__all__: list[str] -@overload -def fromarrays(arrayList: Iterable[ArrayLike], dtype: DTypeLike = ..., shape: None | _ShapeLike = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[Any]: - ... - -@overload -def fromarrays(arrayList: Iterable[ArrayLike], dtype: None = ..., shape: None | _ShapeLike = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]: - ... - -@overload -def fromrecords(recList: _ArrayLikeVoid_co | tuple[Any, ...] | _NestedSequence[tuple[Any, ...]], dtype: DTypeLike = ..., shape: None | _ShapeLike = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[record]: - ... - -@overload -def fromrecords(recList: _ArrayLikeVoid_co | tuple[Any, ...] | _NestedSequence[tuple[Any, ...]], dtype: None = ..., shape: None | _ShapeLike = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]: - ... - -@overload -def fromstring(datastring: _SupportsBuffer, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[record]: - ... - -@overload -def fromstring(datastring: _SupportsBuffer, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]: - ... - -@overload -def fromfile(fd: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _SupportsReadInto, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ...) -> _RecArray[Any]: - ... - -@overload -def fromfile(fd: str | bytes | os.PathLike[str] | os.PathLike[bytes] | _SupportsReadInto, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ...) -> _RecArray[record]: - ... - -@overload -def array(obj: _SCT | NDArray[_SCT], dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[_SCT]: - ... - -@overload -def array(obj: ArrayLike, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[Any]: - ... - -@overload -def array(obj: ArrayLike, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ..., copy: bool = ...) -> _RecArray[record]: - ... - -@overload -def array(obj: None, dtype: DTypeLike, shape: _ShapeLike, offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[Any]: - ... - -@overload -def array(obj: None, dtype: None = ..., *, shape: _ShapeLike, offset: int = ..., formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ..., copy: bool = ...) -> _RecArray[record]: - ... - -@overload -def array(obj: _SupportsReadInto, dtype: DTypeLike, shape: None | _ShapeLike = ..., offset: int = ..., formats: None = ..., names: None = ..., titles: None = ..., aligned: bool = ..., byteorder: None = ..., copy: bool = ...) -> _RecArray[Any]: - ... - -@overload -def array(obj: _SupportsReadInto, dtype: None = ..., shape: None | _ShapeLike = ..., offset: int = ..., *, formats: DTypeLike, names: None | str | Sequence[str] = ..., titles: None | str | Sequence[str] = ..., aligned: bool = ..., byteorder: None | _ByteOrder = ..., copy: bool = ...) -> _RecArray[record]: - ... - diff --git a/typings/numpy/core/shape_base.pyi b/typings/numpy/core/shape_base.pyi deleted file mode 100644 index ae975fd..0000000 --- a/typings/numpy/core/shape_base.pyi +++ /dev/null @@ -1,96 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Sequence -from typing import Any, SupportsIndex, TypeVar, overload -from numpy import _CastingKind, generic -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _DTypeLike - -_SCT = TypeVar("_SCT", bound=generic) -_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) -__all__: list[str] -@overload -def atleast_1d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]: - ... - -@overload -def atleast_1d(arys: ArrayLike, /) -> NDArray[Any]: - ... - -@overload -def atleast_1d(*arys: ArrayLike) -> list[NDArray[Any]]: - ... - -@overload -def atleast_2d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]: - ... - -@overload -def atleast_2d(arys: ArrayLike, /) -> NDArray[Any]: - ... - -@overload -def atleast_2d(*arys: ArrayLike) -> list[NDArray[Any]]: - ... - -@overload -def atleast_3d(arys: _ArrayLike[_SCT], /) -> NDArray[_SCT]: - ... - -@overload -def atleast_3d(arys: ArrayLike, /) -> NDArray[Any]: - ... - -@overload -def atleast_3d(*arys: ArrayLike) -> list[NDArray[Any]]: - ... - -@overload -def vstack(tup: Sequence[_ArrayLike[_SCT]], *, dtype: None = ..., casting: _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def vstack(tup: Sequence[ArrayLike], *, dtype: _DTypeLike[_SCT], casting: _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def vstack(tup: Sequence[ArrayLike], *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> NDArray[Any]: - ... - -@overload -def hstack(tup: Sequence[_ArrayLike[_SCT]], *, dtype: None = ..., casting: _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def hstack(tup: Sequence[ArrayLike], *, dtype: _DTypeLike[_SCT], casting: _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def hstack(tup: Sequence[ArrayLike], *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> NDArray[Any]: - ... - -@overload -def stack(arrays: Sequence[_ArrayLike[_SCT]], axis: SupportsIndex = ..., out: None = ..., *, dtype: None = ..., casting: _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def stack(arrays: Sequence[ArrayLike], axis: SupportsIndex = ..., out: None = ..., *, dtype: _DTypeLike[_SCT], casting: _CastingKind = ...) -> NDArray[_SCT]: - ... - -@overload -def stack(arrays: Sequence[ArrayLike], axis: SupportsIndex = ..., out: None = ..., *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> NDArray[Any]: - ... - -@overload -def stack(arrays: Sequence[ArrayLike], axis: SupportsIndex = ..., out: _ArrayType = ..., *, dtype: DTypeLike = ..., casting: _CastingKind = ...) -> _ArrayType: - ... - -@overload -def block(arrays: _ArrayLike[_SCT]) -> NDArray[_SCT]: - ... - -@overload -def block(arrays: ArrayLike) -> NDArray[Any]: - ... - diff --git a/typings/numpy/core/umath.pyi b/typings/numpy/core/umath.pyi deleted file mode 100644 index 986489b..0000000 --- a/typings/numpy/core/umath.pyi +++ /dev/null @@ -1,14 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._multiarray_umath import * - -""" -Create the numpy.core.umath namespace for backward compatibility. In v1.16 -the multiarray and umath c-extension modules were merged into a single -_multiarray_umath extension module. So we replicate the old namespace -by importing from the extension module. - -""" -__all__ = ['_UFUNC_API', 'ERR_CALL', 'ERR_DEFAULT', 'ERR_IGNORE', 'ERR_LOG', 'ERR_PRINT', 'ERR_RAISE', 'ERR_WARN', 'FLOATING_POINT_SUPPORT', 'FPE_DIVIDEBYZERO', 'FPE_INVALID', 'FPE_OVERFLOW', 'FPE_UNDERFLOW', 'NAN', 'NINF', 'NZERO', 'PINF', 'PZERO', 'SHIFT_DIVIDEBYZERO', 'SHIFT_INVALID', 'SHIFT_OVERFLOW', 'SHIFT_UNDERFLOW', 'UFUNC_BUFSIZE_DEFAULT', 'UFUNC_PYVALS_NAME', '_add_newdoc_ufunc', 'absolute', 'add', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 'bitwise_and', 'bitwise_or', 'bitwise_xor', 'cbrt', 'ceil', 'conj', 'conjugate', 'copysign', 'cos', 'cosh', 'deg2rad', 'degrees', 'divide', 'divmod', 'e', 'equal', 'euler_gamma', 'exp', 'exp2', 'expm1', 'fabs', 'floor', 'floor_divide', 'float_power', 'fmax', 'fmin', 'fmod', 'frexp', 'frompyfunc', 'gcd', 'geterrobj', 'greater', 'greater_equal', 'heaviside', 'hypot', 'invert', 'isfinite', 'isinf', 'isnan', 'isnat', 'lcm', 'ldexp', 'left_shift', 'less', 'less_equal', 'log', 'log10', 'log1p', 'log2', 'logaddexp', 'logaddexp2', 'logical_and', 'logical_not', 'logical_or', 'logical_xor', 'maximum', 'minimum', 'mod', 'modf', 'multiply', 'negative', 'nextafter', 'not_equal', 'pi', 'positive', 'power', 'rad2deg', 'radians', 'reciprocal', 'remainder', 'right_shift', 'rint', 'seterrobj', 'sign', 'signbit', 'sin', 'sinh', 'spacing', 'sqrt', 'square', 'subtract', 'tan', 'tanh', 'true_divide', 'trunc'] diff --git a/typings/numpy/ctypeslib.pyi b/typings/numpy/ctypeslib.pyi deleted file mode 100644 index 9408707..0000000 --- a/typings/numpy/ctypeslib.pyi +++ /dev/null @@ -1,265 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import ctypes -from ctypes import c_int64 as _c_intp -from collections.abc import Iterable, Sequence -from typing import Any, ClassVar, Generic, Literal as L, TypeVar, overload -from numpy import bool_, byte, double, dtype, generic, int_, intc, longdouble, longlong, ndarray, short, single, ubyte, uint, uintc, ulonglong, ushort, void -from numpy.core._internal import _ctypes -from numpy.core.multiarray import flagsobj -from numpy._typing import DTypeLike, NDArray, _ArrayLike, _BoolCodes, _ByteCodes, _DTypeLike, _DoubleCodes, _IntCCodes, _IntCodes, _LongDoubleCodes, _LongLongCodes, _ShapeLike, _ShortCodes, _SingleCodes, _UByteCodes, _UIntCCodes, _UIntCodes, _ULongLongCodes, _UShortCodes, _VoidDTypeLike - -_DType = TypeVar("_DType", bound=dtype[Any]) -_DTypeOptional = TypeVar("_DTypeOptional", bound=None | dtype[Any]) -_SCT = TypeVar("_SCT", bound=generic) -_FlagsKind = L['C_CONTIGUOUS', 'CONTIGUOUS', 'C', 'F_CONTIGUOUS', 'FORTRAN', 'F', 'ALIGNED', 'A', 'WRITEABLE', 'W', 'OWNDATA', 'O', 'WRITEBACKIFCOPY', 'X',] -class _ndptr(ctypes.c_void_p, Generic[_DTypeOptional]): - _dtype_: ClassVar[_DTypeOptional] - _shape_: ClassVar[None] - _ndim_: ClassVar[None | int] - _flags_: ClassVar[None | list[_FlagsKind]] - @overload - @classmethod - def from_param(cls: type[_ndptr[None]], obj: ndarray[Any, Any]) -> _ctypes[Any]: - ... - - @overload - @classmethod - def from_param(cls: type[_ndptr[_DType]], obj: ndarray[Any, _DType]) -> _ctypes[Any]: - ... - - - -class _concrete_ndptr(_ndptr[_DType]): - _dtype_: ClassVar[_DType] - _shape_: ClassVar[tuple[int, ...]] - @property - def contents(self) -> ndarray[Any, _DType]: - ... - - - -def load_library(libname: str | bytes | os.PathLike[str] | os.PathLike[bytes], loader_path: str | bytes | os.PathLike[str] | os.PathLike[bytes]) -> ctypes.CDLL: - ... - -__all__: list[str] -c_intp = _c_intp -@overload -def ndpointer(dtype: None = ..., ndim: int = ..., shape: None | _ShapeLike = ..., flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...) -> type[_ndptr[None]]: - ... - -@overload -def ndpointer(dtype: _DTypeLike[_SCT], ndim: int = ..., *, shape: _ShapeLike, flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...) -> type[_concrete_ndptr[dtype[_SCT]]]: - ... - -@overload -def ndpointer(dtype: DTypeLike, ndim: int = ..., *, shape: _ShapeLike, flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...) -> type[_concrete_ndptr[dtype[Any]]]: - ... - -@overload -def ndpointer(dtype: _DTypeLike[_SCT], ndim: int = ..., shape: None = ..., flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...) -> type[_ndptr[dtype[_SCT]]]: - ... - -@overload -def ndpointer(dtype: DTypeLike, ndim: int = ..., shape: None = ..., flags: None | _FlagsKind | Iterable[_FlagsKind] | int | flagsobj = ...) -> type[_ndptr[dtype[Any]]]: - ... - -@overload -def as_ctypes_type(dtype: _BoolCodes | _DTypeLike[bool_] | type[ctypes.c_bool]) -> type[ctypes.c_bool]: - ... - -@overload -def as_ctypes_type(dtype: _ByteCodes | _DTypeLike[byte] | type[ctypes.c_byte]) -> type[ctypes.c_byte]: - ... - -@overload -def as_ctypes_type(dtype: _ShortCodes | _DTypeLike[short] | type[ctypes.c_short]) -> type[ctypes.c_short]: - ... - -@overload -def as_ctypes_type(dtype: _IntCCodes | _DTypeLike[intc] | type[ctypes.c_int]) -> type[ctypes.c_int]: - ... - -@overload -def as_ctypes_type(dtype: _IntCodes | _DTypeLike[int_] | type[int | ctypes.c_long]) -> type[ctypes.c_long]: - ... - -@overload -def as_ctypes_type(dtype: _LongLongCodes | _DTypeLike[longlong] | type[ctypes.c_longlong]) -> type[ctypes.c_longlong]: - ... - -@overload -def as_ctypes_type(dtype: _UByteCodes | _DTypeLike[ubyte] | type[ctypes.c_ubyte]) -> type[ctypes.c_ubyte]: - ... - -@overload -def as_ctypes_type(dtype: _UShortCodes | _DTypeLike[ushort] | type[ctypes.c_ushort]) -> type[ctypes.c_ushort]: - ... - -@overload -def as_ctypes_type(dtype: _UIntCCodes | _DTypeLike[uintc] | type[ctypes.c_uint]) -> type[ctypes.c_uint]: - ... - -@overload -def as_ctypes_type(dtype: _UIntCodes | _DTypeLike[uint] | type[ctypes.c_ulong]) -> type[ctypes.c_ulong]: - ... - -@overload -def as_ctypes_type(dtype: _ULongLongCodes | _DTypeLike[ulonglong] | type[ctypes.c_ulonglong]) -> type[ctypes.c_ulonglong]: - ... - -@overload -def as_ctypes_type(dtype: _SingleCodes | _DTypeLike[single] | type[ctypes.c_float]) -> type[ctypes.c_float]: - ... - -@overload -def as_ctypes_type(dtype: _DoubleCodes | _DTypeLike[double] | type[float | ctypes.c_double]) -> type[ctypes.c_double]: - ... - -@overload -def as_ctypes_type(dtype: _LongDoubleCodes | _DTypeLike[longdouble] | type[ctypes.c_longdouble]) -> type[ctypes.c_longdouble]: - ... - -@overload -def as_ctypes_type(dtype: _VoidDTypeLike) -> type[Any]: - ... - -@overload -def as_ctypes_type(dtype: str) -> type[Any]: - ... - -@overload -def as_array(obj: ctypes._PointerLike, shape: Sequence[int]) -> NDArray[Any]: - ... - -@overload -def as_array(obj: _ArrayLike[_SCT], shape: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def as_array(obj: object, shape: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def as_ctypes(obj: bool_) -> ctypes.c_bool: - ... - -@overload -def as_ctypes(obj: byte) -> ctypes.c_byte: - ... - -@overload -def as_ctypes(obj: short) -> ctypes.c_short: - ... - -@overload -def as_ctypes(obj: intc) -> ctypes.c_int: - ... - -@overload -def as_ctypes(obj: int_) -> ctypes.c_long: - ... - -@overload -def as_ctypes(obj: longlong) -> ctypes.c_longlong: - ... - -@overload -def as_ctypes(obj: ubyte) -> ctypes.c_ubyte: - ... - -@overload -def as_ctypes(obj: ushort) -> ctypes.c_ushort: - ... - -@overload -def as_ctypes(obj: uintc) -> ctypes.c_uint: - ... - -@overload -def as_ctypes(obj: uint) -> ctypes.c_ulong: - ... - -@overload -def as_ctypes(obj: ulonglong) -> ctypes.c_ulonglong: - ... - -@overload -def as_ctypes(obj: single) -> ctypes.c_float: - ... - -@overload -def as_ctypes(obj: double) -> ctypes.c_double: - ... - -@overload -def as_ctypes(obj: longdouble) -> ctypes.c_longdouble: - ... - -@overload -def as_ctypes(obj: void) -> Any: - ... - -@overload -def as_ctypes(obj: NDArray[bool_]) -> ctypes.Array[ctypes.c_bool]: - ... - -@overload -def as_ctypes(obj: NDArray[byte]) -> ctypes.Array[ctypes.c_byte]: - ... - -@overload -def as_ctypes(obj: NDArray[short]) -> ctypes.Array[ctypes.c_short]: - ... - -@overload -def as_ctypes(obj: NDArray[intc]) -> ctypes.Array[ctypes.c_int]: - ... - -@overload -def as_ctypes(obj: NDArray[int_]) -> ctypes.Array[ctypes.c_long]: - ... - -@overload -def as_ctypes(obj: NDArray[longlong]) -> ctypes.Array[ctypes.c_longlong]: - ... - -@overload -def as_ctypes(obj: NDArray[ubyte]) -> ctypes.Array[ctypes.c_ubyte]: - ... - -@overload -def as_ctypes(obj: NDArray[ushort]) -> ctypes.Array[ctypes.c_ushort]: - ... - -@overload -def as_ctypes(obj: NDArray[uintc]) -> ctypes.Array[ctypes.c_uint]: - ... - -@overload -def as_ctypes(obj: NDArray[uint]) -> ctypes.Array[ctypes.c_ulong]: - ... - -@overload -def as_ctypes(obj: NDArray[ulonglong]) -> ctypes.Array[ctypes.c_ulonglong]: - ... - -@overload -def as_ctypes(obj: NDArray[single]) -> ctypes.Array[ctypes.c_float]: - ... - -@overload -def as_ctypes(obj: NDArray[double]) -> ctypes.Array[ctypes.c_double]: - ... - -@overload -def as_ctypes(obj: NDArray[longdouble]) -> ctypes.Array[ctypes.c_longdouble]: - ... - -@overload -def as_ctypes(obj: NDArray[void]) -> ctypes.Array[Any]: - ... - diff --git a/typings/numpy/doc/__init__.pyi b/typings/numpy/doc/__init__.pyi deleted file mode 100644 index d2821e6..0000000 --- a/typings/numpy/doc/__init__.pyi +++ /dev/null @@ -1,9 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os - -ref_dir = ... -__all__ = sorted(f[: -3] for f in os.listdir(ref_dir) if f.endswith('.py') and notf.startswith('__')) -__doc__ = ... diff --git a/typings/numpy/dtypes.pyi b/typings/numpy/dtypes.pyi deleted file mode 100644 index 15156ae..0000000 --- a/typings/numpy/dtypes.pyi +++ /dev/null @@ -1,39 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np - -__all__: list[str] -BoolDType = np.dtype[np.bool_] -Int8DType = np.dtype[np.int8] -UInt8DType = np.dtype[np.uint8] -Int16DType = np.dtype[np.int16] -UInt16DType = np.dtype[np.uint16] -Int32DType = np.dtype[np.int32] -UInt32DType = np.dtype[np.uint32] -Int64DType = np.dtype[np.int64] -UInt64DType = np.dtype[np.uint64] -ByteDType = np.dtype[np.byte] -UByteDType = np.dtype[np.ubyte] -ShortDType = np.dtype[np.short] -UShortDType = np.dtype[np.ushort] -IntDType = np.dtype[np.intc] -UIntDType = np.dtype[np.uintc] -LongDType = np.dtype[np.int_] -ULongDType = np.dtype[np.uint] -LongLongDType = np.dtype[np.longlong] -ULongLongDType = np.dtype[np.ulonglong] -Float16DType = np.dtype[np.float16] -Float32DType = np.dtype[np.float32] -Float64DType = np.dtype[np.float64] -LongDoubleDType = np.dtype[np.longdouble] -Complex64DType = np.dtype[np.complex64] -Complex128DType = np.dtype[np.complex128] -CLongDoubleDType = np.dtype[np.clongdouble] -ObjectDType = np.dtype[np.object_] -BytesDType = np.dtype[np.bytes_] -StrDType = np.dtype[np.str_] -VoidDType = np.dtype[np.void] -DateTime64DType = np.dtype[np.datetime64] -TimeDelta64DType = np.dtype[np.timedelta64] diff --git a/typings/numpy/exceptions.pyi b/typings/numpy/exceptions.pyi deleted file mode 100644 index 5c58bb3..0000000 --- a/typings/numpy/exceptions.pyi +++ /dev/null @@ -1,43 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import overload - -__all__: list[str] -class ComplexWarning(RuntimeWarning): - ... - - -class ModuleDeprecationWarning(DeprecationWarning): - ... - - -class VisibleDeprecationWarning(UserWarning): - ... - - -class TooHardError(RuntimeError): - ... - - -class DTypePromotionError(TypeError): - ... - - -class AxisError(ValueError, IndexError): - axis: None | int - ndim: None | int - @overload - def __init__(self, axis: str, ndim: None = ..., msg_prefix: None = ...) -> None: - ... - - @overload - def __init__(self, axis: int, ndim: int, msg_prefix: None | str = ...) -> None: - ... - - def __str__(self) -> str: - ... - - - diff --git a/typings/numpy/f2py/__init__.pyi b/typings/numpy/f2py/__init__.pyi deleted file mode 100644 index ffae845..0000000 --- a/typings/numpy/f2py/__init__.pyi +++ /dev/null @@ -1,38 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import subprocess -from collections.abc import Iterable -from typing import Any, Literal as L, TypedDict, overload -from numpy._pytesttester import PytestTester - -class _F2PyDictBase(TypedDict): - csrc: list[str] - h: list[str] - ... - - -class _F2PyDict(_F2PyDictBase, total=False): - fsrc: list[str] - ltx: list[str] - ... - - -__all__: list[str] -test: PytestTester -def run_main(comline_list: Iterable[str]) -> dict[str, _F2PyDict]: - ... - -@overload -def compile(source: str | bytes, modulename: str = ..., extra_args: str | list[str] = ..., verbose: bool = ..., source_fn: None | str | bytes | os.PathLike[Any] = ..., extension: L[".f", ".f90"] = ..., full_output: L[False] = ...) -> int: - ... - -@overload -def compile(source: str | bytes, modulename: str = ..., extra_args: str | list[str] = ..., verbose: bool = ..., source_fn: None | str | bytes | os.PathLike[Any] = ..., extension: L[".f", ".f90"] = ..., full_output: L[True] = ...) -> subprocess.CompletedProcess[bytes]: - ... - -def get_include() -> str: - ... - diff --git a/typings/numpy/fft/__init__.pyi b/typings/numpy/fft/__init__.pyi deleted file mode 100644 index 365c5da..0000000 --- a/typings/numpy/fft/__init__.pyi +++ /dev/null @@ -1,11 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy._pytesttester import PytestTester -from numpy.fft._pocketfft import fft as fft, fft2 as fft2, fftn as fftn, hfft as hfft, ifft as ifft, ifft2 as ifft2, ifftn as ifftn, ihfft as ihfft, irfft as irfft, irfft2 as irfft2, irfftn as irfftn, rfft as rfft, rfft2 as rfft2, rfftn as rfftn -from numpy.fft.helper import fftfreq as fftfreq, fftshift as fftshift, ifftshift as ifftshift, rfftfreq as rfftfreq - -__all__: list[str] -__path__: list[str] -test: PytestTester diff --git a/typings/numpy/fft/_pocketfft.pyi b/typings/numpy/fft/_pocketfft.pyi deleted file mode 100644 index 52add9e..0000000 --- a/typings/numpy/fft/_pocketfft.pyi +++ /dev/null @@ -1,53 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Sequence -from typing import Literal as L -from numpy import complex128, float64 -from numpy._typing import ArrayLike, NDArray, _ArrayLikeNumber_co - -_NormKind = L[None, "backward", "ortho", "forward"] -__all__: list[str] -def fft(a: ArrayLike, n: None | int = ..., axis: int = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def ifft(a: ArrayLike, n: None | int = ..., axis: int = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def rfft(a: ArrayLike, n: None | int = ..., axis: int = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def irfft(a: ArrayLike, n: None | int = ..., axis: int = ..., norm: _NormKind = ...) -> NDArray[float64]: - ... - -def hfft(a: _ArrayLikeNumber_co, n: None | int = ..., axis: int = ..., norm: _NormKind = ...) -> NDArray[float64]: - ... - -def ihfft(a: ArrayLike, n: None | int = ..., axis: int = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def fftn(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def ifftn(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def rfftn(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def irfftn(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[float64]: - ... - -def fft2(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def ifft2(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def rfft2(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[complex128]: - ... - -def irfft2(a: ArrayLike, s: None | Sequence[int] = ..., axes: None | Sequence[int] = ..., norm: _NormKind = ...) -> NDArray[float64]: - ... - diff --git a/typings/numpy/fft/helper.pyi b/typings/numpy/fft/helper.pyi deleted file mode 100644 index b36ac6c..0000000 --- a/typings/numpy/fft/helper.pyi +++ /dev/null @@ -1,42 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, TypeVar, overload -from numpy import complexfloating, floating, generic, integer -from numpy._typing import ArrayLike, NDArray, _ArrayLike, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ShapeLike - -_SCT = TypeVar("_SCT", bound=generic) -__all__: list[str] -@overload -def fftshift(x: _ArrayLike[_SCT], axes: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def fftshift(x: ArrayLike, axes: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def ifftshift(x: _ArrayLike[_SCT], axes: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def ifftshift(x: ArrayLike, axes: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -@overload -def fftfreq(n: int | integer[Any], d: _ArrayLikeFloat_co = ...) -> NDArray[floating[Any]]: - ... - -@overload -def fftfreq(n: int | integer[Any], d: _ArrayLikeComplex_co = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def rfftfreq(n: int | integer[Any], d: _ArrayLikeFloat_co = ...) -> NDArray[floating[Any]]: - ... - -@overload -def rfftfreq(n: int | integer[Any], d: _ArrayLikeComplex_co = ...) -> NDArray[complexfloating[Any, Any]]: - ... - diff --git a/typings/numpy/lib/__init__.pyi b/typings/numpy/lib/__init__.pyi deleted file mode 100644 index eb25e41..0000000 --- a/typings/numpy/lib/__init__.pyi +++ /dev/null @@ -1,33 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import math as math -from typing import Any -from numpy._pytesttester import PytestTester -from numpy import ndenumerate as ndenumerate, ndindex as ndindex -from numpy.version import version -from numpy.lib import format as format, mixins as mixins, scimath as scimath, stride_tricks as stride_tricks -from numpy.lib._version import NumpyVersion as NumpyVersion -from numpy.lib.arraypad import pad as pad -from numpy.lib.arraysetops import ediff1d as ediff1d, in1d as in1d, intersect1d as intersect1d, isin as isin, setdiff1d as setdiff1d, setxor1d as setxor1d, union1d as union1d, unique as unique -from numpy.lib.arrayterator import Arrayterator as Arrayterator -from numpy.lib.function_base import add_docstring as add_docstring, add_newdoc as add_newdoc, add_newdoc_ufunc as add_newdoc_ufunc, angle as angle, append as append, asarray_chkfinite as asarray_chkfinite, average as average, bartlett as bartlett, bincount as bincount, blackman as blackman, copy as copy, corrcoef as corrcoef, cov as cov, delete as delete, diff as diff, digitize as digitize, disp as disp, extract as extract, flip as flip, gradient as gradient, hamming as hamming, hanning as hanning, i0 as i0, insert as insert, interp as interp, iterable as iterable, kaiser as kaiser, median as median, meshgrid as meshgrid, percentile as percentile, piecewise as piecewise, place as place, quantile as quantile, rot90 as rot90, select as select, sinc as sinc, sort_complex as sort_complex, trapz as trapz, trim_zeros as trim_zeros, unwrap as unwrap, vectorize as vectorize -from numpy.lib.histograms import histogram as histogram, histogram_bin_edges as histogram_bin_edges, histogramdd as histogramdd -from numpy.lib.index_tricks import c_ as c_, diag_indices as diag_indices, diag_indices_from as diag_indices_from, fill_diagonal as fill_diagonal, index_exp as index_exp, ix_ as ix_, mgrid as mgrid, ogrid as ogrid, r_ as r_, ravel_multi_index as ravel_multi_index, s_ as s_, unravel_index as unravel_index -from numpy.lib.nanfunctions import nanargmax as nanargmax, nanargmin as nanargmin, nancumprod as nancumprod, nancumsum as nancumsum, nanmax as nanmax, nanmean as nanmean, nanmedian as nanmedian, nanmin as nanmin, nanpercentile as nanpercentile, nanprod as nanprod, nanquantile as nanquantile, nanstd as nanstd, nansum as nansum, nanvar as nanvar -from numpy.lib.npyio import DataSource as DataSource, fromregex as fromregex, genfromtxt as genfromtxt, load as load, loadtxt as loadtxt, packbits as packbits, recfromcsv as recfromcsv, recfromtxt as recfromtxt, save as save, savetxt as savetxt, savez as savez, savez_compressed as savez_compressed, unpackbits as unpackbits -from numpy.lib.polynomial import RankWarning as RankWarning, poly as poly, poly1d as poly1d, polyadd as polyadd, polyder as polyder, polydiv as polydiv, polyfit as polyfit, polyint as polyint, polymul as polymul, polysub as polysub, polyval as polyval, roots as roots -from numpy.lib.shape_base import apply_along_axis as apply_along_axis, apply_over_axes as apply_over_axes, array_split as array_split, column_stack as column_stack, dsplit as dsplit, dstack as dstack, expand_dims as expand_dims, get_array_wrap as get_array_wrap, hsplit as hsplit, kron as kron, put_along_axis as put_along_axis, row_stack as row_stack, split as split, take_along_axis as take_along_axis, tile as tile, vsplit as vsplit -from numpy.lib.stride_tricks import broadcast_arrays as broadcast_arrays, broadcast_shapes as broadcast_shapes, broadcast_to as broadcast_to -from numpy.lib.twodim_base import diag as diag, diagflat as diagflat, eye as eye, fliplr as fliplr, flipud as flipud, histogram2d as histogram2d, mask_indices as mask_indices, tri as tri, tril as tril, tril_indices as tril_indices, tril_indices_from as tril_indices_from, triu as triu, triu_indices as triu_indices, triu_indices_from as triu_indices_from, vander as vander -from numpy.lib.type_check import asfarray as asfarray, common_type as common_type, imag as imag, iscomplex as iscomplex, iscomplexobj as iscomplexobj, isreal as isreal, isrealobj as isrealobj, mintypecode as mintypecode, nan_to_num as nan_to_num, real as real, real_if_close as real_if_close, typename as typename -from numpy.lib.ufunclike import fix as fix, isneginf as isneginf, isposinf as isposinf -from numpy.lib.utils import byte_bounds as byte_bounds, deprecate as deprecate, deprecate_with_doc as deprecate_with_doc, get_include as get_include, info as info, issubclass_ as issubclass_, issubdtype as issubdtype, issubsctype as issubsctype, lookfor as lookfor, safe_eval as safe_eval, show_runtime as show_runtime, source as source, who as who -from numpy.core.multiarray import tracemalloc_domain as tracemalloc_domain - -__all__: list[str] -__path__: list[str] -test: PytestTester -__version__ = ... -emath = scimath diff --git a/typings/numpy/lib/_version.pyi b/typings/numpy/lib/_version.pyi deleted file mode 100644 index 6bb2225..0000000 --- a/typings/numpy/lib/_version.pyi +++ /dev/null @@ -1,36 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -__all__: list[str] -class NumpyVersion: - vstring: str - version: str - major: int - minor: int - bugfix: int - pre_release: str - is_devversion: bool - def __init__(self, vstring: str) -> None: - ... - - def __lt__(self, other: str | NumpyVersion) -> bool: - ... - - def __le__(self, other: str | NumpyVersion) -> bool: - ... - - def __eq__(self, other: str | NumpyVersion) -> bool: - ... - - def __ne__(self, other: str | NumpyVersion) -> bool: - ... - - def __gt__(self, other: str | NumpyVersion) -> bool: - ... - - def __ge__(self, other: str | NumpyVersion) -> bool: - ... - - - diff --git a/typings/numpy/lib/arraypad.pyi b/typings/numpy/lib/arraypad.pyi deleted file mode 100644 index 76886e1..0000000 --- a/typings/numpy/lib/arraypad.pyi +++ /dev/null @@ -1,33 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, Literal as L, Protocol, TypeVar, overload -from numpy import generic -from numpy._typing import ArrayLike, NDArray, _ArrayLike, _ArrayLikeInt - -_SCT = TypeVar("_SCT", bound=generic) -class _ModeFunc(Protocol): - def __call__(self, vector: NDArray[Any], iaxis_pad_width: tuple[int, int], iaxis: int, kwargs: dict[str, Any], /) -> None: - ... - - - -_ModeKind = L["constant", "edge", "linear_ramp", "maximum", "mean", "median", "minimum", "reflect", "symmetric", "wrap", "empty",] -__all__: list[str] -@overload -def pad(array: _ArrayLike[_SCT], pad_width: _ArrayLikeInt, mode: _ModeKind = ..., *, stat_length: None | _ArrayLikeInt = ..., constant_values: ArrayLike = ..., end_values: ArrayLike = ..., reflect_type: L["odd", "even"] = ...) -> NDArray[_SCT]: - ... - -@overload -def pad(array: ArrayLike, pad_width: _ArrayLikeInt, mode: _ModeKind = ..., *, stat_length: None | _ArrayLikeInt = ..., constant_values: ArrayLike = ..., end_values: ArrayLike = ..., reflect_type: L["odd", "even"] = ...) -> NDArray[Any]: - ... - -@overload -def pad(array: _ArrayLike[_SCT], pad_width: _ArrayLikeInt, mode: _ModeFunc, **kwargs: Any) -> NDArray[_SCT]: - ... - -@overload -def pad(array: ArrayLike, pad_width: _ArrayLikeInt, mode: _ModeFunc, **kwargs: Any) -> NDArray[Any]: - ... - diff --git a/typings/numpy/lib/arraysetops.pyi b/typings/numpy/lib/arraysetops.pyi deleted file mode 100644 index 2acd534..0000000 --- a/typings/numpy/lib/arraysetops.pyi +++ /dev/null @@ -1,142 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, Literal as L, SupportsIndex, TypeVar, overload -from numpy import bool_, byte, bytes_, cdouble, clongdouble, csingle, datetime64, double, generic, half, int8, int_, intc, intp, longdouble, longlong, number, object_, short, single, str_, timedelta64, ubyte, uint, uintc, ulonglong, ushort, void -from numpy._typing import ArrayLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeDT64_co, _ArrayLikeNumber_co, _ArrayLikeObject_co, _ArrayLikeTD64_co - -_SCT = TypeVar("_SCT", bound=generic) -_NumberType = TypeVar("_NumberType", bound=number[Any]) -_SCTNoCast = TypeVar("_SCTNoCast", bool_, ushort, ubyte, uintc, uint, ulonglong, short, byte, intc, int_, longlong, half, single, double, longdouble, csingle, cdouble, clongdouble, timedelta64, datetime64, object_, str_, bytes_, void) -__all__: list[str] -@overload -def ediff1d(ary: _ArrayLikeBool_co, to_end: None | ArrayLike = ..., to_begin: None | ArrayLike = ...) -> NDArray[int8]: - ... - -@overload -def ediff1d(ary: _ArrayLike[_NumberType], to_end: None | ArrayLike = ..., to_begin: None | ArrayLike = ...) -> NDArray[_NumberType]: - ... - -@overload -def ediff1d(ary: _ArrayLikeNumber_co, to_end: None | ArrayLike = ..., to_begin: None | ArrayLike = ...) -> NDArray[Any]: - ... - -@overload -def ediff1d(ary: _ArrayLikeDT64_co | _ArrayLikeTD64_co, to_end: None | ArrayLike = ..., to_begin: None | ArrayLike = ...) -> NDArray[timedelta64]: - ... - -@overload -def ediff1d(ary: _ArrayLikeObject_co, to_end: None | ArrayLike = ..., to_begin: None | ArrayLike = ...) -> NDArray[object_]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[False] = ..., return_inverse: L[False] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> NDArray[_SCT]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[False] = ..., return_inverse: L[False] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> NDArray[Any]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[True] = ..., return_inverse: L[False] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[_SCT], NDArray[intp]]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[True] = ..., return_inverse: L[False] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[Any], NDArray[intp]]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[False] = ..., return_inverse: L[True] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[_SCT], NDArray[intp]]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[False] = ..., return_inverse: L[True] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[Any], NDArray[intp]]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[False] = ..., return_inverse: L[False] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[_SCT], NDArray[intp]]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[False] = ..., return_inverse: L[False] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[Any], NDArray[intp]]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[True] = ..., return_inverse: L[True] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[_SCT], NDArray[intp], NDArray[intp]]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[True] = ..., return_inverse: L[True] = ..., return_counts: L[False] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[Any], NDArray[intp], NDArray[intp]]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[True] = ..., return_inverse: L[False] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[_SCT], NDArray[intp], NDArray[intp]]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[True] = ..., return_inverse: L[False] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[Any], NDArray[intp], NDArray[intp]]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[False] = ..., return_inverse: L[True] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[_SCT], NDArray[intp], NDArray[intp]]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[False] = ..., return_inverse: L[True] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[Any], NDArray[intp], NDArray[intp]]: - ... - -@overload -def unique(ar: _ArrayLike[_SCT], return_index: L[True] = ..., return_inverse: L[True] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[_SCT], NDArray[intp], NDArray[intp], NDArray[intp]]: - ... - -@overload -def unique(ar: ArrayLike, return_index: L[True] = ..., return_inverse: L[True] = ..., return_counts: L[True] = ..., axis: None | SupportsIndex = ..., *, equal_nan: bool = ...) -> tuple[NDArray[Any], NDArray[intp], NDArray[intp], NDArray[intp]]: - ... - -@overload -def intersect1d(ar1: _ArrayLike[_SCTNoCast], ar2: _ArrayLike[_SCTNoCast], assume_unique: bool = ..., return_indices: L[False] = ...) -> NDArray[_SCTNoCast]: - ... - -@overload -def intersect1d(ar1: ArrayLike, ar2: ArrayLike, assume_unique: bool = ..., return_indices: L[False] = ...) -> NDArray[Any]: - ... - -@overload -def intersect1d(ar1: _ArrayLike[_SCTNoCast], ar2: _ArrayLike[_SCTNoCast], assume_unique: bool = ..., return_indices: L[True] = ...) -> tuple[NDArray[_SCTNoCast], NDArray[intp], NDArray[intp]]: - ... - -@overload -def intersect1d(ar1: ArrayLike, ar2: ArrayLike, assume_unique: bool = ..., return_indices: L[True] = ...) -> tuple[NDArray[Any], NDArray[intp], NDArray[intp]]: - ... - -@overload -def setxor1d(ar1: _ArrayLike[_SCTNoCast], ar2: _ArrayLike[_SCTNoCast], assume_unique: bool = ...) -> NDArray[_SCTNoCast]: - ... - -@overload -def setxor1d(ar1: ArrayLike, ar2: ArrayLike, assume_unique: bool = ...) -> NDArray[Any]: - ... - -def in1d(ar1: ArrayLike, ar2: ArrayLike, assume_unique: bool = ..., invert: bool = ...) -> NDArray[bool_]: - ... - -def isin(element: ArrayLike, test_elements: ArrayLike, assume_unique: bool = ..., invert: bool = ..., *, kind: None | str = ...) -> NDArray[bool_]: - ... - -@overload -def union1d(ar1: _ArrayLike[_SCTNoCast], ar2: _ArrayLike[_SCTNoCast]) -> NDArray[_SCTNoCast]: - ... - -@overload -def union1d(ar1: ArrayLike, ar2: ArrayLike) -> NDArray[Any]: - ... - -@overload -def setdiff1d(ar1: _ArrayLike[_SCTNoCast], ar2: _ArrayLike[_SCTNoCast], assume_unique: bool = ...) -> NDArray[_SCTNoCast]: - ... - -@overload -def setdiff1d(ar1: ArrayLike, ar2: ArrayLike, assume_unique: bool = ...) -> NDArray[Any]: - ... - diff --git a/typings/numpy/lib/arrayterator.pyi b/typings/numpy/lib/arrayterator.pyi deleted file mode 100644 index ba8ad4c..0000000 --- a/typings/numpy/lib/arrayterator.pyi +++ /dev/null @@ -1,47 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Generator -from typing import Any, TypeVar, Union, overload -from numpy import dtype, generic, ndarray -from numpy._typing import DTypeLike - -_Shape = TypeVar("_Shape", bound=Any) -_DType = TypeVar("_DType", bound=dtype[Any]) -_ScalarType = TypeVar("_ScalarType", bound=generic) -_Index = Union[Union[ellipsis, int, slice], tuple[Union[ellipsis, int, slice], ...],] -__all__: list[str] -class Arrayterator(ndarray[_Shape, _DType]): - var: ndarray[_Shape, _DType] - buf_size: None | int - start: list[int] - stop: list[int] - step: list[int] - @property - def shape(self) -> tuple[int, ...]: - ... - - @property - def flat(self: ndarray[Any, dtype[_ScalarType]]) -> Generator[_ScalarType, None, None]: - ... - - def __init__(self, var: ndarray[_Shape, _DType], buf_size: None | int = ...) -> None: - ... - - @overload - def __array__(self, dtype: None = ...) -> ndarray[Any, _DType]: - ... - - @overload - def __array__(self, dtype: DTypeLike) -> ndarray[Any, dtype[Any]]: - ... - - def __getitem__(self, index: _Index) -> Arrayterator[Any, _DType]: - ... - - def __iter__(self) -> Generator[ndarray[Any, _DType], None, None]: - ... - - - diff --git a/typings/numpy/lib/format.pyi b/typings/numpy/lib/format.pyi deleted file mode 100644 index 34ae354..0000000 --- a/typings/numpy/lib/format.pyi +++ /dev/null @@ -1,48 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Final, Literal - -__all__: list[str] -EXPECTED_KEYS: Final[set[str]] -MAGIC_PREFIX: Final[bytes] -MAGIC_LEN: Literal[8] -ARRAY_ALIGN: Literal[64] -BUFFER_SIZE: Literal[262144] -def magic(major, minor): - ... - -def read_magic(fp): - ... - -def dtype_to_descr(dtype): - ... - -def descr_to_dtype(descr): - ... - -def header_data_from_array_1_0(array): - ... - -def write_array_header_1_0(fp, d): - ... - -def write_array_header_2_0(fp, d): - ... - -def read_array_header_1_0(fp): - ... - -def read_array_header_2_0(fp): - ... - -def write_array(fp, array, version=..., allow_pickle=..., pickle_kwargs=...): - ... - -def read_array(fp, allow_pickle=..., pickle_kwargs=...): - ... - -def open_memmap(filename, mode=..., dtype=..., shape=..., fortran_order=..., version=...): - ... - diff --git a/typings/numpy/lib/function_base.pyi b/typings/numpy/lib/function_base.pyi deleted file mode 100644 index 672b602..0000000 --- a/typings/numpy/lib/function_base.pyi +++ /dev/null @@ -1,382 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import sys -from collections.abc import Callable, Iterable, Iterator, Sequence -from typing import Any, Literal as L, Protocol, SupportsIndex, SupportsInt, TypeGuard, TypeVar, overload -from numpy import _OrderKACF, complex128, complexfloating, datetime64, float64, floating, generic, intp, object_, timedelta64, ufunc -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeComplex_co, _ArrayLikeDT64_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeTD64_co, _ComplexLike_co, _DTypeLike, _FloatLike_co, _ScalarLike_co, _ShapeLike - -if sys.version_info >= (3, 10): - ... -else: - ... -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) -_SCT = TypeVar("_SCT", bound=generic) -_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) -_2Tuple = tuple[_T, _T] -class _TrimZerosSequence(Protocol[_T_co]): - def __len__(self) -> int: - ... - - def __getitem__(self, key: slice, /) -> _T_co: - ... - - def __iter__(self) -> Iterator[Any]: - ... - - - -class _SupportsWriteFlush(Protocol): - def write(self, s: str, /) -> object: - ... - - def flush(self) -> object: - ... - - - -__all__: list[str] -def add_newdoc_ufunc(ufunc: ufunc, new_docstring: str, /) -> None: - ... - -@overload -def rot90(m: _ArrayLike[_SCT], k: int = ..., axes: tuple[int, int] = ...) -> NDArray[_SCT]: - ... - -@overload -def rot90(m: ArrayLike, k: int = ..., axes: tuple[int, int] = ...) -> NDArray[Any]: - ... - -@overload -def flip(m: _SCT, axis: None = ...) -> _SCT: - ... - -@overload -def flip(m: _ScalarLike_co, axis: None = ...) -> Any: - ... - -@overload -def flip(m: _ArrayLike[_SCT], axis: None | _ShapeLike = ...) -> NDArray[_SCT]: - ... - -@overload -def flip(m: ArrayLike, axis: None | _ShapeLike = ...) -> NDArray[Any]: - ... - -def iterable(y: object) -> TypeGuard[Iterable[Any]]: - ... - -@overload -def average(a: _ArrayLikeFloat_co, axis: None = ..., weights: None | _ArrayLikeFloat_co = ..., returned: L[False] = ..., keepdims: L[False] = ...) -> floating[Any]: - ... - -@overload -def average(a: _ArrayLikeComplex_co, axis: None = ..., weights: None | _ArrayLikeComplex_co = ..., returned: L[False] = ..., keepdims: L[False] = ...) -> complexfloating[Any, Any]: - ... - -@overload -def average(a: _ArrayLikeObject_co, axis: None = ..., weights: None | Any = ..., returned: L[False] = ..., keepdims: L[False] = ...) -> Any: - ... - -@overload -def average(a: _ArrayLikeFloat_co, axis: None = ..., weights: None | _ArrayLikeFloat_co = ..., returned: L[True] = ..., keepdims: L[False] = ...) -> _2Tuple[floating[Any]]: - ... - -@overload -def average(a: _ArrayLikeComplex_co, axis: None = ..., weights: None | _ArrayLikeComplex_co = ..., returned: L[True] = ..., keepdims: L[False] = ...) -> _2Tuple[complexfloating[Any, Any]]: - ... - -@overload -def average(a: _ArrayLikeObject_co, axis: None = ..., weights: None | Any = ..., returned: L[True] = ..., keepdims: L[False] = ...) -> _2Tuple[Any]: - ... - -@overload -def average(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., weights: None | Any = ..., returned: L[False] = ..., keepdims: bool = ...) -> Any: - ... - -@overload -def average(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., weights: None | Any = ..., returned: L[True] = ..., keepdims: bool = ...) -> _2Tuple[Any]: - ... - -@overload -def asarray_chkfinite(a: _ArrayLike[_SCT], dtype: None = ..., order: _OrderKACF = ...) -> NDArray[_SCT]: - ... - -@overload -def asarray_chkfinite(a: object, dtype: None = ..., order: _OrderKACF = ...) -> NDArray[Any]: - ... - -@overload -def asarray_chkfinite(a: Any, dtype: _DTypeLike[_SCT], order: _OrderKACF = ...) -> NDArray[_SCT]: - ... - -@overload -def asarray_chkfinite(a: Any, dtype: DTypeLike, order: _OrderKACF = ...) -> NDArray[Any]: - ... - -@overload -def piecewise(x: _ArrayLike[_SCT], condlist: ArrayLike, funclist: Sequence[Any | Callable[..., Any]], *args: Any, **kw: Any) -> NDArray[_SCT]: - ... - -@overload -def piecewise(x: ArrayLike, condlist: ArrayLike, funclist: Sequence[Any | Callable[..., Any]], *args: Any, **kw: Any) -> NDArray[Any]: - ... - -def select(condlist: Sequence[ArrayLike], choicelist: Sequence[ArrayLike], default: ArrayLike = ...) -> NDArray[Any]: - ... - -@overload -def copy(a: _ArrayType, order: _OrderKACF, subok: L[True]) -> _ArrayType: - ... - -@overload -def copy(a: _ArrayType, order: _OrderKACF = ..., *, subok: L[True]) -> _ArrayType: - ... - -@overload -def copy(a: _ArrayLike[_SCT], order: _OrderKACF = ..., subok: L[False] = ...) -> NDArray[_SCT]: - ... - -@overload -def copy(a: ArrayLike, order: _OrderKACF = ..., subok: L[False] = ...) -> NDArray[Any]: - ... - -def gradient(f: ArrayLike, *varargs: ArrayLike, axis: None | _ShapeLike = ..., edge_order: L[1, 2] = ...) -> Any: - ... - -@overload -def diff(a: _T, n: L[0], axis: SupportsIndex = ..., prepend: ArrayLike = ..., append: ArrayLike = ...) -> _T: - ... - -@overload -def diff(a: ArrayLike, n: int = ..., axis: SupportsIndex = ..., prepend: ArrayLike = ..., append: ArrayLike = ...) -> NDArray[Any]: - ... - -@overload -def interp(x: _ArrayLikeFloat_co, xp: _ArrayLikeFloat_co, fp: _ArrayLikeFloat_co, left: None | _FloatLike_co = ..., right: None | _FloatLike_co = ..., period: None | _FloatLike_co = ...) -> NDArray[float64]: - ... - -@overload -def interp(x: _ArrayLikeFloat_co, xp: _ArrayLikeFloat_co, fp: _ArrayLikeComplex_co, left: None | _ComplexLike_co = ..., right: None | _ComplexLike_co = ..., period: None | _FloatLike_co = ...) -> NDArray[complex128]: - ... - -@overload -def angle(z: _ComplexLike_co, deg: bool = ...) -> floating[Any]: - ... - -@overload -def angle(z: object_, deg: bool = ...) -> Any: - ... - -@overload -def angle(z: _ArrayLikeComplex_co, deg: bool = ...) -> NDArray[floating[Any]]: - ... - -@overload -def angle(z: _ArrayLikeObject_co, deg: bool = ...) -> NDArray[object_]: - ... - -@overload -def unwrap(p: _ArrayLikeFloat_co, discont: None | float = ..., axis: int = ..., *, period: float = ...) -> NDArray[floating[Any]]: - ... - -@overload -def unwrap(p: _ArrayLikeObject_co, discont: None | float = ..., axis: int = ..., *, period: float = ...) -> NDArray[object_]: - ... - -def sort_complex(a: ArrayLike) -> NDArray[complexfloating[Any, Any]]: - ... - -def trim_zeros(filt: _TrimZerosSequence[_T], trim: L["f", "b", "fb", "bf"] = ...) -> _T: - ... - -@overload -def extract(condition: ArrayLike, arr: _ArrayLike[_SCT]) -> NDArray[_SCT]: - ... - -@overload -def extract(condition: ArrayLike, arr: ArrayLike) -> NDArray[Any]: - ... - -def place(arr: NDArray[Any], mask: ArrayLike, vals: Any) -> None: - ... - -def disp(mesg: object, device: None | _SupportsWriteFlush = ..., linefeed: bool = ...) -> None: - ... - -@overload -def cov(m: _ArrayLikeFloat_co, y: None | _ArrayLikeFloat_co = ..., rowvar: bool = ..., bias: bool = ..., ddof: None | SupportsIndex | SupportsInt = ..., fweights: None | ArrayLike = ..., aweights: None | ArrayLike = ..., *, dtype: None = ...) -> NDArray[floating[Any]]: - ... - -@overload -def cov(m: _ArrayLikeComplex_co, y: None | _ArrayLikeComplex_co = ..., rowvar: bool = ..., bias: bool = ..., ddof: None | SupportsIndex | SupportsInt = ..., fweights: None | ArrayLike = ..., aweights: None | ArrayLike = ..., *, dtype: None = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def cov(m: _ArrayLikeComplex_co, y: None | _ArrayLikeComplex_co = ..., rowvar: bool = ..., bias: bool = ..., ddof: None | SupportsIndex | SupportsInt = ..., fweights: None | ArrayLike = ..., aweights: None | ArrayLike = ..., *, dtype: _DTypeLike[_SCT]) -> NDArray[_SCT]: - ... - -@overload -def cov(m: _ArrayLikeComplex_co, y: None | _ArrayLikeComplex_co = ..., rowvar: bool = ..., bias: bool = ..., ddof: None | SupportsIndex | SupportsInt = ..., fweights: None | ArrayLike = ..., aweights: None | ArrayLike = ..., *, dtype: DTypeLike) -> NDArray[Any]: - ... - -@overload -def corrcoef(m: _ArrayLikeFloat_co, y: None | _ArrayLikeFloat_co = ..., rowvar: bool = ..., *, dtype: None = ...) -> NDArray[floating[Any]]: - ... - -@overload -def corrcoef(m: _ArrayLikeComplex_co, y: None | _ArrayLikeComplex_co = ..., rowvar: bool = ..., *, dtype: None = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def corrcoef(m: _ArrayLikeComplex_co, y: None | _ArrayLikeComplex_co = ..., rowvar: bool = ..., *, dtype: _DTypeLike[_SCT]) -> NDArray[_SCT]: - ... - -@overload -def corrcoef(m: _ArrayLikeComplex_co, y: None | _ArrayLikeComplex_co = ..., rowvar: bool = ..., *, dtype: DTypeLike) -> NDArray[Any]: - ... - -def blackman(M: _FloatLike_co) -> NDArray[floating[Any]]: - ... - -def bartlett(M: _FloatLike_co) -> NDArray[floating[Any]]: - ... - -def hanning(M: _FloatLike_co) -> NDArray[floating[Any]]: - ... - -def hamming(M: _FloatLike_co) -> NDArray[floating[Any]]: - ... - -def i0(x: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -def kaiser(M: _FloatLike_co, beta: _FloatLike_co) -> NDArray[floating[Any]]: - ... - -@overload -def sinc(x: _FloatLike_co) -> floating[Any]: - ... - -@overload -def sinc(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def sinc(x: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def sinc(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def median(a: _ArrayLikeFloat_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., keepdims: L[False] = ...) -> floating[Any]: - ... - -@overload -def median(a: _ArrayLikeComplex_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., keepdims: L[False] = ...) -> complexfloating[Any, Any]: - ... - -@overload -def median(a: _ArrayLikeTD64_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., keepdims: L[False] = ...) -> timedelta64: - ... - -@overload -def median(a: _ArrayLikeObject_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., keepdims: L[False] = ...) -> Any: - ... - -@overload -def median(a: _ArrayLikeFloat_co | _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., out: None = ..., overwrite_input: bool = ..., keepdims: bool = ...) -> Any: - ... - -@overload -def median(a: _ArrayLikeFloat_co | _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, axis: None | _ShapeLike = ..., out: _ArrayType = ..., overwrite_input: bool = ..., keepdims: bool = ...) -> _ArrayType: - ... - -_MethodKind = L["inverted_cdf", "averaged_inverted_cdf", "closest_observation", "interpolated_inverted_cdf", "hazen", "weibull", "linear", "median_unbiased", "normal_unbiased", "lower", "higher", "midpoint", "nearest",] -@overload -def percentile(a: _ArrayLikeFloat_co, q: _FloatLike_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> floating[Any]: - ... - -@overload -def percentile(a: _ArrayLikeComplex_co, q: _FloatLike_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> complexfloating[Any, Any]: - ... - -@overload -def percentile(a: _ArrayLikeTD64_co, q: _FloatLike_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> timedelta64: - ... - -@overload -def percentile(a: _ArrayLikeDT64_co, q: _FloatLike_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> datetime64: - ... - -@overload -def percentile(a: _ArrayLikeObject_co, q: _FloatLike_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> Any: - ... - -@overload -def percentile(a: _ArrayLikeFloat_co, q: _ArrayLikeFloat_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> NDArray[floating[Any]]: - ... - -@overload -def percentile(a: _ArrayLikeComplex_co, q: _ArrayLikeFloat_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def percentile(a: _ArrayLikeTD64_co, q: _ArrayLikeFloat_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> NDArray[timedelta64]: - ... - -@overload -def percentile(a: _ArrayLikeDT64_co, q: _ArrayLikeFloat_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> NDArray[datetime64]: - ... - -@overload -def percentile(a: _ArrayLikeObject_co, q: _ArrayLikeFloat_co, axis: None = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: L[False] = ...) -> NDArray[object_]: - ... - -@overload -def percentile(a: _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, q: _ArrayLikeFloat_co, axis: None | _ShapeLike = ..., out: None = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: bool = ...) -> Any: - ... - -@overload -def percentile(a: _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, q: _ArrayLikeFloat_co, axis: None | _ShapeLike = ..., out: _ArrayType = ..., overwrite_input: bool = ..., method: _MethodKind = ..., keepdims: bool = ...) -> _ArrayType: - ... - -quantile = ... -def trapz(y: _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co, x: None | _ArrayLikeComplex_co | _ArrayLikeTD64_co | _ArrayLikeObject_co = ..., dx: float = ..., axis: SupportsIndex = ...) -> Any: - ... - -def meshgrid(*xi: ArrayLike, copy: bool = ..., sparse: bool = ..., indexing: L["xy", "ij"] = ...) -> list[NDArray[Any]]: - ... - -@overload -def delete(arr: _ArrayLike[_SCT], obj: slice | _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> NDArray[_SCT]: - ... - -@overload -def delete(arr: ArrayLike, obj: slice | _ArrayLikeInt_co, axis: None | SupportsIndex = ...) -> NDArray[Any]: - ... - -@overload -def insert(arr: _ArrayLike[_SCT], obj: slice | _ArrayLikeInt_co, values: ArrayLike, axis: None | SupportsIndex = ...) -> NDArray[_SCT]: - ... - -@overload -def insert(arr: ArrayLike, obj: slice | _ArrayLikeInt_co, values: ArrayLike, axis: None | SupportsIndex = ...) -> NDArray[Any]: - ... - -def append(arr: ArrayLike, values: ArrayLike, axis: None | SupportsIndex = ...) -> NDArray[Any]: - ... - -@overload -def digitize(x: _FloatLike_co, bins: _ArrayLikeFloat_co, right: bool = ...) -> intp: - ... - -@overload -def digitize(x: _ArrayLikeFloat_co, bins: _ArrayLikeFloat_co, right: bool = ...) -> NDArray[intp]: - ... - diff --git a/typings/numpy/lib/histograms.pyi b/typings/numpy/lib/histograms.pyi deleted file mode 100644 index cd7dc4b..0000000 --- a/typings/numpy/lib/histograms.pyi +++ /dev/null @@ -1,19 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Sequence -from typing import Any, Literal as L, SupportsIndex -from numpy._typing import ArrayLike, NDArray - -_BinKind = L["stone", "auto", "doane", "fd", "rice", "scott", "sqrt", "sturges",] -__all__: list[str] -def histogram_bin_edges(a: ArrayLike, bins: _BinKind | SupportsIndex | ArrayLike = ..., range: None | tuple[float, float] = ..., weights: None | ArrayLike = ...) -> NDArray[Any]: - ... - -def histogram(a: ArrayLike, bins: _BinKind | SupportsIndex | ArrayLike = ..., range: None | tuple[float, float] = ..., density: bool = ..., weights: None | ArrayLike = ...) -> tuple[NDArray[Any], NDArray[Any]]: - ... - -def histogramdd(sample: ArrayLike, bins: SupportsIndex | ArrayLike = ..., range: Sequence[tuple[float, float]] = ..., density: None | bool = ..., weights: None | ArrayLike = ...) -> tuple[NDArray[Any], list[NDArray[Any]]]: - ... - diff --git a/typings/numpy/lib/index_tricks.pyi b/typings/numpy/lib/index_tricks.pyi deleted file mode 100644 index 16da188..0000000 --- a/typings/numpy/lib/index_tricks.pyi +++ /dev/null @@ -1,151 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Sequence -from typing import Any, Generic, Literal, SupportsIndex, TypeVar, overload -from numpy import bool_, bytes_, complex_, dtype, float_, int_, matrix as _Matrix, ndarray, str_ -from numpy._typing import ArrayLike, DTypeLike, NDArray, _FiniteNestedSequence, _NestedSequence, _SupportsDType - -_T = TypeVar("_T") -_DType = TypeVar("_DType", bound=dtype[Any]) -_BoolType = TypeVar("_BoolType", Literal[True], Literal[False]) -_TupType = TypeVar("_TupType", bound=tuple[Any, ...]) -_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any]) -__all__: list[str] -@overload -def ix_(*args: _FiniteNestedSequence[_SupportsDType[_DType]]) -> tuple[ndarray[Any, _DType], ...]: - ... - -@overload -def ix_(*args: str | _NestedSequence[str]) -> tuple[NDArray[str_], ...]: - ... - -@overload -def ix_(*args: bytes | _NestedSequence[bytes]) -> tuple[NDArray[bytes_], ...]: - ... - -@overload -def ix_(*args: bool | _NestedSequence[bool]) -> tuple[NDArray[bool_], ...]: - ... - -@overload -def ix_(*args: int | _NestedSequence[int]) -> tuple[NDArray[int_], ...]: - ... - -@overload -def ix_(*args: float | _NestedSequence[float]) -> tuple[NDArray[float_], ...]: - ... - -@overload -def ix_(*args: complex | _NestedSequence[complex]) -> tuple[NDArray[complex_], ...]: - ... - -class nd_grid(Generic[_BoolType]): - sparse: _BoolType - def __init__(self, sparse: _BoolType = ...) -> None: - ... - - @overload - def __getitem__(self: nd_grid[Literal[False]], key: slice | Sequence[slice]) -> NDArray[Any]: - ... - - @overload - def __getitem__(self: nd_grid[Literal[True]], key: slice | Sequence[slice]) -> list[NDArray[Any]]: - ... - - - -class MGridClass(nd_grid[Literal[False]]): - def __init__(self) -> None: - ... - - - -mgrid: MGridClass -class OGridClass(nd_grid[Literal[True]]): - def __init__(self) -> None: - ... - - - -ogrid: OGridClass -class AxisConcatenator: - axis: int - matrix: bool - ndmin: int - trans1d: int - def __init__(self, axis: int = ..., matrix: bool = ..., ndmin: int = ..., trans1d: int = ...) -> None: - ... - - @staticmethod - @overload - def concatenate(*a: ArrayLike, axis: SupportsIndex = ..., out: None = ...) -> NDArray[Any]: - ... - - @staticmethod - @overload - def concatenate(*a: ArrayLike, axis: SupportsIndex = ..., out: _ArrayType = ...) -> _ArrayType: - ... - - @staticmethod - def makemat(data: ArrayLike, dtype: DTypeLike = ..., copy: bool = ...) -> _Matrix[Any, Any]: - ... - - def __getitem__(self, key: Any) -> Any: - ... - - - -class RClass(AxisConcatenator): - axis: Literal[0] - matrix: Literal[False] - ndmin: Literal[1] - trans1d: Literal[-1] - def __init__(self) -> None: - ... - - - -r_: RClass -class CClass(AxisConcatenator): - axis: Literal[-1] - matrix: Literal[False] - ndmin: Literal[2] - trans1d: Literal[0] - def __init__(self) -> None: - ... - - - -c_: CClass -class IndexExpression(Generic[_BoolType]): - maketuple: _BoolType - def __init__(self, maketuple: _BoolType) -> None: - ... - - @overload - def __getitem__(self, item: _TupType) -> _TupType: - ... - - @overload - def __getitem__(self: IndexExpression[Literal[True]], item: _T) -> tuple[_T]: - ... - - @overload - def __getitem__(self: IndexExpression[Literal[False]], item: _T) -> _T: - ... - - - -index_exp: IndexExpression[Literal[True]] -s_: IndexExpression[Literal[False]] -def fill_diagonal(a: ndarray[Any, Any], val: Any, wrap: bool = ...) -> None: - ... - -def diag_indices(n: int, ndim: int = ...) -> tuple[NDArray[int_], ...]: - ... - -def diag_indices_from(arr: ArrayLike) -> tuple[NDArray[int_], ...]: - ... - diff --git a/typings/numpy/lib/mixins.pyi b/typings/numpy/lib/mixins.pyi deleted file mode 100644 index 576250d..0000000 --- a/typings/numpy/lib/mixins.pyi +++ /dev/null @@ -1,169 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from abc import ABCMeta, abstractmethod -from typing import Any, Literal as L -from numpy import ufunc - -__all__: list[str] -class NDArrayOperatorsMixin(metaclass=ABCMeta): - @abstractmethod - def __array_ufunc__(self, ufunc: ufunc, method: L["__call__", "reduce", "reduceat", "accumulate", "outer", "inner"], *inputs: Any, **kwargs: Any) -> Any: - ... - - def __lt__(self, other: Any) -> Any: - ... - - def __le__(self, other: Any) -> Any: - ... - - def __eq__(self, other: Any) -> Any: - ... - - def __ne__(self, other: Any) -> Any: - ... - - def __gt__(self, other: Any) -> Any: - ... - - def __ge__(self, other: Any) -> Any: - ... - - def __add__(self, other: Any) -> Any: - ... - - def __radd__(self, other: Any) -> Any: - ... - - def __iadd__(self, other: Any) -> Any: - ... - - def __sub__(self, other: Any) -> Any: - ... - - def __rsub__(self, other: Any) -> Any: - ... - - def __isub__(self, other: Any) -> Any: - ... - - def __mul__(self, other: Any) -> Any: - ... - - def __rmul__(self, other: Any) -> Any: - ... - - def __imul__(self, other: Any) -> Any: - ... - - def __matmul__(self, other: Any) -> Any: - ... - - def __rmatmul__(self, other: Any) -> Any: - ... - - def __imatmul__(self, other: Any) -> Any: - ... - - def __truediv__(self, other: Any) -> Any: - ... - - def __rtruediv__(self, other: Any) -> Any: - ... - - def __itruediv__(self, other: Any) -> Any: - ... - - def __floordiv__(self, other: Any) -> Any: - ... - - def __rfloordiv__(self, other: Any) -> Any: - ... - - def __ifloordiv__(self, other: Any) -> Any: - ... - - def __mod__(self, other: Any) -> Any: - ... - - def __rmod__(self, other: Any) -> Any: - ... - - def __imod__(self, other: Any) -> Any: - ... - - def __divmod__(self, other: Any) -> Any: - ... - - def __rdivmod__(self, other: Any) -> Any: - ... - - def __pow__(self, other: Any) -> Any: - ... - - def __rpow__(self, other: Any) -> Any: - ... - - def __ipow__(self, other: Any) -> Any: - ... - - def __lshift__(self, other: Any) -> Any: - ... - - def __rlshift__(self, other: Any) -> Any: - ... - - def __ilshift__(self, other: Any) -> Any: - ... - - def __rshift__(self, other: Any) -> Any: - ... - - def __rrshift__(self, other: Any) -> Any: - ... - - def __irshift__(self, other: Any) -> Any: - ... - - def __and__(self, other: Any) -> Any: - ... - - def __rand__(self, other: Any) -> Any: - ... - - def __iand__(self, other: Any) -> Any: - ... - - def __xor__(self, other: Any) -> Any: - ... - - def __rxor__(self, other: Any) -> Any: - ... - - def __ixor__(self, other: Any) -> Any: - ... - - def __or__(self, other: Any) -> Any: - ... - - def __ror__(self, other: Any) -> Any: - ... - - def __ior__(self, other: Any) -> Any: - ... - - def __neg__(self) -> Any: - ... - - def __pos__(self) -> Any: - ... - - def __abs__(self) -> Any: - ... - - def __invert__(self) -> Any: - ... - - - diff --git a/typings/numpy/lib/nanfunctions.pyi b/typings/numpy/lib/nanfunctions.pyi deleted file mode 100644 index 4a1b63c..0000000 --- a/typings/numpy/lib/nanfunctions.pyi +++ /dev/null @@ -1,19 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -__all__: list[str] -nanmin = ... -nanmax = ... -nanargmin = ... -nanargmax = ... -nansum = ... -nanprod = ... -nancumsum = ... -nancumprod = ... -nanmean = ... -nanvar = ... -nanstd = ... -nanmedian = ... -nanpercentile = ... -nanquantile = ... diff --git a/typings/numpy/lib/npyio.pyi b/typings/numpy/lib/npyio.pyi deleted file mode 100644 index 7298d32..0000000 --- a/typings/numpy/lib/npyio.pyi +++ /dev/null @@ -1,170 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import zipfile -import types -from re import Pattern -from collections.abc import Callable, Collection, Iterable, Iterator, Mapping, Sequence -from typing import Any, Generic, IO, Literal as L, Protocol, TypeVar, overload -from numpy import dtype, float64, generic, recarray, record, void -from numpy.ma.mrecords import MaskedRecords -from numpy._typing import ArrayLike, DTypeLike, NDArray, _DTypeLike, _SupportsArrayFunc - -_T = TypeVar("_T") -_T_contra = TypeVar("_T_contra", contravariant=True) -_T_co = TypeVar("_T_co", covariant=True) -_SCT = TypeVar("_SCT", bound=generic) -_CharType_co = TypeVar("_CharType_co", str, bytes, covariant=True) -_CharType_contra = TypeVar("_CharType_contra", str, bytes, contravariant=True) -class _SupportsGetItem(Protocol[_T_contra, _T_co]): - def __getitem__(self, key: _T_contra, /) -> _T_co: - ... - - - -class _SupportsRead(Protocol[_CharType_co]): - def read(self) -> _CharType_co: - ... - - - -class _SupportsReadSeek(Protocol[_CharType_co]): - def read(self, n: int, /) -> _CharType_co: - ... - - def seek(self, offset: int, whence: int, /) -> object: - ... - - - -class _SupportsWrite(Protocol[_CharType_contra]): - def write(self, s: _CharType_contra, /) -> object: - ... - - - -__all__: list[str] -class BagObj(Generic[_T_co]): - def __init__(self, obj: _SupportsGetItem[str, _T_co]) -> None: - ... - - def __getattribute__(self, key: str) -> _T_co: - ... - - def __dir__(self) -> list[str]: - ... - - - -class NpzFile(Mapping[str, NDArray[Any]]): - zip: zipfile.ZipFile - fid: None | IO[str] - files: list[str] - allow_pickle: bool - pickle_kwargs: None | Mapping[str, Any] - _MAX_REPR_ARRAY_COUNT: int - @property - def f(self: _T) -> BagObj[_T]: - ... - - @f.setter - def f(self: _T, value: BagObj[_T]) -> None: - ... - - def __init__(self, fid: IO[str], own_fid: bool = ..., allow_pickle: bool = ..., pickle_kwargs: None | Mapping[str, Any] = ...) -> None: - ... - - def __enter__(self: _T) -> _T: - ... - - def __exit__(self, exc_type: None | type[BaseException], exc_value: None | BaseException, traceback: None | types.TracebackType, /) -> None: - ... - - def close(self) -> None: - ... - - def __del__(self) -> None: - ... - - def __iter__(self) -> Iterator[str]: - ... - - def __len__(self) -> int: - ... - - def __getitem__(self, key: str) -> NDArray[Any]: - ... - - def __contains__(self, key: str) -> bool: - ... - - def __repr__(self) -> str: - ... - - - -def load(file: str | bytes | os.PathLike[Any] | _SupportsReadSeek[bytes], mmap_mode: L[None, "r+", "r", "w+", "c"] = ..., allow_pickle: bool = ..., fix_imports: bool = ..., encoding: L["ASCII", "latin1", "bytes"] = ...) -> Any: - ... - -def save(file: str | os.PathLike[str] | _SupportsWrite[bytes], arr: ArrayLike, allow_pickle: bool = ..., fix_imports: bool = ...) -> None: - ... - -def savez(file: str | os.PathLike[str] | _SupportsWrite[bytes], *args: ArrayLike, **kwds: ArrayLike) -> None: - ... - -def savez_compressed(file: str | os.PathLike[str] | _SupportsWrite[bytes], *args: ArrayLike, **kwds: ArrayLike) -> None: - ... - -@overload -def loadtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], dtype: None = ..., comments: None | str | Sequence[str] = ..., delimiter: None | str = ..., converters: None | Mapping[int | str, Callable[[str], Any]] = ..., skiprows: int = ..., usecols: int | Sequence[int] = ..., unpack: bool = ..., ndmin: L[0, 1, 2] = ..., encoding: None | str = ..., max_rows: None | int = ..., *, quotechar: None | str = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def loadtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], dtype: _DTypeLike[_SCT], comments: None | str | Sequence[str] = ..., delimiter: None | str = ..., converters: None | Mapping[int | str, Callable[[str], Any]] = ..., skiprows: int = ..., usecols: int | Sequence[int] = ..., unpack: bool = ..., ndmin: L[0, 1, 2] = ..., encoding: None | str = ..., max_rows: None | int = ..., *, quotechar: None | str = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def loadtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], dtype: DTypeLike, comments: None | str | Sequence[str] = ..., delimiter: None | str = ..., converters: None | Mapping[int | str, Callable[[str], Any]] = ..., skiprows: int = ..., usecols: int | Sequence[int] = ..., unpack: bool = ..., ndmin: L[0, 1, 2] = ..., encoding: None | str = ..., max_rows: None | int = ..., *, quotechar: None | str = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -def savetxt(fname: str | os.PathLike[str] | _SupportsWrite[str] | _SupportsWrite[bytes], X: ArrayLike, fmt: str | Sequence[str] = ..., delimiter: str = ..., newline: str = ..., header: str = ..., footer: str = ..., comments: str = ..., encoding: None | str = ...) -> None: - ... - -@overload -def fromregex(file: str | os.PathLike[str] | _SupportsRead[str] | _SupportsRead[bytes], regexp: str | bytes | Pattern[Any], dtype: _DTypeLike[_SCT], encoding: None | str = ...) -> NDArray[_SCT]: - ... - -@overload -def fromregex(file: str | os.PathLike[str] | _SupportsRead[str] | _SupportsRead[bytes], regexp: str | bytes | Pattern[Any], dtype: DTypeLike, encoding: None | str = ...) -> NDArray[Any]: - ... - -@overload -def genfromtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], dtype: None = ..., comments: str = ..., delimiter: None | str | int | Iterable[int] = ..., skip_header: int = ..., skip_footer: int = ..., converters: None | Mapping[int | str, Callable[[str], Any]] = ..., missing_values: Any = ..., filling_values: Any = ..., usecols: None | Sequence[int] = ..., names: L[None, True] | str | Collection[str] = ..., excludelist: None | Sequence[str] = ..., deletechars: str = ..., replace_space: str = ..., autostrip: bool = ..., case_sensitive: bool | L['upper', 'lower'] = ..., defaultfmt: str = ..., unpack: None | bool = ..., usemask: bool = ..., loose: bool = ..., invalid_raise: bool = ..., max_rows: None | int = ..., encoding: str = ..., *, ndmin: L[0, 1, 2] = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def genfromtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], dtype: _DTypeLike[_SCT], comments: str = ..., delimiter: None | str | int | Iterable[int] = ..., skip_header: int = ..., skip_footer: int = ..., converters: None | Mapping[int | str, Callable[[str], Any]] = ..., missing_values: Any = ..., filling_values: Any = ..., usecols: None | Sequence[int] = ..., names: L[None, True] | str | Collection[str] = ..., excludelist: None | Sequence[str] = ..., deletechars: str = ..., replace_space: str = ..., autostrip: bool = ..., case_sensitive: bool | L['upper', 'lower'] = ..., defaultfmt: str = ..., unpack: None | bool = ..., usemask: bool = ..., loose: bool = ..., invalid_raise: bool = ..., max_rows: None | int = ..., encoding: str = ..., *, ndmin: L[0, 1, 2] = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def genfromtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], dtype: DTypeLike, comments: str = ..., delimiter: None | str | int | Iterable[int] = ..., skip_header: int = ..., skip_footer: int = ..., converters: None | Mapping[int | str, Callable[[str], Any]] = ..., missing_values: Any = ..., filling_values: Any = ..., usecols: None | Sequence[int] = ..., names: L[None, True] | str | Collection[str] = ..., excludelist: None | Sequence[str] = ..., deletechars: str = ..., replace_space: str = ..., autostrip: bool = ..., case_sensitive: bool | L['upper', 'lower'] = ..., defaultfmt: str = ..., unpack: None | bool = ..., usemask: bool = ..., loose: bool = ..., invalid_raise: bool = ..., max_rows: None | int = ..., encoding: str = ..., *, ndmin: L[0, 1, 2] = ..., like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def recfromtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], *, usemask: L[False] = ..., **kwargs: Any) -> recarray[Any, dtype[record]]: - ... - -@overload -def recfromtxt(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], *, usemask: L[True], **kwargs: Any) -> MaskedRecords[Any, dtype[void]]: - ... - -@overload -def recfromcsv(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], *, usemask: L[False] = ..., **kwargs: Any) -> recarray[Any, dtype[record]]: - ... - -@overload -def recfromcsv(fname: str | os.PathLike[str] | Iterable[str] | Iterable[bytes], *, usemask: L[True], **kwargs: Any) -> MaskedRecords[Any, dtype[void]]: - ... - diff --git a/typings/numpy/lib/polynomial.pyi b/typings/numpy/lib/polynomial.pyi deleted file mode 100644 index d3bbd92..0000000 --- a/typings/numpy/lib/polynomial.pyi +++ /dev/null @@ -1,183 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, Literal as L, NoReturn, SupportsIndex, SupportsInt, TypeVar, overload -from numpy import bool_, complex128, complexfloating, float64, floating, int32, int64, object_, poly1d as poly1d, signedinteger, unsignedinteger -from numpy._typing import ArrayLike, NDArray, _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeUInt_co - -_T = TypeVar("_T") -_2Tup = tuple[_T, _T] -_5Tup = tuple[_T, NDArray[float64], NDArray[int32], NDArray[float64], NDArray[float64],] -__all__: list[str] -def poly(seq_of_zeros: ArrayLike) -> NDArray[floating[Any]]: - ... - -def roots(p: ArrayLike) -> NDArray[complexfloating[Any, Any]] | NDArray[floating[Any]]: - ... - -@overload -def polyint(p: poly1d, m: SupportsInt | SupportsIndex = ..., k: None | _ArrayLikeComplex_co | _ArrayLikeObject_co = ...) -> poly1d: - ... - -@overload -def polyint(p: _ArrayLikeFloat_co, m: SupportsInt | SupportsIndex = ..., k: None | _ArrayLikeFloat_co = ...) -> NDArray[floating[Any]]: - ... - -@overload -def polyint(p: _ArrayLikeComplex_co, m: SupportsInt | SupportsIndex = ..., k: None | _ArrayLikeComplex_co = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def polyint(p: _ArrayLikeObject_co, m: SupportsInt | SupportsIndex = ..., k: None | _ArrayLikeObject_co = ...) -> NDArray[object_]: - ... - -@overload -def polyder(p: poly1d, m: SupportsInt | SupportsIndex = ...) -> poly1d: - ... - -@overload -def polyder(p: _ArrayLikeFloat_co, m: SupportsInt | SupportsIndex = ...) -> NDArray[floating[Any]]: - ... - -@overload -def polyder(p: _ArrayLikeComplex_co, m: SupportsInt | SupportsIndex = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def polyder(p: _ArrayLikeObject_co, m: SupportsInt | SupportsIndex = ...) -> NDArray[object_]: - ... - -@overload -def polyfit(x: _ArrayLikeFloat_co, y: _ArrayLikeFloat_co, deg: SupportsIndex | SupportsInt, rcond: None | float = ..., full: L[False] = ..., w: None | _ArrayLikeFloat_co = ..., cov: L[False] = ...) -> NDArray[float64]: - ... - -@overload -def polyfit(x: _ArrayLikeComplex_co, y: _ArrayLikeComplex_co, deg: SupportsIndex | SupportsInt, rcond: None | float = ..., full: L[False] = ..., w: None | _ArrayLikeFloat_co = ..., cov: L[False] = ...) -> NDArray[complex128]: - ... - -@overload -def polyfit(x: _ArrayLikeFloat_co, y: _ArrayLikeFloat_co, deg: SupportsIndex | SupportsInt, rcond: None | float = ..., full: L[False] = ..., w: None | _ArrayLikeFloat_co = ..., cov: L[True, "unscaled"] = ...) -> _2Tup[NDArray[float64]]: - ... - -@overload -def polyfit(x: _ArrayLikeComplex_co, y: _ArrayLikeComplex_co, deg: SupportsIndex | SupportsInt, rcond: None | float = ..., full: L[False] = ..., w: None | _ArrayLikeFloat_co = ..., cov: L[True, "unscaled"] = ...) -> _2Tup[NDArray[complex128]]: - ... - -@overload -def polyfit(x: _ArrayLikeFloat_co, y: _ArrayLikeFloat_co, deg: SupportsIndex | SupportsInt, rcond: None | float = ..., full: L[True] = ..., w: None | _ArrayLikeFloat_co = ..., cov: bool | L["unscaled"] = ...) -> _5Tup[NDArray[float64]]: - ... - -@overload -def polyfit(x: _ArrayLikeComplex_co, y: _ArrayLikeComplex_co, deg: SupportsIndex | SupportsInt, rcond: None | float = ..., full: L[True] = ..., w: None | _ArrayLikeFloat_co = ..., cov: bool | L["unscaled"] = ...) -> _5Tup[NDArray[complex128]]: - ... - -@overload -def polyval(p: _ArrayLikeBool_co, x: _ArrayLikeBool_co) -> NDArray[int64]: - ... - -@overload -def polyval(p: _ArrayLikeUInt_co, x: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def polyval(p: _ArrayLikeInt_co, x: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - -@overload -def polyval(p: _ArrayLikeFloat_co, x: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def polyval(p: _ArrayLikeComplex_co, x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def polyval(p: _ArrayLikeObject_co, x: _ArrayLikeObject_co) -> NDArray[object_]: - ... - -@overload -def polyadd(a1: poly1d, a2: _ArrayLikeComplex_co | _ArrayLikeObject_co) -> poly1d: - ... - -@overload -def polyadd(a1: _ArrayLikeComplex_co | _ArrayLikeObject_co, a2: poly1d) -> poly1d: - ... - -@overload -def polyadd(a1: _ArrayLikeBool_co, a2: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - -@overload -def polyadd(a1: _ArrayLikeUInt_co, a2: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def polyadd(a1: _ArrayLikeInt_co, a2: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - -@overload -def polyadd(a1: _ArrayLikeFloat_co, a2: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def polyadd(a1: _ArrayLikeComplex_co, a2: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def polyadd(a1: _ArrayLikeObject_co, a2: _ArrayLikeObject_co) -> NDArray[object_]: - ... - -@overload -def polysub(a1: poly1d, a2: _ArrayLikeComplex_co | _ArrayLikeObject_co) -> poly1d: - ... - -@overload -def polysub(a1: _ArrayLikeComplex_co | _ArrayLikeObject_co, a2: poly1d) -> poly1d: - ... - -@overload -def polysub(a1: _ArrayLikeBool_co, a2: _ArrayLikeBool_co) -> NoReturn: - ... - -@overload -def polysub(a1: _ArrayLikeUInt_co, a2: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def polysub(a1: _ArrayLikeInt_co, a2: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - -@overload -def polysub(a1: _ArrayLikeFloat_co, a2: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def polysub(a1: _ArrayLikeComplex_co, a2: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def polysub(a1: _ArrayLikeObject_co, a2: _ArrayLikeObject_co) -> NDArray[object_]: - ... - -polymul = ... -@overload -def polydiv(u: poly1d, v: _ArrayLikeComplex_co | _ArrayLikeObject_co) -> _2Tup[poly1d]: - ... - -@overload -def polydiv(u: _ArrayLikeComplex_co | _ArrayLikeObject_co, v: poly1d) -> _2Tup[poly1d]: - ... - -@overload -def polydiv(u: _ArrayLikeFloat_co, v: _ArrayLikeFloat_co) -> _2Tup[NDArray[floating[Any]]]: - ... - -@overload -def polydiv(u: _ArrayLikeComplex_co, v: _ArrayLikeComplex_co) -> _2Tup[NDArray[complexfloating[Any, Any]]]: - ... - -@overload -def polydiv(u: _ArrayLikeObject_co, v: _ArrayLikeObject_co) -> _2Tup[NDArray[Any]]: - ... - diff --git a/typings/numpy/lib/scimath.pyi b/typings/numpy/lib/scimath.pyi deleted file mode 100644 index f12055a..0000000 --- a/typings/numpy/lib/scimath.pyi +++ /dev/null @@ -1,153 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, overload -from numpy import complexfloating -from numpy._typing import NDArray, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ComplexLike_co, _FloatLike_co - -__all__: list[str] -@overload -def sqrt(x: _FloatLike_co) -> Any: - ... - -@overload -def sqrt(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def sqrt(x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def sqrt(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def log(x: _FloatLike_co) -> Any: - ... - -@overload -def log(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def log(x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def log(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def log10(x: _FloatLike_co) -> Any: - ... - -@overload -def log10(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def log10(x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def log10(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def log2(x: _FloatLike_co) -> Any: - ... - -@overload -def log2(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def log2(x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def log2(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def logn(n: _FloatLike_co, x: _FloatLike_co) -> Any: - ... - -@overload -def logn(n: _ComplexLike_co, x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def logn(n: _ArrayLikeFloat_co, x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def logn(n: _ArrayLikeComplex_co, x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def power(x: _FloatLike_co, p: _FloatLike_co) -> Any: - ... - -@overload -def power(x: _ComplexLike_co, p: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def power(x: _ArrayLikeFloat_co, p: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def power(x: _ArrayLikeComplex_co, p: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def arccos(x: _FloatLike_co) -> Any: - ... - -@overload -def arccos(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def arccos(x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def arccos(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def arcsin(x: _FloatLike_co) -> Any: - ... - -@overload -def arcsin(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def arcsin(x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def arcsin(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def arctanh(x: _FloatLike_co) -> Any: - ... - -@overload -def arctanh(x: _ComplexLike_co) -> complexfloating[Any, Any]: - ... - -@overload -def arctanh(x: _ArrayLikeFloat_co) -> NDArray[Any]: - ... - -@overload -def arctanh(x: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - diff --git a/typings/numpy/lib/shape_base.pyi b/typings/numpy/lib/shape_base.pyi deleted file mode 100644 index 69d16c4..0000000 --- a/typings/numpy/lib/shape_base.pyi +++ /dev/null @@ -1,177 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import sys -from collections.abc import Callable, Sequence -from typing import Any, Concatenate, ParamSpec, Protocol, SupportsIndex, TypeVar, overload -from numpy import bool_, complexfloating, floating, generic, integer, object_, signedinteger, ufunc, unsignedinteger -from numpy._typing import ArrayLike, NDArray, _ArrayLike, _ArrayLikeBool_co, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeUInt_co, _ShapeLike - -if sys.version_info >= (3, 10): - ... -else: - ... -_P = ParamSpec("_P") -_SCT = TypeVar("_SCT", bound=generic) -class _ArrayWrap(Protocol): - def __call__(self, array: NDArray[Any], context: None | tuple[ufunc, tuple[Any, ...], int] = ..., /) -> Any: - ... - - - -class _ArrayPrepare(Protocol): - def __call__(self, array: NDArray[Any], context: None | tuple[ufunc, tuple[Any, ...], int] = ..., /) -> Any: - ... - - - -class _SupportsArrayWrap(Protocol): - @property - def __array_wrap__(self) -> _ArrayWrap: - ... - - - -class _SupportsArrayPrepare(Protocol): - @property - def __array_prepare__(self) -> _ArrayPrepare: - ... - - - -__all__: list[str] -row_stack = ... -def take_along_axis(arr: _SCT | NDArray[_SCT], indices: NDArray[integer[Any]], axis: None | int) -> NDArray[_SCT]: - ... - -def put_along_axis(arr: NDArray[_SCT], indices: NDArray[integer[Any]], values: ArrayLike, axis: None | int) -> None: - ... - -@overload -def apply_along_axis(func1d: Callable[Concatenate[NDArray[Any], _P], _ArrayLike[_SCT]], axis: SupportsIndex, arr: ArrayLike, *args: _P.args, **kwargs: _P.kwargs) -> NDArray[_SCT]: - ... - -@overload -def apply_along_axis(func1d: Callable[Concatenate[NDArray[Any], _P], ArrayLike], axis: SupportsIndex, arr: ArrayLike, *args: _P.args, **kwargs: _P.kwargs) -> NDArray[Any]: - ... - -def apply_over_axes(func: Callable[[NDArray[Any], int], NDArray[_SCT]], a: ArrayLike, axes: int | Sequence[int]) -> NDArray[_SCT]: - ... - -@overload -def expand_dims(a: _ArrayLike[_SCT], axis: _ShapeLike) -> NDArray[_SCT]: - ... - -@overload -def expand_dims(a: ArrayLike, axis: _ShapeLike) -> NDArray[Any]: - ... - -@overload -def column_stack(tup: Sequence[_ArrayLike[_SCT]]) -> NDArray[_SCT]: - ... - -@overload -def column_stack(tup: Sequence[ArrayLike]) -> NDArray[Any]: - ... - -@overload -def dstack(tup: Sequence[_ArrayLike[_SCT]]) -> NDArray[_SCT]: - ... - -@overload -def dstack(tup: Sequence[ArrayLike]) -> NDArray[Any]: - ... - -@overload -def array_split(ary: _ArrayLike[_SCT], indices_or_sections: _ShapeLike, axis: SupportsIndex = ...) -> list[NDArray[_SCT]]: - ... - -@overload -def array_split(ary: ArrayLike, indices_or_sections: _ShapeLike, axis: SupportsIndex = ...) -> list[NDArray[Any]]: - ... - -@overload -def split(ary: _ArrayLike[_SCT], indices_or_sections: _ShapeLike, axis: SupportsIndex = ...) -> list[NDArray[_SCT]]: - ... - -@overload -def split(ary: ArrayLike, indices_or_sections: _ShapeLike, axis: SupportsIndex = ...) -> list[NDArray[Any]]: - ... - -@overload -def hsplit(ary: _ArrayLike[_SCT], indices_or_sections: _ShapeLike) -> list[NDArray[_SCT]]: - ... - -@overload -def hsplit(ary: ArrayLike, indices_or_sections: _ShapeLike) -> list[NDArray[Any]]: - ... - -@overload -def vsplit(ary: _ArrayLike[_SCT], indices_or_sections: _ShapeLike) -> list[NDArray[_SCT]]: - ... - -@overload -def vsplit(ary: ArrayLike, indices_or_sections: _ShapeLike) -> list[NDArray[Any]]: - ... - -@overload -def dsplit(ary: _ArrayLike[_SCT], indices_or_sections: _ShapeLike) -> list[NDArray[_SCT]]: - ... - -@overload -def dsplit(ary: ArrayLike, indices_or_sections: _ShapeLike) -> list[NDArray[Any]]: - ... - -@overload -def get_array_prepare(*args: _SupportsArrayPrepare) -> _ArrayPrepare: - ... - -@overload -def get_array_prepare(*args: object) -> None | _ArrayPrepare: - ... - -@overload -def get_array_wrap(*args: _SupportsArrayWrap) -> _ArrayWrap: - ... - -@overload -def get_array_wrap(*args: object) -> None | _ArrayWrap: - ... - -@overload -def kron(a: _ArrayLikeBool_co, b: _ArrayLikeBool_co) -> NDArray[bool_]: - ... - -@overload -def kron(a: _ArrayLikeUInt_co, b: _ArrayLikeUInt_co) -> NDArray[unsignedinteger[Any]]: - ... - -@overload -def kron(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co) -> NDArray[signedinteger[Any]]: - ... - -@overload -def kron(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def kron(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def kron(a: _ArrayLikeObject_co, b: Any) -> NDArray[object_]: - ... - -@overload -def kron(a: Any, b: _ArrayLikeObject_co) -> NDArray[object_]: - ... - -@overload -def tile(A: _ArrayLike[_SCT], reps: int | Sequence[int]) -> NDArray[_SCT]: - ... - -@overload -def tile(A: ArrayLike, reps: int | Sequence[int]) -> NDArray[Any]: - ... - diff --git a/typings/numpy/lib/stride_tricks.pyi b/typings/numpy/lib/stride_tricks.pyi deleted file mode 100644 index 7d3fb1e..0000000 --- a/typings/numpy/lib/stride_tricks.pyi +++ /dev/null @@ -1,49 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Iterable -from typing import Any, SupportsIndex, TypeVar, overload -from numpy import generic -from numpy._typing import ArrayLike, NDArray, _ArrayLike, _Shape, _ShapeLike - -_SCT = TypeVar("_SCT", bound=generic) -__all__: list[str] -class DummyArray: - __array_interface__: dict[str, Any] - base: None | NDArray[Any] - def __init__(self, interface: dict[str, Any], base: None | NDArray[Any] = ...) -> None: - ... - - - -@overload -def as_strided(x: _ArrayLike[_SCT], shape: None | Iterable[int] = ..., strides: None | Iterable[int] = ..., subok: bool = ..., writeable: bool = ...) -> NDArray[_SCT]: - ... - -@overload -def as_strided(x: ArrayLike, shape: None | Iterable[int] = ..., strides: None | Iterable[int] = ..., subok: bool = ..., writeable: bool = ...) -> NDArray[Any]: - ... - -@overload -def sliding_window_view(x: _ArrayLike[_SCT], window_shape: int | Iterable[int], axis: None | SupportsIndex = ..., *, subok: bool = ..., writeable: bool = ...) -> NDArray[_SCT]: - ... - -@overload -def sliding_window_view(x: ArrayLike, window_shape: int | Iterable[int], axis: None | SupportsIndex = ..., *, subok: bool = ..., writeable: bool = ...) -> NDArray[Any]: - ... - -@overload -def broadcast_to(array: _ArrayLike[_SCT], shape: int | Iterable[int], subok: bool = ...) -> NDArray[_SCT]: - ... - -@overload -def broadcast_to(array: ArrayLike, shape: int | Iterable[int], subok: bool = ...) -> NDArray[Any]: - ... - -def broadcast_shapes(*args: _ShapeLike) -> _Shape: - ... - -def broadcast_arrays(*args: ArrayLike, subok: bool = ...) -> list[NDArray[Any]]: - ... - diff --git a/typings/numpy/lib/twodim_base.pyi b/typings/numpy/lib/twodim_base.pyi deleted file mode 100644 index 2a05513..0000000 --- a/typings/numpy/lib/twodim_base.pyi +++ /dev/null @@ -1,133 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable, Sequence -from typing import Any, TypeVar, Union, overload -from numpy import _OrderCF, bool_, complexfloating, datetime64, float64, floating, generic, int_, intp, number, object_, signedinteger, timedelta64 -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLike, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _DTypeLike, _SupportsArrayFunc - -_T = TypeVar("_T") -_SCT = TypeVar("_SCT", bound=generic) -_MaskFunc = Callable[[NDArray[int_], _T], NDArray[Union[number[Any], bool_, timedelta64, datetime64, object_]],] -__all__: list[str] -@overload -def fliplr(m: _ArrayLike[_SCT]) -> NDArray[_SCT]: - ... - -@overload -def fliplr(m: ArrayLike) -> NDArray[Any]: - ... - -@overload -def flipud(m: _ArrayLike[_SCT]) -> NDArray[_SCT]: - ... - -@overload -def flipud(m: ArrayLike) -> NDArray[Any]: - ... - -@overload -def eye(N: int, M: None | int = ..., k: int = ..., dtype: None = ..., order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def eye(N: int, M: None | int = ..., k: int = ..., dtype: _DTypeLike[_SCT] = ..., order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def eye(N: int, M: None | int = ..., k: int = ..., dtype: DTypeLike = ..., order: _OrderCF = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def diag(v: _ArrayLike[_SCT], k: int = ...) -> NDArray[_SCT]: - ... - -@overload -def diag(v: ArrayLike, k: int = ...) -> NDArray[Any]: - ... - -@overload -def diagflat(v: _ArrayLike[_SCT], k: int = ...) -> NDArray[_SCT]: - ... - -@overload -def diagflat(v: ArrayLike, k: int = ...) -> NDArray[Any]: - ... - -@overload -def tri(N: int, M: None | int = ..., k: int = ..., dtype: None = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[float64]: - ... - -@overload -def tri(N: int, M: None | int = ..., k: int = ..., dtype: _DTypeLike[_SCT] = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[_SCT]: - ... - -@overload -def tri(N: int, M: None | int = ..., k: int = ..., dtype: DTypeLike = ..., *, like: None | _SupportsArrayFunc = ...) -> NDArray[Any]: - ... - -@overload -def tril(v: _ArrayLike[_SCT], k: int = ...) -> NDArray[_SCT]: - ... - -@overload -def tril(v: ArrayLike, k: int = ...) -> NDArray[Any]: - ... - -@overload -def triu(v: _ArrayLike[_SCT], k: int = ...) -> NDArray[_SCT]: - ... - -@overload -def triu(v: ArrayLike, k: int = ...) -> NDArray[Any]: - ... - -@overload -def vander(x: _ArrayLikeInt_co, N: None | int = ..., increasing: bool = ...) -> NDArray[signedinteger[Any]]: - ... - -@overload -def vander(x: _ArrayLikeFloat_co, N: None | int = ..., increasing: bool = ...) -> NDArray[floating[Any]]: - ... - -@overload -def vander(x: _ArrayLikeComplex_co, N: None | int = ..., increasing: bool = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def vander(x: _ArrayLikeObject_co, N: None | int = ..., increasing: bool = ...) -> NDArray[object_]: - ... - -@overload -def histogram2d(x: _ArrayLikeFloat_co, y: _ArrayLikeFloat_co, bins: int | Sequence[int] = ..., range: None | _ArrayLikeFloat_co = ..., density: None | bool = ..., weights: None | _ArrayLikeFloat_co = ...) -> tuple[NDArray[float64], NDArray[floating[Any]], NDArray[floating[Any]],]: - ... - -@overload -def histogram2d(x: _ArrayLikeComplex_co, y: _ArrayLikeComplex_co, bins: int | Sequence[int] = ..., range: None | _ArrayLikeFloat_co = ..., density: None | bool = ..., weights: None | _ArrayLikeFloat_co = ...) -> tuple[NDArray[float64], NDArray[complexfloating[Any, Any]], NDArray[complexfloating[Any, Any]],]: - ... - -@overload -def histogram2d(x: _ArrayLikeComplex_co, y: _ArrayLikeComplex_co, bins: Sequence[_ArrayLikeInt_co], range: None | _ArrayLikeFloat_co = ..., density: None | bool = ..., weights: None | _ArrayLikeFloat_co = ...) -> tuple[NDArray[float64], NDArray[Any], NDArray[Any],]: - ... - -@overload -def mask_indices(n: int, mask_func: _MaskFunc[int], k: int = ...) -> tuple[NDArray[intp], NDArray[intp]]: - ... - -@overload -def mask_indices(n: int, mask_func: _MaskFunc[_T], k: _T) -> tuple[NDArray[intp], NDArray[intp]]: - ... - -def tril_indices(n: int, k: int = ..., m: None | int = ...) -> tuple[NDArray[int_], NDArray[int_]]: - ... - -def tril_indices_from(arr: NDArray[Any], k: int = ...) -> tuple[NDArray[int_], NDArray[int_]]: - ... - -def triu_indices(n: int, k: int = ..., m: None | int = ...) -> tuple[NDArray[int_], NDArray[int_]]: - ... - -def triu_indices_from(arr: NDArray[Any], k: int = ...) -> tuple[NDArray[int_], NDArray[int_]]: - ... - diff --git a/typings/numpy/lib/type_check.pyi b/typings/numpy/lib/type_check.pyi deleted file mode 100644 index 8d378e5..0000000 --- a/typings/numpy/lib/type_check.pyi +++ /dev/null @@ -1,218 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Container, Iterable -from typing import Any, Literal as L, Protocol, TypeVar, overload -from numpy import bool_, complexfloating, dtype, float64, floating, generic, integer -from numpy._typing import ArrayLike, DTypeLike, NBitBase, NDArray, _64Bit, _ArrayLike, _DTypeLikeComplex, _ScalarLike_co, _SupportsDType - -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) -_SCT = TypeVar("_SCT", bound=generic) -_NBit1 = TypeVar("_NBit1", bound=NBitBase) -_NBit2 = TypeVar("_NBit2", bound=NBitBase) -class _SupportsReal(Protocol[_T_co]): - @property - def real(self) -> _T_co: - ... - - - -class _SupportsImag(Protocol[_T_co]): - @property - def imag(self) -> _T_co: - ... - - - -__all__: list[str] -def mintypecode(typechars: Iterable[str | ArrayLike], typeset: Container[str] = ..., default: str = ...) -> str: - ... - -@overload -def asfarray(a: object, dtype: None | type[float] = ...) -> NDArray[float64]: - ... - -@overload -def asfarray(a: Any, dtype: _DTypeLikeComplex) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def asfarray(a: Any, dtype: DTypeLike) -> NDArray[floating[Any]]: - ... - -@overload -def real(val: _SupportsReal[_T]) -> _T: - ... - -@overload -def real(val: ArrayLike) -> NDArray[Any]: - ... - -@overload -def imag(val: _SupportsImag[_T]) -> _T: - ... - -@overload -def imag(val: ArrayLike) -> NDArray[Any]: - ... - -@overload -def iscomplex(x: _ScalarLike_co) -> bool_: - ... - -@overload -def iscomplex(x: ArrayLike) -> NDArray[bool_]: - ... - -@overload -def isreal(x: _ScalarLike_co) -> bool_: - ... - -@overload -def isreal(x: ArrayLike) -> NDArray[bool_]: - ... - -def iscomplexobj(x: _SupportsDType[dtype[Any]] | ArrayLike) -> bool: - ... - -def isrealobj(x: _SupportsDType[dtype[Any]] | ArrayLike) -> bool: - ... - -@overload -def nan_to_num(x: _SCT, copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ...) -> _SCT: - ... - -@overload -def nan_to_num(x: _ScalarLike_co, copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ...) -> Any: - ... - -@overload -def nan_to_num(x: _ArrayLike[_SCT], copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ...) -> NDArray[_SCT]: - ... - -@overload -def nan_to_num(x: ArrayLike, copy: bool = ..., nan: float = ..., posinf: None | float = ..., neginf: None | float = ...) -> NDArray[Any]: - ... - -@overload -def real_if_close(a: _ArrayLike[complexfloating[_NBit1, _NBit1]], tol: float = ...) -> NDArray[floating[_NBit1]] | NDArray[complexfloating[_NBit1, _NBit1]]: - ... - -@overload -def real_if_close(a: _ArrayLike[_SCT], tol: float = ...) -> NDArray[_SCT]: - ... - -@overload -def real_if_close(a: ArrayLike, tol: float = ...) -> NDArray[Any]: - ... - -@overload -def typename(char: L['S1']) -> L['character']: - ... - -@overload -def typename(char: L['?']) -> L['bool']: - ... - -@overload -def typename(char: L['b']) -> L['signed char']: - ... - -@overload -def typename(char: L['B']) -> L['unsigned char']: - ... - -@overload -def typename(char: L['h']) -> L['short']: - ... - -@overload -def typename(char: L['H']) -> L['unsigned short']: - ... - -@overload -def typename(char: L['i']) -> L['integer']: - ... - -@overload -def typename(char: L['I']) -> L['unsigned integer']: - ... - -@overload -def typename(char: L['l']) -> L['long integer']: - ... - -@overload -def typename(char: L['L']) -> L['unsigned long integer']: - ... - -@overload -def typename(char: L['q']) -> L['long long integer']: - ... - -@overload -def typename(char: L['Q']) -> L['unsigned long long integer']: - ... - -@overload -def typename(char: L['f']) -> L['single precision']: - ... - -@overload -def typename(char: L['d']) -> L['double precision']: - ... - -@overload -def typename(char: L['g']) -> L['long precision']: - ... - -@overload -def typename(char: L['F']) -> L['complex single precision']: - ... - -@overload -def typename(char: L['D']) -> L['complex double precision']: - ... - -@overload -def typename(char: L['G']) -> L['complex long double precision']: - ... - -@overload -def typename(char: L['S']) -> L['string']: - ... - -@overload -def typename(char: L['U']) -> L['unicode']: - ... - -@overload -def typename(char: L['V']) -> L['void']: - ... - -@overload -def typename(char: L['O']) -> L['object']: - ... - -@overload -def common_type(*arrays: _SupportsDType[dtype[integer[Any]]]) -> type[floating[_64Bit]]: - ... - -@overload -def common_type(*arrays: _SupportsDType[dtype[floating[_NBit1]]]) -> type[floating[_NBit1]]: - ... - -@overload -def common_type(*arrays: _SupportsDType[dtype[integer[Any] | floating[_NBit1]]]) -> type[floating[_NBit1 | _64Bit]]: - ... - -@overload -def common_type(*arrays: _SupportsDType[dtype[floating[_NBit1] | complexfloating[_NBit2, _NBit2]]]) -> type[complexfloating[_NBit1 | _NBit2, _NBit1 | _NBit2]]: - ... - -@overload -def common_type(*arrays: _SupportsDType[dtype[integer[Any] | floating[_NBit1] | complexfloating[_NBit2, _NBit2]]]) -> type[complexfloating[_64Bit | _NBit1 | _NBit2, _64Bit | _NBit1 | _NBit2]]: - ... - diff --git a/typings/numpy/lib/ufunclike.pyi b/typings/numpy/lib/ufunclike.pyi deleted file mode 100644 index 2a54fa1..0000000 --- a/typings/numpy/lib/ufunclike.pyi +++ /dev/null @@ -1,50 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, TypeVar, overload -from numpy import bool_, floating, ndarray, object_ -from numpy._typing import NDArray, _ArrayLikeFloat_co, _ArrayLikeObject_co, _FloatLike_co - -_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any]) -__all__: list[str] -@overload -def fix(x: _FloatLike_co, out: None = ...) -> floating[Any]: - ... - -@overload -def fix(x: _ArrayLikeFloat_co, out: None = ...) -> NDArray[floating[Any]]: - ... - -@overload -def fix(x: _ArrayLikeObject_co, out: None = ...) -> NDArray[object_]: - ... - -@overload -def fix(x: _ArrayLikeFloat_co | _ArrayLikeObject_co, out: _ArrayType) -> _ArrayType: - ... - -@overload -def isposinf(x: _FloatLike_co, out: None = ...) -> bool_: - ... - -@overload -def isposinf(x: _ArrayLikeFloat_co, out: None = ...) -> NDArray[bool_]: - ... - -@overload -def isposinf(x: _ArrayLikeFloat_co, out: _ArrayType) -> _ArrayType: - ... - -@overload -def isneginf(x: _FloatLike_co, out: None = ...) -> bool_: - ... - -@overload -def isneginf(x: _ArrayLikeFloat_co, out: None = ...) -> NDArray[bool_]: - ... - -@overload -def isneginf(x: _ArrayLikeFloat_co, out: _ArrayType) -> _ArrayType: - ... - diff --git a/typings/numpy/lib/utils.pyi b/typings/numpy/lib/utils.pyi deleted file mode 100644 index b558b86..0000000 --- a/typings/numpy/lib/utils.pyi +++ /dev/null @@ -1,65 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ast import AST -from collections.abc import Callable, Mapping, Sequence -from typing import Any, Protocol, TypeVar, overload -from numpy import generic, ndarray - -_T_contra = TypeVar("_T_contra", contravariant=True) -_FuncType = TypeVar("_FuncType", bound=Callable[..., Any]) -class _SupportsWrite(Protocol[_T_contra]): - def write(self, s: _T_contra, /) -> Any: - ... - - - -__all__: list[str] -class _Deprecate: - old_name: None | str - new_name: None | str - message: None | str - def __init__(self, old_name: None | str = ..., new_name: None | str = ..., message: None | str = ...) -> None: - ... - - def __call__(self, func: _FuncType) -> _FuncType: - ... - - - -def get_include() -> str: - ... - -@overload -def deprecate(*, old_name: None | str = ..., new_name: None | str = ..., message: None | str = ...) -> _Deprecate: - ... - -@overload -def deprecate(func: _FuncType, /, old_name: None | str = ..., new_name: None | str = ..., message: None | str = ...) -> _FuncType: - ... - -def deprecate_with_doc(msg: None | str) -> _Deprecate: - ... - -def byte_bounds(a: generic | ndarray[Any, Any]) -> tuple[int, int]: - ... - -def who(vardict: None | Mapping[str, ndarray[Any, Any]] = ...) -> None: - ... - -def info(object: object = ..., maxwidth: int = ..., output: None | _SupportsWrite[str] = ..., toplevel: str = ...) -> None: - ... - -def source(object: object, output: None | _SupportsWrite[str] = ...) -> None: - ... - -def lookfor(what: str, module: None | str | Sequence[str] = ..., import_modules: bool = ..., regenerate: bool = ..., output: None | _SupportsWrite[str] = ...) -> None: - ... - -def safe_eval(source: str | AST) -> Any: - ... - -def show_runtime() -> None: - ... - diff --git a/typings/numpy/linalg/__init__.pyi b/typings/numpy/linalg/__init__.pyi deleted file mode 100644 index 50b1446..0000000 --- a/typings/numpy/linalg/__init__.pyi +++ /dev/null @@ -1,14 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy.linalg.linalg import cholesky as cholesky, cond as cond, det as det, eig as eig, eigh as eigh, eigvals as eigvals, eigvalsh as eigvalsh, inv as inv, lstsq as lstsq, matrix_power as matrix_power, matrix_rank as matrix_rank, multi_dot as multi_dot, norm as norm, pinv as pinv, qr as qr, slogdet as slogdet, solve as solve, svd as svd, tensorinv as tensorinv, tensorsolve as tensorsolve -from numpy._pytesttester import PytestTester - -__all__: list[str] -__path__: list[str] -test: PytestTester -class LinAlgError(Exception): - ... - - diff --git a/typings/numpy/linalg/linalg.pyi b/typings/numpy/linalg/linalg.pyi deleted file mode 100644 index c786400..0000000 --- a/typings/numpy/linalg/linalg.pyi +++ /dev/null @@ -1,233 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Iterable -from typing import Any, Literal as L, NamedTuple, SupportsIndex, SupportsInt, TypeVar, overload -from numpy import complex128, complexfloating, float64, floating, generic, int32 -from numpy._typing import ArrayLike, NDArray, _ArrayLikeComplex_co, _ArrayLikeFloat_co, _ArrayLikeInt_co, _ArrayLikeObject_co, _ArrayLikeTD64_co - -_T = TypeVar("_T") -_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) -_SCT = TypeVar("_SCT", bound=generic, covariant=True) -_SCT2 = TypeVar("_SCT2", bound=generic, covariant=True) -_2Tuple = tuple[_T, _T] -_ModeKind = L["reduced", "complete", "r", "raw"] -__all__: list[str] -class EigResult(NamedTuple): - eigenvalues: NDArray[Any] - eigenvectors: NDArray[Any] - ... - - -class EighResult(NamedTuple): - eigenvalues: NDArray[Any] - eigenvectors: NDArray[Any] - ... - - -class QRResult(NamedTuple): - Q: NDArray[Any] - R: NDArray[Any] - ... - - -class SlogdetResult(NamedTuple): - sign: Any - logabsdet: Any - ... - - -class SVDResult(NamedTuple): - U: NDArray[Any] - S: NDArray[Any] - Vh: NDArray[Any] - ... - - -@overload -def tensorsolve(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, axes: None | Iterable[int] = ...) -> NDArray[float64]: - ... - -@overload -def tensorsolve(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, axes: None | Iterable[int] = ...) -> NDArray[floating[Any]]: - ... - -@overload -def tensorsolve(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, axes: None | Iterable[int] = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def solve(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co) -> NDArray[float64]: - ... - -@overload -def solve(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def solve(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def tensorinv(a: _ArrayLikeInt_co, ind: int = ...) -> NDArray[float64]: - ... - -@overload -def tensorinv(a: _ArrayLikeFloat_co, ind: int = ...) -> NDArray[floating[Any]]: - ... - -@overload -def tensorinv(a: _ArrayLikeComplex_co, ind: int = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def inv(a: _ArrayLikeInt_co) -> NDArray[float64]: - ... - -@overload -def inv(a: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def inv(a: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -def matrix_power(a: _ArrayLikeComplex_co | _ArrayLikeObject_co, n: SupportsIndex) -> NDArray[Any]: - ... - -@overload -def cholesky(a: _ArrayLikeInt_co) -> NDArray[float64]: - ... - -@overload -def cholesky(a: _ArrayLikeFloat_co) -> NDArray[floating[Any]]: - ... - -@overload -def cholesky(a: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def qr(a: _ArrayLikeInt_co, mode: _ModeKind = ...) -> QRResult: - ... - -@overload -def qr(a: _ArrayLikeFloat_co, mode: _ModeKind = ...) -> QRResult: - ... - -@overload -def qr(a: _ArrayLikeComplex_co, mode: _ModeKind = ...) -> QRResult: - ... - -@overload -def eigvals(a: _ArrayLikeInt_co) -> NDArray[float64] | NDArray[complex128]: - ... - -@overload -def eigvals(a: _ArrayLikeFloat_co) -> NDArray[floating[Any]] | NDArray[complexfloating[Any, Any]]: - ... - -@overload -def eigvals(a: _ArrayLikeComplex_co) -> NDArray[complexfloating[Any, Any]]: - ... - -@overload -def eigvalsh(a: _ArrayLikeInt_co, UPLO: L["L", "U", "l", "u"] = ...) -> NDArray[float64]: - ... - -@overload -def eigvalsh(a: _ArrayLikeComplex_co, UPLO: L["L", "U", "l", "u"] = ...) -> NDArray[floating[Any]]: - ... - -@overload -def eig(a: _ArrayLikeInt_co) -> EigResult: - ... - -@overload -def eig(a: _ArrayLikeFloat_co) -> EigResult: - ... - -@overload -def eig(a: _ArrayLikeComplex_co) -> EigResult: - ... - -@overload -def eigh(a: _ArrayLikeInt_co, UPLO: L["L", "U", "l", "u"] = ...) -> EighResult: - ... - -@overload -def eigh(a: _ArrayLikeFloat_co, UPLO: L["L", "U", "l", "u"] = ...) -> EighResult: - ... - -@overload -def eigh(a: _ArrayLikeComplex_co, UPLO: L["L", "U", "l", "u"] = ...) -> EighResult: - ... - -@overload -def svd(a: _ArrayLikeInt_co, full_matrices: bool = ..., compute_uv: L[True] = ..., hermitian: bool = ...) -> SVDResult: - ... - -@overload -def svd(a: _ArrayLikeFloat_co, full_matrices: bool = ..., compute_uv: L[True] = ..., hermitian: bool = ...) -> SVDResult: - ... - -@overload -def svd(a: _ArrayLikeComplex_co, full_matrices: bool = ..., compute_uv: L[True] = ..., hermitian: bool = ...) -> SVDResult: - ... - -@overload -def svd(a: _ArrayLikeInt_co, full_matrices: bool = ..., compute_uv: L[False] = ..., hermitian: bool = ...) -> NDArray[float64]: - ... - -@overload -def svd(a: _ArrayLikeComplex_co, full_matrices: bool = ..., compute_uv: L[False] = ..., hermitian: bool = ...) -> NDArray[floating[Any]]: - ... - -def cond(x: _ArrayLikeComplex_co, p: None | float | L["fro", "nuc"] = ...) -> Any: - ... - -def matrix_rank(A: _ArrayLikeComplex_co, tol: None | _ArrayLikeFloat_co = ..., hermitian: bool = ...) -> Any: - ... - -@overload -def pinv(a: _ArrayLikeInt_co, rcond: _ArrayLikeFloat_co = ..., hermitian: bool = ...) -> NDArray[float64]: - ... - -@overload -def pinv(a: _ArrayLikeFloat_co, rcond: _ArrayLikeFloat_co = ..., hermitian: bool = ...) -> NDArray[floating[Any]]: - ... - -@overload -def pinv(a: _ArrayLikeComplex_co, rcond: _ArrayLikeFloat_co = ..., hermitian: bool = ...) -> NDArray[complexfloating[Any, Any]]: - ... - -def slogdet(a: _ArrayLikeComplex_co) -> SlogdetResult: - ... - -def det(a: _ArrayLikeComplex_co) -> Any: - ... - -@overload -def lstsq(a: _ArrayLikeInt_co, b: _ArrayLikeInt_co, rcond: None | float = ...) -> tuple[NDArray[float64], NDArray[float64], int32, NDArray[float64],]: - ... - -@overload -def lstsq(a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, rcond: None | float = ...) -> tuple[NDArray[floating[Any]], NDArray[floating[Any]], int32, NDArray[floating[Any]],]: - ... - -@overload -def lstsq(a: _ArrayLikeComplex_co, b: _ArrayLikeComplex_co, rcond: None | float = ...) -> tuple[NDArray[complexfloating[Any, Any]], NDArray[floating[Any]], int32, NDArray[floating[Any]],]: - ... - -@overload -def norm(x: ArrayLike, ord: None | float | L["fro", "nuc"] = ..., axis: None = ..., keepdims: bool = ...) -> floating[Any]: - ... - -@overload -def norm(x: ArrayLike, ord: None | float | L["fro", "nuc"] = ..., axis: SupportsInt | SupportsIndex | tuple[int, ...] = ..., keepdims: bool = ...) -> Any: - ... - -def multi_dot(arrays: Iterable[_ArrayLikeComplex_co | _ArrayLikeObject_co | _ArrayLikeTD64_co], *, out: None | NDArray[Any] = ...) -> Any: - ... - diff --git a/typings/numpy/ma/__init__.pyi b/typings/numpy/ma/__init__.pyi deleted file mode 100644 index 52c2a4d..0000000 --- a/typings/numpy/ma/__init__.pyi +++ /dev/null @@ -1,12 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy._pytesttester import PytestTester -from numpy.ma import extras as extras -from numpy.ma.core import MAError as MAError, MaskError as MaskError, MaskType as MaskType, MaskedArray as MaskedArray, abs as abs, absolute as absolute, add as add, all as all, allclose as allclose, allequal as allequal, alltrue as alltrue, amax as amax, amin as amin, angle as angle, anom as anom, anomalies as anomalies, any as any, append as append, arange as arange, arccos as arccos, arccosh as arccosh, arcsin as arcsin, arcsinh as arcsinh, arctan as arctan, arctan2 as arctan2, arctanh as arctanh, argmax as argmax, argmin as argmin, argsort as argsort, around as around, array as array, asanyarray as asanyarray, asarray as asarray, bitwise_and as bitwise_and, bitwise_or as bitwise_or, bitwise_xor as bitwise_xor, bool_ as bool_, ceil as ceil, choose as choose, clip as clip, common_fill_value as common_fill_value, compress as compress, compressed as compressed, concatenate as concatenate, conjugate as conjugate, convolve as convolve, copy as copy, correlate as correlate, cos as cos, cosh as cosh, count as count, cumprod as cumprod, cumsum as cumsum, default_fill_value as default_fill_value, diag as diag, diagonal as diagonal, diff as diff, divide as divide, empty as empty, empty_like as empty_like, equal as equal, exp as exp, expand_dims as expand_dims, fabs as fabs, filled as filled, fix_invalid as fix_invalid, flatten_mask as flatten_mask, flatten_structured_array as flatten_structured_array, floor as floor, floor_divide as floor_divide, fmod as fmod, frombuffer as frombuffer, fromflex as fromflex, fromfunction as fromfunction, getdata as getdata, getmask as getmask, getmaskarray as getmaskarray, greater as greater, greater_equal as greater_equal, harden_mask as harden_mask, hypot as hypot, identity as identity, ids as ids, indices as indices, inner as inner, innerproduct as innerproduct, isMA as isMA, isMaskedArray as isMaskedArray, is_mask as is_mask, is_masked as is_masked, isarray as isarray, left_shift as left_shift, less as less, less_equal as less_equal, log as log, log10 as log10, log2 as log2, logical_and as logical_and, logical_not as logical_not, logical_or as logical_or, logical_xor as logical_xor, make_mask as make_mask, make_mask_descr as make_mask_descr, make_mask_none as make_mask_none, mask_or as mask_or, masked as masked, masked_array as masked_array, masked_equal as masked_equal, masked_greater as masked_greater, masked_greater_equal as masked_greater_equal, masked_inside as masked_inside, masked_invalid as masked_invalid, masked_less as masked_less, masked_less_equal as masked_less_equal, masked_not_equal as masked_not_equal, masked_object as masked_object, masked_outside as masked_outside, masked_print_option as masked_print_option, masked_singleton as masked_singleton, masked_values as masked_values, masked_where as masked_where, max as max, maximum as maximum, maximum_fill_value as maximum_fill_value, mean as mean, min as min, minimum as minimum, minimum_fill_value as minimum_fill_value, mod as mod, multiply as multiply, mvoid as mvoid, ndim as ndim, negative as negative, nomask as nomask, nonzero as nonzero, not_equal as not_equal, ones as ones, outer as outer, outerproduct as outerproduct, power as power, prod as prod, product as product, ptp as ptp, put as put, putmask as putmask, ravel as ravel, remainder as remainder, repeat as repeat, reshape as reshape, resize as resize, right_shift as right_shift, round as round, set_fill_value as set_fill_value, shape as shape, sin as sin, sinh as sinh, size as size, soften_mask as soften_mask, sometrue as sometrue, sort as sort, sqrt as sqrt, squeeze as squeeze, std as std, subtract as subtract, sum as sum, swapaxes as swapaxes, take as take, tan as tan, tanh as tanh, trace as trace, transpose as transpose, true_divide as true_divide, var as var, where as where, zeros as zeros -from numpy.ma.extras import apply_along_axis as apply_along_axis, apply_over_axes as apply_over_axes, atleast_1d as atleast_1d, atleast_2d as atleast_2d, atleast_3d as atleast_3d, average as average, clump_masked as clump_masked, clump_unmasked as clump_unmasked, column_stack as column_stack, compress_cols as compress_cols, compress_nd as compress_nd, compress_rowcols as compress_rowcols, compress_rows as compress_rows, corrcoef as corrcoef, count_masked as count_masked, cov as cov, diagflat as diagflat, dot as dot, dstack as dstack, ediff1d as ediff1d, flatnotmasked_contiguous as flatnotmasked_contiguous, flatnotmasked_edges as flatnotmasked_edges, hsplit as hsplit, hstack as hstack, in1d as in1d, intersect1d as intersect1d, isin as isin, mask_cols as mask_cols, mask_rowcols as mask_rowcols, mask_rows as mask_rows, masked_all as masked_all, masked_all_like as masked_all_like, median as median, mr_ as mr_, ndenumerate as ndenumerate, notmasked_contiguous as notmasked_contiguous, notmasked_edges as notmasked_edges, polyfit as polyfit, row_stack as row_stack, setdiff1d as setdiff1d, setxor1d as setxor1d, stack as stack, union1d as union1d, unique as unique, vander as vander, vstack as vstack - -__all__: list[str] -__path__: list[str] -test: PytestTester diff --git a/typings/numpy/ma/core.pyi b/typings/numpy/ma/core.pyi deleted file mode 100644 index a12e554..0000000 --- a/typings/numpy/ma/core.pyi +++ /dev/null @@ -1,853 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable -from typing import Any, TypeVar -from numpy import bool_ as bool_, dtype, float64, ndarray, squeeze as squeeze - -_ShapeType = TypeVar("_ShapeType", bound=Any) -_DType_co = TypeVar("_DType_co", bound=dtype[Any], covariant=True) -__all__: list[str] -MaskType = bool_ -nomask: bool_ -class MaskedArrayFutureWarning(FutureWarning): - ... - - -class MAError(Exception): - ... - - -class MaskError(MAError): - ... - - -def default_fill_value(obj): - ... - -def minimum_fill_value(obj): - ... - -def maximum_fill_value(obj): - ... - -def set_fill_value(a, fill_value): - ... - -def common_fill_value(a, b): - ... - -def filled(a, fill_value=...): - ... - -def getdata(a, subok=...): - ... - -get_data = ... -def fix_invalid(a, mask=..., copy=..., fill_value=...): - ... - -class _MaskedUFunc: - f: Any - __doc__: Any - __name__: Any - def __init__(self, ufunc) -> None: - ... - - - -class _MaskedUnaryOperation(_MaskedUFunc): - fill: Any - domain: Any - def __init__(self, mufunc, fill=..., domain=...) -> None: - ... - - def __call__(self, a, *args, **kwargs): - ... - - - -class _MaskedBinaryOperation(_MaskedUFunc): - fillx: Any - filly: Any - def __init__(self, mbfunc, fillx=..., filly=...) -> None: - ... - - def __call__(self, a, b, *args, **kwargs): - ... - - def reduce(self, target, axis=..., dtype=...): - ... - - def outer(self, a, b): - ... - - def accumulate(self, target, axis=...): - ... - - - -class _DomainedBinaryOperation(_MaskedUFunc): - domain: Any - fillx: Any - filly: Any - def __init__(self, dbfunc, domain, fillx=..., filly=...) -> None: - ... - - def __call__(self, a, b, *args, **kwargs): - ... - - - -exp: _MaskedUnaryOperation -conjugate: _MaskedUnaryOperation -sin: _MaskedUnaryOperation -cos: _MaskedUnaryOperation -arctan: _MaskedUnaryOperation -arcsinh: _MaskedUnaryOperation -sinh: _MaskedUnaryOperation -cosh: _MaskedUnaryOperation -tanh: _MaskedUnaryOperation -abs: _MaskedUnaryOperation -absolute: _MaskedUnaryOperation -fabs: _MaskedUnaryOperation -negative: _MaskedUnaryOperation -floor: _MaskedUnaryOperation -ceil: _MaskedUnaryOperation -around: _MaskedUnaryOperation -logical_not: _MaskedUnaryOperation -sqrt: _MaskedUnaryOperation -log: _MaskedUnaryOperation -log2: _MaskedUnaryOperation -log10: _MaskedUnaryOperation -tan: _MaskedUnaryOperation -arcsin: _MaskedUnaryOperation -arccos: _MaskedUnaryOperation -arccosh: _MaskedUnaryOperation -arctanh: _MaskedUnaryOperation -add: _MaskedBinaryOperation -subtract: _MaskedBinaryOperation -multiply: _MaskedBinaryOperation -arctan2: _MaskedBinaryOperation -equal: _MaskedBinaryOperation -not_equal: _MaskedBinaryOperation -less_equal: _MaskedBinaryOperation -greater_equal: _MaskedBinaryOperation -less: _MaskedBinaryOperation -greater: _MaskedBinaryOperation -logical_and: _MaskedBinaryOperation -alltrue: _MaskedBinaryOperation -logical_or: _MaskedBinaryOperation -sometrue: Callable[..., Any] -logical_xor: _MaskedBinaryOperation -bitwise_and: _MaskedBinaryOperation -bitwise_or: _MaskedBinaryOperation -bitwise_xor: _MaskedBinaryOperation -hypot: _MaskedBinaryOperation -divide: _MaskedBinaryOperation -true_divide: _MaskedBinaryOperation -floor_divide: _MaskedBinaryOperation -remainder: _MaskedBinaryOperation -fmod: _MaskedBinaryOperation -mod: _MaskedBinaryOperation -def make_mask_descr(ndtype): - ... - -def getmask(a): - ... - -get_mask = ... -def getmaskarray(arr): - ... - -def is_mask(m): - ... - -def make_mask(m, copy=..., shrink=..., dtype=...): - ... - -def make_mask_none(newshape, dtype=...): - ... - -def mask_or(m1, m2, copy=..., shrink=...): - ... - -def flatten_mask(mask): - ... - -def masked_where(condition, a, copy=...): - ... - -def masked_greater(x, value, copy=...): - ... - -def masked_greater_equal(x, value, copy=...): - ... - -def masked_less(x, value, copy=...): - ... - -def masked_less_equal(x, value, copy=...): - ... - -def masked_not_equal(x, value, copy=...): - ... - -def masked_equal(x, value, copy=...): - ... - -def masked_inside(x, v1, v2, copy=...): - ... - -def masked_outside(x, v1, v2, copy=...): - ... - -def masked_object(x, value, copy=..., shrink=...): - ... - -def masked_values(x, value, rtol=..., atol=..., copy=..., shrink=...): - ... - -def masked_invalid(a, copy=...): - ... - -class _MaskedPrintOption: - def __init__(self, display) -> None: - ... - - def display(self): - ... - - def set_display(self, s): - ... - - def enabled(self): - ... - - def enable(self, shrink=...): - ... - - - -masked_print_option: _MaskedPrintOption -def flatten_structured_array(a): - ... - -class MaskedIterator: - ma: Any - dataiter: Any - maskiter: Any - def __init__(self, ma) -> None: - ... - - def __iter__(self): - ... - - def __getitem__(self, indx): - ... - - def __setitem__(self, index, value): - ... - - def __next__(self): - ... - - - -class MaskedArray(ndarray[_ShapeType, _DType_co]): - __array_priority__: Any - def __new__(cls, data=..., mask=..., dtype=..., copy=..., subok=..., ndmin=..., fill_value=..., keep_mask=..., hard_mask=..., shrink=..., order=...): - ... - - def __array_finalize__(self, obj): - ... - - def __array_wrap__(self, obj, context=...): - ... - - def view(self, dtype=..., type=..., fill_value=...): - ... - - def __getitem__(self, indx): - ... - - def __setitem__(self, indx, value): - ... - - @property - def dtype(self): - ... - - @dtype.setter - def dtype(self, dtype): - ... - - @property - def shape(self): - ... - - @shape.setter - def shape(self, shape): - ... - - def __setmask__(self, mask, copy=...): - ... - - @property - def mask(self): - ... - - @mask.setter - def mask(self, value): - ... - - @property - def recordmask(self): - ... - - @recordmask.setter - def recordmask(self, mask): - ... - - def harden_mask(self): - ... - - def soften_mask(self): - ... - - @property - def hardmask(self): - ... - - def unshare_mask(self): - ... - - @property - def sharedmask(self): - ... - - def shrink_mask(self): - ... - - @property - def baseclass(self): - ... - - data: Any - @property - def flat(self): - ... - - @flat.setter - def flat(self, value): - ... - - @property - def fill_value(self): - ... - - @fill_value.setter - def fill_value(self, value=...): - ... - - get_fill_value: Any - set_fill_value: Any - def filled(self, fill_value=...): - ... - - def compressed(self): - ... - - def compress(self, condition, axis=..., out=...): - ... - - def __eq__(self, other) -> bool: - ... - - def __ne__(self, other) -> bool: - ... - - def __ge__(self, other) -> bool: - ... - - def __gt__(self, other) -> bool: - ... - - def __le__(self, other) -> bool: - ... - - def __lt__(self, other) -> bool: - ... - - def __add__(self, other): - ... - - def __radd__(self, other): - ... - - def __sub__(self, other): - ... - - def __rsub__(self, other): - ... - - def __mul__(self, other): - ... - - def __rmul__(self, other): - ... - - def __div__(self, other): - ... - - def __truediv__(self, other): - ... - - def __rtruediv__(self, other): - ... - - def __floordiv__(self, other): - ... - - def __rfloordiv__(self, other): - ... - - def __pow__(self, other): - ... - - def __rpow__(self, other): - ... - - def __iadd__(self, other): - ... - - def __isub__(self, other): - ... - - def __imul__(self, other): - ... - - def __idiv__(self, other): - ... - - def __ifloordiv__(self, other): - ... - - def __itruediv__(self, other): - ... - - def __ipow__(self, other): - ... - - def __float__(self): - ... - - def __int__(self) -> int: - ... - - @property - def imag(self): - ... - - get_imag: Any - @property - def real(self): - ... - - get_real: Any - def count(self, axis=..., keepdims=...): - ... - - def ravel(self, order=...): - ... - - def reshape(self, *s, **kwargs): - ... - - def resize(self, newshape, refcheck=..., order=...): - ... - - def put(self, indices, values, mode=...): - ... - - def ids(self): - ... - - def iscontiguous(self): - ... - - def all(self, axis=..., out=..., keepdims=...): - ... - - def any(self, axis=..., out=..., keepdims=...): - ... - - def nonzero(self): - ... - - def trace(self, offset=..., axis1=..., axis2=..., dtype=..., out=...): - ... - - def dot(self, b, out=..., strict=...): - ... - - def sum(self, axis=..., dtype=..., out=..., keepdims=...): - ... - - def cumsum(self, axis=..., dtype=..., out=...): - ... - - def prod(self, axis=..., dtype=..., out=..., keepdims=...): - ... - - product: Any - def cumprod(self, axis=..., dtype=..., out=...): - ... - - def mean(self, axis=..., dtype=..., out=..., keepdims=...): - ... - - def anom(self, axis=..., dtype=...): - ... - - def var(self, axis=..., dtype=..., out=..., ddof=..., keepdims=...): - ... - - def std(self, axis=..., dtype=..., out=..., ddof=..., keepdims=...): - ... - - def round(self, decimals=..., out=...): - ... - - def argsort(self, axis=..., kind=..., order=..., endwith=..., fill_value=...): - ... - - def argmin(self, axis=..., fill_value=..., out=..., *, keepdims=...): - ... - - def argmax(self, axis=..., fill_value=..., out=..., *, keepdims=...): - ... - - def sort(self, axis=..., kind=..., order=..., endwith=..., fill_value=...): - ... - - def min(self, axis=..., out=..., fill_value=..., keepdims=...): - ... - - def max(self, axis=..., out=..., fill_value=..., keepdims=...): - ... - - def ptp(self, axis=..., out=..., fill_value=..., keepdims=...): - ... - - def partition(self, *args, **kwargs): - ... - - def argpartition(self, *args, **kwargs): - ... - - def take(self, indices, axis=..., out=..., mode=...): - ... - - copy: Any - diagonal: Any - flatten: Any - repeat: Any - squeeze: Any - swapaxes: Any - T: Any - transpose: Any - def tolist(self, fill_value=...): - ... - - def tobytes(self, fill_value=..., order=...): - ... - - def tofile(self, fid, sep=..., format=...): - ... - - def toflex(self): - ... - - torecords: Any - def __reduce__(self): - ... - - def __deepcopy__(self, memo=...): - ... - - - -class mvoid(MaskedArray[_ShapeType, _DType_co]): - def __new__(self, data, mask=..., dtype=..., fill_value=..., hardmask=..., copy=..., subok=...): - ... - - def __getitem__(self, indx): - ... - - def __setitem__(self, indx, value): - ... - - def __iter__(self): - ... - - def __len__(self): - ... - - def filled(self, fill_value=...): - ... - - def tolist(self): - ... - - - -def isMaskedArray(x): - ... - -isarray = ... -isMA = ... -class MaskedConstant(MaskedArray[Any, dtype[float64]]): - def __new__(cls): - ... - - __class__: Any - def __array_finalize__(self, obj): - ... - - def __array_prepare__(self, obj, context=...): - ... - - def __array_wrap__(self, obj, context=...): - ... - - def __format__(self, format_spec): - ... - - def __reduce__(self): - ... - - def __iop__(self, other): - ... - - __iadd__: Any - __isub__: Any - __imul__: Any - __ifloordiv__: Any - __itruediv__: Any - __ipow__: Any - def copy(self, *args, **kwargs): - ... - - def __copy__(self): - ... - - def __deepcopy__(self, memo): - ... - - def __setattr__(self, attr, value): - ... - - - -masked: MaskedConstant -masked_singleton: MaskedConstant -masked_array = MaskedArray -def array(data, dtype=..., copy=..., order=..., mask=..., fill_value=..., keep_mask=..., hard_mask=..., shrink=..., subok=..., ndmin=...): - ... - -def is_masked(x): - ... - -class _extrema_operation(_MaskedUFunc): - compare: Any - fill_value_func: Any - def __init__(self, ufunc, compare, fill_value) -> None: - ... - - def __call__(self, a, b): - ... - - def reduce(self, target, axis=...): - ... - - def outer(self, a, b): - ... - - - -def min(obj, axis=..., out=..., fill_value=..., keepdims=...): - ... - -def max(obj, axis=..., out=..., fill_value=..., keepdims=...): - ... - -def ptp(obj, axis=..., out=..., fill_value=..., keepdims=...): - ... - -class _frommethod: - __name__: Any - __doc__: Any - reversed: Any - def __init__(self, methodname, reversed=...) -> None: - ... - - def getdoc(self): - ... - - def __call__(self, a, *args, **params): - ... - - - -all: _frommethod -anomalies: _frommethod -anom: _frommethod -any: _frommethod -compress: _frommethod -cumprod: _frommethod -cumsum: _frommethod -copy: _frommethod -diagonal: _frommethod -harden_mask: _frommethod -ids: _frommethod -mean: _frommethod -nonzero: _frommethod -prod: _frommethod -product: _frommethod -ravel: _frommethod -repeat: _frommethod -soften_mask: _frommethod -std: _frommethod -sum: _frommethod -swapaxes: _frommethod -trace: _frommethod -var: _frommethod -count: _frommethod -argmin: _frommethod -argmax: _frommethod -minimum: _extrema_operation -maximum: _extrema_operation -def take(a, indices, axis=..., out=..., mode=...): - ... - -def power(a, b, third=...): - ... - -def argsort(a, axis=..., kind=..., order=..., endwith=..., fill_value=...): - ... - -def sort(a, axis=..., kind=..., order=..., endwith=..., fill_value=...): - ... - -def compressed(x): - ... - -def concatenate(arrays, axis=...): - ... - -def diag(v, k=...): - ... - -def left_shift(a, n): - ... - -def right_shift(a, n): - ... - -def put(a, indices, values, mode=...): - ... - -def putmask(a, mask, values): - ... - -def transpose(a, axes=...): - ... - -def reshape(a, new_shape, order=...): - ... - -def resize(x, new_shape): - ... - -def ndim(obj): - ... - -def shape(obj): - ... - -def size(obj, axis=...): - ... - -def diff(a, /, n=..., axis=..., prepend=..., append=...): - ... - -def where(condition, x=..., y=...): - ... - -def choose(indices, choices, out=..., mode=...): - ... - -def round(a, decimals=..., out=...): - ... - -def inner(a, b): - ... - -innerproduct = ... -def outer(a, b): - ... - -outerproduct = ... -def correlate(a, v, mode=..., propagate_mask=...): - ... - -def convolve(a, v, mode=..., propagate_mask=...): - ... - -def allequal(a, b, fill_value=...): - ... - -def allclose(a, b, masked_equal=..., rtol=..., atol=...): - ... - -def asarray(a, dtype=..., order=...): - ... - -def asanyarray(a, dtype=...): - ... - -def fromflex(fxarray): - ... - -class _convert2ma: - __doc__: Any - def __init__(self, funcname, params=...) -> None: - ... - - def getdoc(self): - ... - - def __call__(self, *args, **params): - ... - - - -arange: _convert2ma -empty: _convert2ma -empty_like: _convert2ma -frombuffer: _convert2ma -fromfunction: _convert2ma -identity: _convert2ma -ones: _convert2ma -zeros: _convert2ma -def append(a, b, axis=...): - ... - -def dot(a, b, strict=..., out=...): - ... - -def mask_rowcols(a, axis=...): - ... - diff --git a/typings/numpy/ma/extras.pyi b/typings/numpy/ma/extras.pyi deleted file mode 100644 index 86931ff..0000000 --- a/typings/numpy/ma/extras.pyi +++ /dev/null @@ -1,165 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any -from numpy.lib.index_tricks import AxisConcatenator - -__all__: list[str] -def count_masked(arr, axis=...): - ... - -def masked_all(shape, dtype=...): - ... - -def masked_all_like(arr): - ... - -class _fromnxfunction: - __name__: Any - __doc__: Any - def __init__(self, funcname) -> None: - ... - - def getdoc(self): - ... - - def __call__(self, *args, **params): - ... - - - -class _fromnxfunction_single(_fromnxfunction): - def __call__(self, x, *args, **params): - ... - - - -class _fromnxfunction_seq(_fromnxfunction): - def __call__(self, x, *args, **params): - ... - - - -class _fromnxfunction_allargs(_fromnxfunction): - def __call__(self, *args, **params): - ... - - - -atleast_1d: _fromnxfunction_allargs -atleast_2d: _fromnxfunction_allargs -atleast_3d: _fromnxfunction_allargs -vstack: _fromnxfunction_seq -row_stack: _fromnxfunction_seq -hstack: _fromnxfunction_seq -column_stack: _fromnxfunction_seq -dstack: _fromnxfunction_seq -stack: _fromnxfunction_seq -hsplit: _fromnxfunction_single -diagflat: _fromnxfunction_single -def apply_along_axis(func1d, axis, arr, *args, **kwargs): - ... - -def apply_over_axes(func, a, axes): - ... - -def average(a, axis=..., weights=..., returned=..., keepdims=...): - ... - -def median(a, axis=..., out=..., overwrite_input=..., keepdims=...): - ... - -def compress_nd(x, axis=...): - ... - -def compress_rowcols(x, axis=...): - ... - -def compress_rows(a): - ... - -def compress_cols(a): - ... - -def mask_rows(a, axis=...): - ... - -def mask_cols(a, axis=...): - ... - -def ediff1d(arr, to_end=..., to_begin=...): - ... - -def unique(ar1, return_index=..., return_inverse=...): - ... - -def intersect1d(ar1, ar2, assume_unique=...): - ... - -def setxor1d(ar1, ar2, assume_unique=...): - ... - -def in1d(ar1, ar2, assume_unique=..., invert=...): - ... - -def isin(element, test_elements, assume_unique=..., invert=...): - ... - -def union1d(ar1, ar2): - ... - -def setdiff1d(ar1, ar2, assume_unique=...): - ... - -def cov(x, y=..., rowvar=..., bias=..., allow_masked=..., ddof=...): - ... - -def corrcoef(x, y=..., rowvar=..., bias=..., allow_masked=..., ddof=...): - ... - -class MAxisConcatenator(AxisConcatenator): - concatenate: Any - @classmethod - def makemat(cls, arr): - ... - - def __getitem__(self, key): - ... - - - -class mr_class(MAxisConcatenator): - def __init__(self) -> None: - ... - - - -mr_: mr_class -def ndenumerate(a, compressed=...): - ... - -def flatnotmasked_edges(a): - ... - -def notmasked_edges(a, axis=...): - ... - -def flatnotmasked_contiguous(a): - ... - -def notmasked_contiguous(a, axis=...): - ... - -def clump_unmasked(a): - ... - -def clump_masked(a): - ... - -def vander(x, n=...): - ... - -def polyfit(x, y, deg, rcond=..., full=..., w=..., cov=...): - ... - diff --git a/typings/numpy/ma/mrecords.pyi b/typings/numpy/ma/mrecords.pyi deleted file mode 100644 index 5b41e25..0000000 --- a/typings/numpy/ma/mrecords.pyi +++ /dev/null @@ -1,68 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, TypeVar -from numpy import dtype -from numpy.ma import MaskedArray - -__all__: list[str] -_ShapeType = TypeVar("_ShapeType", bound=Any) -_DType_co = TypeVar("_DType_co", bound=dtype[Any], covariant=True) -class MaskedRecords(MaskedArray[_ShapeType, _DType_co]): - def __new__(cls, shape, dtype=..., buf=..., offset=..., strides=..., formats=..., names=..., titles=..., byteorder=..., aligned=..., mask=..., hard_mask=..., fill_value=..., keep_mask=..., copy=..., **options): - ... - - _mask: Any - _fill_value: Any - def __array_finalize__(self, obj): - ... - - def __len__(self): - ... - - def __getattribute__(self, attr): - ... - - def __setattr__(self, attr, val): - ... - - def __getitem__(self, indx): - ... - - def __setitem__(self, indx, value): - ... - - def view(self, dtype=..., type=...): - ... - - def harden_mask(self): - ... - - def soften_mask(self): - ... - - def copy(self): - ... - - def tolist(self, fill_value=...): - ... - - def __reduce__(self): - ... - - - -mrecarray = MaskedRecords -def fromarrays(arraylist, dtype=..., shape=..., formats=..., names=..., titles=..., aligned=..., byteorder=..., fill_value=...): - ... - -def fromrecords(reclist, dtype=..., shape=..., formats=..., names=..., titles=..., aligned=..., byteorder=..., fill_value=..., mask=...): - ... - -def fromtextfile(fname, delimiter=..., commentchar=..., missingchar=..., varnames=..., vartypes=...): - ... - -def addfield(mrecord, newfield, newfieldname=...): - ... - diff --git a/typings/numpy/matlib.pyi b/typings/numpy/matlib.pyi deleted file mode 100644 index 5916be5..0000000 --- a/typings/numpy/matlib.pyi +++ /dev/null @@ -1,344 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import numpy as np -from numpy import * - -__version__ = ... -__all__ = np.__all__[:] -__all__ += ['rand', 'randn', 'repmat'] -def empty(shape, dtype=..., order=...): # -> matrix[Unknown, Unknown]: - """Return a new matrix of given shape and type, without initializing entries. - - Parameters - ---------- - shape : int or tuple of int - Shape of the empty matrix. - dtype : data-type, optional - Desired output data-type. - order : {'C', 'F'}, optional - Whether to store multi-dimensional data in row-major - (C-style) or column-major (Fortran-style) order in - memory. - - See Also - -------- - empty_like, zeros - - Notes - ----- - `empty`, unlike `zeros`, does not set the matrix values to zero, - and may therefore be marginally faster. On the other hand, it requires - the user to manually set all the values in the array, and should be - used with caution. - - Examples - -------- - >>> import numpy.matlib - >>> np.matlib.empty((2, 2)) # filled with random data - matrix([[ 6.76425276e-320, 9.79033856e-307], # random - [ 7.39337286e-309, 3.22135945e-309]]) - >>> np.matlib.empty((2, 2), dtype=int) - matrix([[ 6600475, 0], # random - [ 6586976, 22740995]]) - - """ - ... - -def ones(shape, dtype=..., order=...): # -> matrix[Unknown, Unknown]: - """ - Matrix of ones. - - Return a matrix of given shape and type, filled with ones. - - Parameters - ---------- - shape : {sequence of ints, int} - Shape of the matrix - dtype : data-type, optional - The desired data-type for the matrix, default is np.float64. - order : {'C', 'F'}, optional - Whether to store matrix in C- or Fortran-contiguous order, - default is 'C'. - - Returns - ------- - out : matrix - Matrix of ones of given shape, dtype, and order. - - See Also - -------- - ones : Array of ones. - matlib.zeros : Zero matrix. - - Notes - ----- - If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``, - `out` becomes a single row matrix of shape ``(1,N)``. - - Examples - -------- - >>> np.matlib.ones((2,3)) - matrix([[1., 1., 1.], - [1., 1., 1.]]) - - >>> np.matlib.ones(2) - matrix([[1., 1.]]) - - """ - ... - -def zeros(shape, dtype=..., order=...): # -> matrix[Unknown, Unknown]: - """ - Return a matrix of given shape and type, filled with zeros. - - Parameters - ---------- - shape : int or sequence of ints - Shape of the matrix - dtype : data-type, optional - The desired data-type for the matrix, default is float. - order : {'C', 'F'}, optional - Whether to store the result in C- or Fortran-contiguous order, - default is 'C'. - - Returns - ------- - out : matrix - Zero matrix of given shape, dtype, and order. - - See Also - -------- - numpy.zeros : Equivalent array function. - matlib.ones : Return a matrix of ones. - - Notes - ----- - If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``, - `out` becomes a single row matrix of shape ``(1,N)``. - - Examples - -------- - >>> import numpy.matlib - >>> np.matlib.zeros((2, 3)) - matrix([[0., 0., 0.], - [0., 0., 0.]]) - - >>> np.matlib.zeros(2) - matrix([[0., 0.]]) - - """ - ... - -def identity(n, dtype=...): # -> matrix[Unknown, Unknown]: - """ - Returns the square identity matrix of given size. - - Parameters - ---------- - n : int - Size of the returned identity matrix. - dtype : data-type, optional - Data-type of the output. Defaults to ``float``. - - Returns - ------- - out : matrix - `n` x `n` matrix with its main diagonal set to one, - and all other elements zero. - - See Also - -------- - numpy.identity : Equivalent array function. - matlib.eye : More general matrix identity function. - - Examples - -------- - >>> import numpy.matlib - >>> np.matlib.identity(3, dtype=int) - matrix([[1, 0, 0], - [0, 1, 0], - [0, 0, 1]]) - - """ - ... - -def eye(n, M=..., k=..., dtype=..., order=...): # -> matrix[Any, Any]: - """ - Return a matrix with ones on the diagonal and zeros elsewhere. - - Parameters - ---------- - n : int - Number of rows in the output. - M : int, optional - Number of columns in the output, defaults to `n`. - k : int, optional - Index of the diagonal: 0 refers to the main diagonal, - a positive value refers to an upper diagonal, - and a negative value to a lower diagonal. - dtype : dtype, optional - Data-type of the returned matrix. - order : {'C', 'F'}, optional - Whether the output should be stored in row-major (C-style) or - column-major (Fortran-style) order in memory. - - .. versionadded:: 1.14.0 - - Returns - ------- - I : matrix - A `n` x `M` matrix where all elements are equal to zero, - except for the `k`-th diagonal, whose values are equal to one. - - See Also - -------- - numpy.eye : Equivalent array function. - identity : Square identity matrix. - - Examples - -------- - >>> import numpy.matlib - >>> np.matlib.eye(3, k=1, dtype=float) - matrix([[0., 1., 0.], - [0., 0., 1.], - [0., 0., 0.]]) - - """ - ... - -def rand(*args): # -> matrix[Any, Any]: - """ - Return a matrix of random values with given shape. - - Create a matrix of the given shape and propagate it with - random samples from a uniform distribution over ``[0, 1)``. - - Parameters - ---------- - \\*args : Arguments - Shape of the output. - If given as N integers, each integer specifies the size of one - dimension. - If given as a tuple, this tuple gives the complete shape. - - Returns - ------- - out : ndarray - The matrix of random values with shape given by `\\*args`. - - See Also - -------- - randn, numpy.random.RandomState.rand - - Examples - -------- - >>> np.random.seed(123) - >>> import numpy.matlib - >>> np.matlib.rand(2, 3) - matrix([[0.69646919, 0.28613933, 0.22685145], - [0.55131477, 0.71946897, 0.42310646]]) - >>> np.matlib.rand((2, 3)) - matrix([[0.9807642 , 0.68482974, 0.4809319 ], - [0.39211752, 0.34317802, 0.72904971]]) - - If the first argument is a tuple, other arguments are ignored: - - >>> np.matlib.rand((2, 3), 4) - matrix([[0.43857224, 0.0596779 , 0.39804426], - [0.73799541, 0.18249173, 0.17545176]]) - - """ - ... - -def randn(*args): # -> matrix[Any, Any]: - """ - Return a random matrix with data from the "standard normal" distribution. - - `randn` generates a matrix filled with random floats sampled from a - univariate "normal" (Gaussian) distribution of mean 0 and variance 1. - - Parameters - ---------- - \\*args : Arguments - Shape of the output. - If given as N integers, each integer specifies the size of one - dimension. If given as a tuple, this tuple gives the complete shape. - - Returns - ------- - Z : matrix of floats - A matrix of floating-point samples drawn from the standard normal - distribution. - - See Also - -------- - rand, numpy.random.RandomState.randn - - Notes - ----- - For random samples from the normal distribution with mean ``mu`` and - standard deviation ``sigma``, use:: - - sigma * np.matlib.randn(...) + mu - - Examples - -------- - >>> np.random.seed(123) - >>> import numpy.matlib - >>> np.matlib.randn(1) - matrix([[-1.0856306]]) - >>> np.matlib.randn(1, 2, 3) - matrix([[ 0.99734545, 0.2829785 , -1.50629471], - [-0.57860025, 1.65143654, -2.42667924]]) - - Two-by-four matrix of samples from the normal distribution with - mean 3 and standard deviation 2.5: - - >>> 2.5 * np.matlib.randn((2, 4)) + 3 - matrix([[1.92771843, 6.16484065, 0.83314899, 1.30278462], - [2.76322758, 6.72847407, 1.40274501, 1.8900451 ]]) - - """ - ... - -def repmat(a, m, n): - """ - Repeat a 0-D to 2-D array or matrix MxN times. - - Parameters - ---------- - a : array_like - The array or matrix to be repeated. - m, n : int - The number of times `a` is repeated along the first and second axes. - - Returns - ------- - out : ndarray - The result of repeating `a`. - - Examples - -------- - >>> import numpy.matlib - >>> a0 = np.array(1) - >>> np.matlib.repmat(a0, 2, 3) - array([[1, 1, 1], - [1, 1, 1]]) - - >>> a1 = np.arange(4) - >>> np.matlib.repmat(a1, 2, 2) - array([[0, 1, 2, 3, 0, 1, 2, 3], - [0, 1, 2, 3, 0, 1, 2, 3]]) - - >>> a2 = np.asmatrix(np.arange(6).reshape(2, 3)) - >>> np.matlib.repmat(a2, 2, 3) - matrix([[0, 1, 2, 0, 1, 2, 0, 1, 2], - [3, 4, 5, 3, 4, 5, 3, 4, 5], - [0, 1, 2, 0, 1, 2, 0, 1, 2], - [3, 4, 5, 3, 4, 5, 3, 4, 5]]) - - """ - ... - diff --git a/typings/numpy/matrixlib/__init__.pyi b/typings/numpy/matrixlib/__init__.pyi deleted file mode 100644 index b0a23bf..0000000 --- a/typings/numpy/matrixlib/__init__.pyi +++ /dev/null @@ -1,11 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy._pytesttester import PytestTester -from numpy import matrix as matrix -from numpy.matrixlib.defmatrix import asmatrix as asmatrix, bmat as bmat, mat as mat - -__all__: list[str] -__path__: list[str] -test: PytestTester diff --git a/typings/numpy/matrixlib/defmatrix.pyi b/typings/numpy/matrixlib/defmatrix.pyi deleted file mode 100644 index da0cb4e..0000000 --- a/typings/numpy/matrixlib/defmatrix.pyi +++ /dev/null @@ -1,17 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Mapping, Sequence -from typing import Any -from numpy import matrix as matrix -from numpy._typing import ArrayLike, DTypeLike, NDArray - -__all__: list[str] -def bmat(obj: str | Sequence[ArrayLike] | NDArray[Any], ldict: None | Mapping[str, Any] = ..., gdict: None | Mapping[str, Any] = ...) -> matrix[Any, Any]: - ... - -def asmatrix(data: ArrayLike, dtype: DTypeLike = ...) -> matrix[Any, Any]: - ... - -mat = ... diff --git a/typings/numpy/polynomial/__init__.pyi b/typings/numpy/polynomial/__init__.pyi deleted file mode 100644 index f996860..0000000 --- a/typings/numpy/polynomial/__init__.pyi +++ /dev/null @@ -1,19 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy._pytesttester import PytestTester -from numpy.polynomial import chebyshev as chebyshev, hermite as hermite, hermite_e as hermite_e, laguerre as laguerre, legendre as legendre, polynomial as polynomial -from numpy.polynomial.chebyshev import Chebyshev as Chebyshev -from numpy.polynomial.hermite import Hermite as Hermite -from numpy.polynomial.hermite_e import HermiteE as HermiteE -from numpy.polynomial.laguerre import Laguerre as Laguerre -from numpy.polynomial.legendre import Legendre as Legendre -from numpy.polynomial.polynomial import Polynomial as Polynomial - -__all__: list[str] -__path__: list[str] -test: PytestTester -def set_default_printstyle(style): - ... - diff --git a/typings/numpy/polynomial/_polybase.pyi b/typings/numpy/polynomial/_polybase.pyi deleted file mode 100644 index 8be9d3e..0000000 --- a/typings/numpy/polynomial/_polybase.pyi +++ /dev/null @@ -1,174 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import abc -from typing import Any, ClassVar - -__all__: list[str] -class ABCPolyBase(abc.ABC): - __hash__: ClassVar[None] - __array_ufunc__: ClassVar[None] - maxpower: ClassVar[int] - coef: Any - @property - def symbol(self) -> str: - ... - - @property - @abc.abstractmethod - def domain(self): - ... - - @property - @abc.abstractmethod - def window(self): - ... - - @property - @abc.abstractmethod - def basis_name(self): - ... - - def has_samecoef(self, other): - ... - - def has_samedomain(self, other): - ... - - def has_samewindow(self, other): - ... - - def has_sametype(self, other): - ... - - def __init__(self, coef, domain=..., window=..., symbol: str = ...) -> None: - ... - - def __format__(self, fmt_str): - ... - - def __call__(self, arg): - ... - - def __iter__(self): - ... - - def __len__(self): - ... - - def __neg__(self): - ... - - def __pos__(self): - ... - - def __add__(self, other): - ... - - def __sub__(self, other): - ... - - def __mul__(self, other): - ... - - def __truediv__(self, other): - ... - - def __floordiv__(self, other): - ... - - def __mod__(self, other): - ... - - def __divmod__(self, other): - ... - - def __pow__(self, other): - ... - - def __radd__(self, other): - ... - - def __rsub__(self, other): - ... - - def __rmul__(self, other): - ... - - def __rdiv__(self, other): - ... - - def __rtruediv__(self, other): - ... - - def __rfloordiv__(self, other): - ... - - def __rmod__(self, other): - ... - - def __rdivmod__(self, other): - ... - - def __eq__(self, other) -> bool: - ... - - def __ne__(self, other) -> bool: - ... - - def copy(self): - ... - - def degree(self): - ... - - def cutdeg(self, deg): - ... - - def trim(self, tol=...): - ... - - def truncate(self, size): - ... - - def convert(self, domain=..., kind=..., window=...): - ... - - def mapparms(self): - ... - - def integ(self, m=..., k=..., lbnd=...): - ... - - def deriv(self, m=...): - ... - - def roots(self): - ... - - def linspace(self, n=..., domain=...): - ... - - @classmethod - def fit(cls, x, y, deg, domain=..., rcond=..., full=..., w=..., window=...): - ... - - @classmethod - def fromroots(cls, roots, domain=..., window=...): - ... - - @classmethod - def identity(cls, domain=..., window=...): - ... - - @classmethod - def basis(cls, deg, domain=..., window=...): - ... - - @classmethod - def cast(cls, series, domain=..., window=...): - ... - - - diff --git a/typings/numpy/polynomial/chebyshev.pyi b/typings/numpy/polynomial/chebyshev.pyi deleted file mode 100644 index 926cd15..0000000 --- a/typings/numpy/polynomial/chebyshev.pyi +++ /dev/null @@ -1,108 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any -from numpy import dtype, int_, ndarray -from numpy.polynomial._polybase import ABCPolyBase - -__all__: list[str] -chebtrim = ... -def poly2cheb(pol): - ... - -def cheb2poly(c): - ... - -chebdomain: ndarray[Any, dtype[int_]] -chebzero: ndarray[Any, dtype[int_]] -chebone: ndarray[Any, dtype[int_]] -chebx: ndarray[Any, dtype[int_]] -def chebline(off, scl): - ... - -def chebfromroots(roots): - ... - -def chebadd(c1, c2): - ... - -def chebsub(c1, c2): - ... - -def chebmulx(c): - ... - -def chebmul(c1, c2): - ... - -def chebdiv(c1, c2): - ... - -def chebpow(c, pow, maxpower=...): - ... - -def chebder(c, m=..., scl=..., axis=...): - ... - -def chebint(c, m=..., k=..., lbnd=..., scl=..., axis=...): - ... - -def chebval(x, c, tensor=...): - ... - -def chebval2d(x, y, c): - ... - -def chebgrid2d(x, y, c): - ... - -def chebval3d(x, y, z, c): - ... - -def chebgrid3d(x, y, z, c): - ... - -def chebvander(x, deg): - ... - -def chebvander2d(x, y, deg): - ... - -def chebvander3d(x, y, z, deg): - ... - -def chebfit(x, y, deg, rcond=..., full=..., w=...): - ... - -def chebcompanion(c): - ... - -def chebroots(c): - ... - -def chebinterpolate(func, deg, args=...): - ... - -def chebgauss(deg): - ... - -def chebweight(x): - ... - -def chebpts1(npts): - ... - -def chebpts2(npts): - ... - -class Chebyshev(ABCPolyBase): - @classmethod - def interpolate(cls, func, deg, domain=..., args=...): - ... - - domain: Any - window: Any - basis_name: Any - - diff --git a/typings/numpy/polynomial/hermite.pyi b/typings/numpy/polynomial/hermite.pyi deleted file mode 100644 index 41ad22e..0000000 --- a/typings/numpy/polynomial/hermite.pyi +++ /dev/null @@ -1,96 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any -from numpy import dtype, float_, int_, ndarray -from numpy.polynomial._polybase import ABCPolyBase - -__all__: list[str] -hermtrim = ... -def poly2herm(pol): - ... - -def herm2poly(c): - ... - -hermdomain: ndarray[Any, dtype[int_]] -hermzero: ndarray[Any, dtype[int_]] -hermone: ndarray[Any, dtype[int_]] -hermx: ndarray[Any, dtype[float_]] -def hermline(off, scl): - ... - -def hermfromroots(roots): - ... - -def hermadd(c1, c2): - ... - -def hermsub(c1, c2): - ... - -def hermmulx(c): - ... - -def hermmul(c1, c2): - ... - -def hermdiv(c1, c2): - ... - -def hermpow(c, pow, maxpower=...): - ... - -def hermder(c, m=..., scl=..., axis=...): - ... - -def hermint(c, m=..., k=..., lbnd=..., scl=..., axis=...): - ... - -def hermval(x, c, tensor=...): - ... - -def hermval2d(x, y, c): - ... - -def hermgrid2d(x, y, c): - ... - -def hermval3d(x, y, z, c): - ... - -def hermgrid3d(x, y, z, c): - ... - -def hermvander(x, deg): - ... - -def hermvander2d(x, y, deg): - ... - -def hermvander3d(x, y, z, deg): - ... - -def hermfit(x, y, deg, rcond=..., full=..., w=...): - ... - -def hermcompanion(c): - ... - -def hermroots(c): - ... - -def hermgauss(deg): - ... - -def hermweight(x): - ... - -class Hermite(ABCPolyBase): - domain: Any - window: Any - basis_name: Any - ... - - diff --git a/typings/numpy/polynomial/hermite_e.pyi b/typings/numpy/polynomial/hermite_e.pyi deleted file mode 100644 index 4127138..0000000 --- a/typings/numpy/polynomial/hermite_e.pyi +++ /dev/null @@ -1,96 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any -from numpy import dtype, int_, ndarray -from numpy.polynomial._polybase import ABCPolyBase - -__all__: list[str] -hermetrim = ... -def poly2herme(pol): - ... - -def herme2poly(c): - ... - -hermedomain: ndarray[Any, dtype[int_]] -hermezero: ndarray[Any, dtype[int_]] -hermeone: ndarray[Any, dtype[int_]] -hermex: ndarray[Any, dtype[int_]] -def hermeline(off, scl): - ... - -def hermefromroots(roots): - ... - -def hermeadd(c1, c2): - ... - -def hermesub(c1, c2): - ... - -def hermemulx(c): - ... - -def hermemul(c1, c2): - ... - -def hermediv(c1, c2): - ... - -def hermepow(c, pow, maxpower=...): - ... - -def hermeder(c, m=..., scl=..., axis=...): - ... - -def hermeint(c, m=..., k=..., lbnd=..., scl=..., axis=...): - ... - -def hermeval(x, c, tensor=...): - ... - -def hermeval2d(x, y, c): - ... - -def hermegrid2d(x, y, c): - ... - -def hermeval3d(x, y, z, c): - ... - -def hermegrid3d(x, y, z, c): - ... - -def hermevander(x, deg): - ... - -def hermevander2d(x, y, deg): - ... - -def hermevander3d(x, y, z, deg): - ... - -def hermefit(x, y, deg, rcond=..., full=..., w=...): - ... - -def hermecompanion(c): - ... - -def hermeroots(c): - ... - -def hermegauss(deg): - ... - -def hermeweight(x): - ... - -class HermiteE(ABCPolyBase): - domain: Any - window: Any - basis_name: Any - ... - - diff --git a/typings/numpy/polynomial/laguerre.pyi b/typings/numpy/polynomial/laguerre.pyi deleted file mode 100644 index 483902c..0000000 --- a/typings/numpy/polynomial/laguerre.pyi +++ /dev/null @@ -1,96 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any -from numpy import dtype, int_, ndarray -from numpy.polynomial._polybase import ABCPolyBase - -__all__: list[str] -lagtrim = ... -def poly2lag(pol): - ... - -def lag2poly(c): - ... - -lagdomain: ndarray[Any, dtype[int_]] -lagzero: ndarray[Any, dtype[int_]] -lagone: ndarray[Any, dtype[int_]] -lagx: ndarray[Any, dtype[int_]] -def lagline(off, scl): - ... - -def lagfromroots(roots): - ... - -def lagadd(c1, c2): - ... - -def lagsub(c1, c2): - ... - -def lagmulx(c): - ... - -def lagmul(c1, c2): - ... - -def lagdiv(c1, c2): - ... - -def lagpow(c, pow, maxpower=...): - ... - -def lagder(c, m=..., scl=..., axis=...): - ... - -def lagint(c, m=..., k=..., lbnd=..., scl=..., axis=...): - ... - -def lagval(x, c, tensor=...): - ... - -def lagval2d(x, y, c): - ... - -def laggrid2d(x, y, c): - ... - -def lagval3d(x, y, z, c): - ... - -def laggrid3d(x, y, z, c): - ... - -def lagvander(x, deg): - ... - -def lagvander2d(x, y, deg): - ... - -def lagvander3d(x, y, z, deg): - ... - -def lagfit(x, y, deg, rcond=..., full=..., w=...): - ... - -def lagcompanion(c): - ... - -def lagroots(c): - ... - -def laggauss(deg): - ... - -def lagweight(x): - ... - -class Laguerre(ABCPolyBase): - domain: Any - window: Any - basis_name: Any - ... - - diff --git a/typings/numpy/polynomial/legendre.pyi b/typings/numpy/polynomial/legendre.pyi deleted file mode 100644 index 288aa26..0000000 --- a/typings/numpy/polynomial/legendre.pyi +++ /dev/null @@ -1,96 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any -from numpy import dtype, int_, ndarray -from numpy.polynomial._polybase import ABCPolyBase - -__all__: list[str] -legtrim = ... -def poly2leg(pol): - ... - -def leg2poly(c): - ... - -legdomain: ndarray[Any, dtype[int_]] -legzero: ndarray[Any, dtype[int_]] -legone: ndarray[Any, dtype[int_]] -legx: ndarray[Any, dtype[int_]] -def legline(off, scl): - ... - -def legfromroots(roots): - ... - -def legadd(c1, c2): - ... - -def legsub(c1, c2): - ... - -def legmulx(c): - ... - -def legmul(c1, c2): - ... - -def legdiv(c1, c2): - ... - -def legpow(c, pow, maxpower=...): - ... - -def legder(c, m=..., scl=..., axis=...): - ... - -def legint(c, m=..., k=..., lbnd=..., scl=..., axis=...): - ... - -def legval(x, c, tensor=...): - ... - -def legval2d(x, y, c): - ... - -def leggrid2d(x, y, c): - ... - -def legval3d(x, y, z, c): - ... - -def leggrid3d(x, y, z, c): - ... - -def legvander(x, deg): - ... - -def legvander2d(x, y, deg): - ... - -def legvander3d(x, y, z, deg): - ... - -def legfit(x, y, deg, rcond=..., full=..., w=...): - ... - -def legcompanion(c): - ... - -def legroots(c): - ... - -def leggauss(deg): - ... - -def legweight(x): - ... - -class Legendre(ABCPolyBase): - domain: Any - window: Any - basis_name: Any - ... - - diff --git a/typings/numpy/polynomial/polynomial.pyi b/typings/numpy/polynomial/polynomial.pyi deleted file mode 100644 index ad1d457..0000000 --- a/typings/numpy/polynomial/polynomial.pyi +++ /dev/null @@ -1,84 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any -from numpy import dtype, int_, ndarray -from numpy.polynomial._polybase import ABCPolyBase - -__all__: list[str] -polytrim = ... -polydomain: ndarray[Any, dtype[int_]] -polyzero: ndarray[Any, dtype[int_]] -polyone: ndarray[Any, dtype[int_]] -polyx: ndarray[Any, dtype[int_]] -def polyline(off, scl): - ... - -def polyfromroots(roots): - ... - -def polyadd(c1, c2): - ... - -def polysub(c1, c2): - ... - -def polymulx(c): - ... - -def polymul(c1, c2): - ... - -def polydiv(c1, c2): - ... - -def polypow(c, pow, maxpower=...): - ... - -def polyder(c, m=..., scl=..., axis=...): - ... - -def polyint(c, m=..., k=..., lbnd=..., scl=..., axis=...): - ... - -def polyval(x, c, tensor=...): - ... - -def polyvalfromroots(x, r, tensor=...): - ... - -def polyval2d(x, y, c): - ... - -def polygrid2d(x, y, c): - ... - -def polyval3d(x, y, z, c): - ... - -def polygrid3d(x, y, z, c): - ... - -def polyvander(x, deg): - ... - -def polyvander2d(x, y, deg): - ... - -def polyvander3d(x, y, z, deg): - ... - -def polyfit(x, y, deg, rcond=..., full=..., w=...): - ... - -def polyroots(c): - ... - -class Polynomial(ABCPolyBase): - domain: Any - window: Any - basis_name: Any - ... - - diff --git a/typings/numpy/polynomial/polyutils.pyi b/typings/numpy/polynomial/polyutils.pyi deleted file mode 100644 index 359de71..0000000 --- a/typings/numpy/polynomial/polyutils.pyi +++ /dev/null @@ -1,30 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -__all__: list[str] -class RankWarning(UserWarning): - ... - - -def trimseq(seq): - ... - -def as_series(alist, trim=...): - ... - -def trimcoef(c, tol=...): - ... - -def getdomain(x): - ... - -def mapparms(old, new): - ... - -def mapdomain(x, old, new): - ... - -def format_float(x, parens=...): - ... - diff --git a/typings/numpy/random/__init__.pyi b/typings/numpy/random/__init__.pyi deleted file mode 100644 index 8bc5463..0000000 --- a/typings/numpy/random/__init__.pyi +++ /dev/null @@ -1,16 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy._pytesttester import PytestTester -from numpy.random._generator import Generator as Generator, default_rng as default_rng -from numpy.random._mt19937 import MT19937 as MT19937 -from numpy.random._pcg64 import PCG64 as PCG64, PCG64DXSM as PCG64DXSM -from numpy.random._philox import Philox as Philox -from numpy.random._sfc64 import SFC64 as SFC64 -from numpy.random.bit_generator import BitGenerator as BitGenerator, SeedSequence as SeedSequence -from numpy.random.mtrand import RandomState as RandomState, beta as beta, binomial as binomial, bytes as bytes, chisquare as chisquare, choice as choice, dirichlet as dirichlet, exponential as exponential, f as f, gamma as gamma, geometric as geometric, get_bit_generator as get_bit_generator, get_state as get_state, gumbel as gumbel, hypergeometric as hypergeometric, laplace as laplace, logistic as logistic, lognormal as lognormal, logseries as logseries, multinomial as multinomial, multivariate_normal as multivariate_normal, negative_binomial as negative_binomial, noncentral_chisquare as noncentral_chisquare, noncentral_f as noncentral_f, normal as normal, pareto as pareto, permutation as permutation, poisson as poisson, power as power, rand as rand, randint as randint, randn as randn, random as random, random_integers as random_integers, random_sample as random_sample, ranf as ranf, rayleigh as rayleigh, sample as sample, seed as seed, set_bit_generator as set_bit_generator, set_state as set_state, shuffle as shuffle, standard_cauchy as standard_cauchy, standard_exponential as standard_exponential, standard_gamma as standard_gamma, standard_normal as standard_normal, standard_t as standard_t, triangular as triangular, uniform as uniform, vonmises as vonmises, wald as wald, weibull as weibull, zipf as zipf - -__all__: list[str] -__path__: list[str] -test: PytestTester diff --git a/typings/numpy/random/_generator.pyi b/typings/numpy/random/_generator.pyi deleted file mode 100644 index 35bd52e..0000000 --- a/typings/numpy/random/_generator.pyi +++ /dev/null @@ -1,469 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Callable -from typing import Any, Literal, TypeVar, Union, overload -from numpy import bool_, dtype, float32, float64, int16, int32, int64, int8, int_, ndarray, uint, uint16, uint32, uint64, uint8 -from numpy.random import BitGenerator, SeedSequence -from numpy._typing import ArrayLike, _ArrayLikeFloat_co, _ArrayLikeInt_co, _DTypeLikeBool, _DTypeLikeInt, _DTypeLikeUInt, _DoubleCodes, _Float32Codes, _Float64Codes, _FloatLike_co, _Int16Codes, _Int32Codes, _Int64Codes, _Int8Codes, _IntCodes, _ShapeLike, _SingleCodes, _SupportsDType, _UInt16Codes, _UInt32Codes, _UInt64Codes, _UInt8Codes, _UIntCodes - -_ArrayType = TypeVar("_ArrayType", bound=ndarray[Any, Any]) -_DTypeLikeFloat32 = Union[dtype[float32], _SupportsDType[dtype[float32]], type[float32], _Float32Codes, _SingleCodes,] -_DTypeLikeFloat64 = Union[dtype[float64], _SupportsDType[dtype[float64]], type[float], type[float64], _Float64Codes, _DoubleCodes,] -class Generator: - def __init__(self, bit_generator: BitGenerator) -> None: - ... - - def __repr__(self) -> str: - ... - - def __str__(self) -> str: - ... - - def __getstate__(self) -> dict[str, Any]: - ... - - def __setstate__(self, state: dict[str, Any]) -> None: - ... - - def __reduce__(self) -> tuple[Callable[[str], Generator], tuple[str], dict[str, Any]]: - ... - - @property - def bit_generator(self) -> BitGenerator: - ... - - def spawn(self, n_children: int) -> list[Generator]: - ... - - def bytes(self, length: int) -> bytes: - ... - - @overload - def standard_normal(self, size: None = ..., dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ..., out: None = ...) -> float: - ... - - @overload - def standard_normal(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_normal(self, *, out: ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_normal(self, size: _ShapeLike = ..., dtype: _DTypeLikeFloat32 = ..., out: None | ndarray[Any, dtype[float32]] = ...) -> ndarray[Any, dtype[float32]]: - ... - - @overload - def standard_normal(self, size: _ShapeLike = ..., dtype: _DTypeLikeFloat64 = ..., out: None | ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def permutation(self, x: int, axis: int = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def permutation(self, x: ArrayLike, axis: int = ...) -> ndarray[Any, Any]: - ... - - @overload - def standard_exponential(self, size: None = ..., dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ..., method: Literal["zig", "inv"] = ..., out: None = ...) -> float: - ... - - @overload - def standard_exponential(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_exponential(self, *, out: ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_exponential(self, size: _ShapeLike = ..., *, method: Literal["zig", "inv"] = ..., out: None | ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_exponential(self, size: _ShapeLike = ..., dtype: _DTypeLikeFloat32 = ..., method: Literal["zig", "inv"] = ..., out: None | ndarray[Any, dtype[float32]] = ...) -> ndarray[Any, dtype[float32]]: - ... - - @overload - def standard_exponential(self, size: _ShapeLike = ..., dtype: _DTypeLikeFloat64 = ..., method: Literal["zig", "inv"] = ..., out: None | ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def random(self, size: None = ..., dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ..., out: None = ...) -> float: - ... - - @overload - def random(self, *, out: ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def random(self, size: _ShapeLike = ..., *, out: None | ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def random(self, size: _ShapeLike = ..., dtype: _DTypeLikeFloat32 = ..., out: None | ndarray[Any, dtype[float32]] = ...) -> ndarray[Any, dtype[float32]]: - ... - - @overload - def random(self, size: _ShapeLike = ..., dtype: _DTypeLikeFloat64 = ..., out: None | ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def beta(self, a: _FloatLike_co, b: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def beta(self, a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def exponential(self, scale: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def exponential(self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def integers(self, low: int, high: None | int = ...) -> int: - ... - - @overload - def integers(self, low: int, high: None | int = ..., size: None = ..., dtype: _DTypeLikeBool = ..., endpoint: bool = ...) -> bool: - ... - - @overload - def integers(self, low: int, high: None | int = ..., size: None = ..., dtype: _DTypeLikeInt | _DTypeLikeUInt = ..., endpoint: bool = ...) -> int: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: _DTypeLikeBool = ..., endpoint: bool = ...) -> ndarray[Any, dtype[bool_]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int8] | type[int8] | _Int8Codes | _SupportsDType[dtype[int8]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[int8]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int16] | type[int16] | _Int16Codes | _SupportsDType[dtype[int16]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[int16]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int32] | type[int32] | _Int32Codes | _SupportsDType[dtype[int32]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[int32]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: None | dtype[int64] | type[int64] | _Int64Codes | _SupportsDType[dtype[int64]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint8] | type[uint8] | _UInt8Codes | _SupportsDType[dtype[uint8]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[uint8]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint16] | type[uint16] | _UInt16Codes | _SupportsDType[dtype[uint16]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[uint16]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint32] | type[uint32] | _UInt32Codes | _SupportsDType[dtype[uint32]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[uint32]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint64] | type[uint64] | _UInt64Codes | _SupportsDType[dtype[uint64]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[uint64]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int_] | type[int] | type[int_] | _IntCodes | _SupportsDType[dtype[int_]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint] | type[uint] | _UIntCodes | _SupportsDType[dtype[uint]] = ..., endpoint: bool = ...) -> ndarray[Any, dtype[uint]]: - ... - - @overload - def choice(self, a: int, size: None = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ..., axis: int = ..., shuffle: bool = ...) -> int: - ... - - @overload - def choice(self, a: int, size: _ShapeLike = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ..., axis: int = ..., shuffle: bool = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def choice(self, a: ArrayLike, size: None = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ..., axis: int = ..., shuffle: bool = ...) -> Any: - ... - - @overload - def choice(self, a: ArrayLike, size: _ShapeLike = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ..., axis: int = ..., shuffle: bool = ...) -> ndarray[Any, Any]: - ... - - @overload - def uniform(self, low: _FloatLike_co = ..., high: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def uniform(self, low: _ArrayLikeFloat_co = ..., high: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def normal(self, loc: _FloatLike_co = ..., scale: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def normal(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_gamma(self, shape: _FloatLike_co, size: None = ..., dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ..., out: None = ...) -> float: - ... - - @overload - def standard_gamma(self, shape: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_gamma(self, shape: _ArrayLikeFloat_co, *, out: ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_gamma(self, shape: _ArrayLikeFloat_co, size: None | _ShapeLike = ..., dtype: _DTypeLikeFloat32 = ..., out: None | ndarray[Any, dtype[float32]] = ...) -> ndarray[Any, dtype[float32]]: - ... - - @overload - def standard_gamma(self, shape: _ArrayLikeFloat_co, size: None | _ShapeLike = ..., dtype: _DTypeLikeFloat64 = ..., out: None | ndarray[Any, dtype[float64]] = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def gamma(self, shape: _FloatLike_co, scale: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def gamma(self, shape: _ArrayLikeFloat_co, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def f(self, dfnum: _FloatLike_co, dfden: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def f(self, dfnum: _ArrayLikeFloat_co, dfden: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def noncentral_f(self, dfnum: _FloatLike_co, dfden: _FloatLike_co, nonc: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def noncentral_f(self, dfnum: _ArrayLikeFloat_co, dfden: _ArrayLikeFloat_co, nonc: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def chisquare(self, df: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def chisquare(self, df: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def noncentral_chisquare(self, df: _FloatLike_co, nonc: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def noncentral_chisquare(self, df: _ArrayLikeFloat_co, nonc: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_t(self, df: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def standard_t(self, df: _ArrayLikeFloat_co, size: None = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_t(self, df: _ArrayLikeFloat_co, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def vonmises(self, mu: _FloatLike_co, kappa: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def vonmises(self, mu: _ArrayLikeFloat_co, kappa: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def pareto(self, a: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def pareto(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def weibull(self, a: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def weibull(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def power(self, a: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def power(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_cauchy(self, size: None = ...) -> float: - ... - - @overload - def standard_cauchy(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def laplace(self, loc: _FloatLike_co = ..., scale: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def laplace(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def gumbel(self, loc: _FloatLike_co = ..., scale: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def gumbel(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def logistic(self, loc: _FloatLike_co = ..., scale: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def logistic(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def lognormal(self, mean: _FloatLike_co = ..., sigma: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def lognormal(self, mean: _ArrayLikeFloat_co = ..., sigma: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def rayleigh(self, scale: _FloatLike_co = ..., size: None = ...) -> float: - ... - - @overload - def rayleigh(self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def wald(self, mean: _FloatLike_co, scale: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def wald(self, mean: _ArrayLikeFloat_co, scale: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def triangular(self, left: _FloatLike_co, mode: _FloatLike_co, right: _FloatLike_co, size: None = ...) -> float: - ... - - @overload - def triangular(self, left: _ArrayLikeFloat_co, mode: _ArrayLikeFloat_co, right: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def binomial(self, n: int, p: _FloatLike_co, size: None = ...) -> int: - ... - - @overload - def binomial(self, n: _ArrayLikeInt_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def negative_binomial(self, n: _FloatLike_co, p: _FloatLike_co, size: None = ...) -> int: - ... - - @overload - def negative_binomial(self, n: _ArrayLikeFloat_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def poisson(self, lam: _FloatLike_co = ..., size: None = ...) -> int: - ... - - @overload - def poisson(self, lam: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def zipf(self, a: _FloatLike_co, size: None = ...) -> int: - ... - - @overload - def zipf(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def geometric(self, p: _FloatLike_co, size: None = ...) -> int: - ... - - @overload - def geometric(self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def hypergeometric(self, ngood: int, nbad: int, nsample: int, size: None = ...) -> int: - ... - - @overload - def hypergeometric(self, ngood: _ArrayLikeInt_co, nbad: _ArrayLikeInt_co, nsample: _ArrayLikeInt_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def logseries(self, p: _FloatLike_co, size: None = ...) -> int: - ... - - @overload - def logseries(self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - def multivariate_normal(self, mean: _ArrayLikeFloat_co, cov: _ArrayLikeFloat_co, size: None | _ShapeLike = ..., check_valid: Literal["warn", "raise", "ignore"] = ..., tol: float = ..., *, method: Literal["svd", "eigh", "cholesky"] = ...) -> ndarray[Any, dtype[float64]]: - ... - - def multinomial(self, n: _ArrayLikeInt_co, pvals: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int64]]: - ... - - def multivariate_hypergeometric(self, colors: _ArrayLikeInt_co, nsample: int, size: None | _ShapeLike = ..., method: Literal["marginals", "count"] = ...) -> ndarray[Any, dtype[int64]]: - ... - - def dirichlet(self, alpha: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - def permuted(self, x: ArrayLike, *, axis: None | int = ..., out: None | ndarray[Any, Any] = ...) -> ndarray[Any, Any]: - ... - - def shuffle(self, x: ArrayLike, axis: int = ...) -> None: - ... - - - -def default_rng(seed: None | _ArrayLikeInt_co | SeedSequence | BitGenerator | Generator = ...) -> Generator: - ... - diff --git a/typings/numpy/random/_mt19937.pyi b/typings/numpy/random/_mt19937.pyi deleted file mode 100644 index d47d0e1..0000000 --- a/typings/numpy/random/_mt19937.pyi +++ /dev/null @@ -1,38 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, TypedDict -from numpy import dtype, ndarray, uint32 -from numpy.random.bit_generator import BitGenerator, SeedSequence -from numpy._typing import _ArrayLikeInt_co - -class _MT19937Internal(TypedDict): - key: ndarray[Any, dtype[uint32]] - pos: int - ... - - -class _MT19937State(TypedDict): - bit_generator: str - state: _MT19937Internal - ... - - -class MT19937(BitGenerator): - def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: - ... - - def jumped(self, jumps: int = ...) -> MT19937: - ... - - @property - def state(self) -> _MT19937State: - ... - - @state.setter - def state(self, value: _MT19937State) -> None: - ... - - - diff --git a/typings/numpy/random/_pcg64.pyi b/typings/numpy/random/_pcg64.pyi deleted file mode 100644 index cef90b7..0000000 --- a/typings/numpy/random/_pcg64.pyi +++ /dev/null @@ -1,62 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import TypedDict -from numpy.random.bit_generator import BitGenerator, SeedSequence -from numpy._typing import _ArrayLikeInt_co - -class _PCG64Internal(TypedDict): - state: int - inc: int - ... - - -class _PCG64State(TypedDict): - bit_generator: str - state: _PCG64Internal - has_uint32: int - uinteger: int - ... - - -class PCG64(BitGenerator): - def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: - ... - - def jumped(self, jumps: int = ...) -> PCG64: - ... - - @property - def state(self) -> _PCG64State: - ... - - @state.setter - def state(self, value: _PCG64State) -> None: - ... - - def advance(self, delta: int) -> PCG64: - ... - - - -class PCG64DXSM(BitGenerator): - def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: - ... - - def jumped(self, jumps: int = ...) -> PCG64DXSM: - ... - - @property - def state(self) -> _PCG64State: - ... - - @state.setter - def state(self, value: _PCG64State) -> None: - ... - - def advance(self, delta: int) -> PCG64DXSM: - ... - - - diff --git a/typings/numpy/random/_philox.pyi b/typings/numpy/random/_philox.pyi deleted file mode 100644 index be50983..0000000 --- a/typings/numpy/random/_philox.pyi +++ /dev/null @@ -1,45 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, TypedDict -from numpy import dtype, ndarray, uint64 -from numpy.random.bit_generator import BitGenerator, SeedSequence -from numpy._typing import _ArrayLikeInt_co - -class _PhiloxInternal(TypedDict): - counter: ndarray[Any, dtype[uint64]] - key: ndarray[Any, dtype[uint64]] - ... - - -class _PhiloxState(TypedDict): - bit_generator: str - state: _PhiloxInternal - buffer: ndarray[Any, dtype[uint64]] - buffer_pos: int - has_uint32: int - uinteger: int - ... - - -class Philox(BitGenerator): - def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ..., counter: None | _ArrayLikeInt_co = ..., key: None | _ArrayLikeInt_co = ...) -> None: - ... - - @property - def state(self) -> _PhiloxState: - ... - - @state.setter - def state(self, value: _PhiloxState) -> None: - ... - - def jumped(self, jumps: int = ...) -> Philox: - ... - - def advance(self, delta: int) -> Philox: - ... - - - diff --git a/typings/numpy/random/_sfc64.pyi b/typings/numpy/random/_sfc64.pyi deleted file mode 100644 index 80907dc..0000000 --- a/typings/numpy/random/_sfc64.pyi +++ /dev/null @@ -1,36 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from typing import Any, TypedDict -from numpy import dtype as dtype, ndarray as ndarray, uint64 -from numpy.random.bit_generator import BitGenerator, SeedSequence -from numpy._typing import _ArrayLikeInt_co - -class _SFC64Internal(TypedDict): - state: ndarray[Any, dtype[uint64]] - ... - - -class _SFC64State(TypedDict): - bit_generator: str - state: _SFC64Internal - has_uint32: int - uinteger: int - ... - - -class SFC64(BitGenerator): - def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: - ... - - @property - def state(self) -> _SFC64State: - ... - - @state.setter - def state(self, value: _SFC64State) -> None: - ... - - - diff --git a/typings/numpy/random/bit_generator.pyi b/typings/numpy/random/bit_generator.pyi deleted file mode 100644 index 30ab035..0000000 --- a/typings/numpy/random/bit_generator.pyi +++ /dev/null @@ -1,131 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import abc -from threading import Lock -from collections.abc import Callable, Mapping, Sequence -from typing import Any, Literal, NamedTuple, TypeVar, TypedDict, Union, overload -from numpy import dtype, ndarray, uint32, uint64 -from numpy._typing import _ArrayLikeInt_co, _ShapeLike, _SupportsDType, _UInt32Codes, _UInt64Codes - -_T = TypeVar("_T") -_DTypeLikeUint32 = Union[dtype[uint32], _SupportsDType[dtype[uint32]], type[uint32], _UInt32Codes,] -_DTypeLikeUint64 = Union[dtype[uint64], _SupportsDType[dtype[uint64]], type[uint64], _UInt64Codes,] -class _SeedSeqState(TypedDict): - entropy: None | int | Sequence[int] - spawn_key: tuple[int, ...] - pool_size: int - n_children_spawned: int - ... - - -class _Interface(NamedTuple): - state_address: Any - state: Any - next_uint64: Any - next_uint32: Any - next_double: Any - bit_generator: Any - ... - - -class ISeedSequence(abc.ABC): - @abc.abstractmethod - def generate_state(self, n_words: int, dtype: _DTypeLikeUint32 | _DTypeLikeUint64 = ...) -> ndarray[Any, dtype[uint32 | uint64]]: - ... - - - -class ISpawnableSeedSequence(ISeedSequence): - @abc.abstractmethod - def spawn(self: _T, n_children: int) -> list[_T]: - ... - - - -class SeedlessSeedSequence(ISpawnableSeedSequence): - def generate_state(self, n_words: int, dtype: _DTypeLikeUint32 | _DTypeLikeUint64 = ...) -> ndarray[Any, dtype[uint32 | uint64]]: - ... - - def spawn(self: _T, n_children: int) -> list[_T]: - ... - - - -class SeedSequence(ISpawnableSeedSequence): - entropy: None | int | Sequence[int] - spawn_key: tuple[int, ...] - pool_size: int - n_children_spawned: int - pool: ndarray[Any, dtype[uint32]] - def __init__(self, entropy: None | int | Sequence[int] | _ArrayLikeInt_co = ..., *, spawn_key: Sequence[int] = ..., pool_size: int = ..., n_children_spawned: int = ...) -> None: - ... - - def __repr__(self) -> str: - ... - - @property - def state(self) -> _SeedSeqState: - ... - - def generate_state(self, n_words: int, dtype: _DTypeLikeUint32 | _DTypeLikeUint64 = ...) -> ndarray[Any, dtype[uint32 | uint64]]: - ... - - def spawn(self, n_children: int) -> list[SeedSequence]: - ... - - - -class BitGenerator(abc.ABC): - lock: Lock - def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: - ... - - def __getstate__(self) -> dict[str, Any]: - ... - - def __setstate__(self, state: dict[str, Any]) -> None: - ... - - def __reduce__(self) -> tuple[Callable[[str], BitGenerator], tuple[str], tuple[dict[str, Any]]]: - ... - - @abc.abstractmethod - @property - def state(self) -> Mapping[str, Any]: - ... - - @state.setter - def state(self, value: Mapping[str, Any]) -> None: - ... - - @property - def seed_seq(self) -> ISeedSequence: - ... - - def spawn(self, n_children: int) -> list[BitGenerator]: - ... - - @overload - def random_raw(self, size: None = ..., output: Literal[True] = ...) -> int: - ... - - @overload - def random_raw(self, size: _ShapeLike = ..., output: Literal[True] = ...) -> ndarray[Any, dtype[uint64]]: - ... - - @overload - def random_raw(self, size: None | _ShapeLike = ..., output: Literal[False] = ...) -> None: - ... - - @property - def ctypes(self) -> _Interface: - ... - - @property - def cffi(self) -> _Interface: - ... - - - diff --git a/typings/numpy/random/mtrand.pyi b/typings/numpy/random/mtrand.pyi deleted file mode 100644 index 1c03db6..0000000 --- a/typings/numpy/random/mtrand.pyi +++ /dev/null @@ -1,513 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import builtins -from collections.abc import Callable -from typing import Any, Literal, Union, overload -from numpy import bool_, dtype, float32, float64, int16, int32, int64, int8, int_, ndarray, uint, uint16, uint32, uint64, uint8 -from numpy.random.bit_generator import BitGenerator -from numpy._typing import ArrayLike, _ArrayLikeFloat_co, _ArrayLikeInt_co, _DTypeLikeBool, _DTypeLikeInt, _DTypeLikeUInt, _DoubleCodes, _Float32Codes, _Float64Codes, _Int16Codes, _Int32Codes, _Int64Codes, _Int8Codes, _IntCodes, _ShapeLike, _SingleCodes, _SupportsDType, _UInt16Codes, _UInt32Codes, _UInt64Codes, _UInt8Codes, _UIntCodes - -_DTypeLikeFloat32 = Union[dtype[float32], _SupportsDType[dtype[float32]], type[float32], _Float32Codes, _SingleCodes,] -_DTypeLikeFloat64 = Union[dtype[float64], _SupportsDType[dtype[float64]], type[float], type[float64], _Float64Codes, _DoubleCodes,] -class RandomState: - _bit_generator: BitGenerator - def __init__(self, seed: None | _ArrayLikeInt_co | BitGenerator = ...) -> None: - ... - - def __repr__(self) -> str: - ... - - def __str__(self) -> str: - ... - - def __getstate__(self) -> dict[str, Any]: - ... - - def __setstate__(self, state: dict[str, Any]) -> None: - ... - - def __reduce__(self) -> tuple[Callable[[str], RandomState], tuple[str], dict[str, Any]]: - ... - - def seed(self, seed: None | _ArrayLikeFloat_co = ...) -> None: - ... - - @overload - def get_state(self, legacy: Literal[False] = ...) -> dict[str, Any]: - ... - - @overload - def get_state(self, legacy: Literal[True] = ...) -> dict[str, Any] | tuple[str, ndarray[Any, dtype[uint32]], int, int, float]: - ... - - def set_state(self, state: dict[str, Any] | tuple[str, ndarray[Any, dtype[uint32]], int, int, float]) -> None: - ... - - @overload - def random_sample(self, size: None = ...) -> float: - ... - - @overload - def random_sample(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def random(self, size: None = ...) -> float: - ... - - @overload - def random(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def beta(self, a: float, b: float, size: None = ...) -> float: - ... - - @overload - def beta(self, a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def exponential(self, scale: float = ..., size: None = ...) -> float: - ... - - @overload - def exponential(self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_exponential(self, size: None = ...) -> float: - ... - - @overload - def standard_exponential(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def tomaxint(self, size: None = ...) -> int: - ... - - @overload - def tomaxint(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def randint(self, low: int, high: None | int = ...) -> int: - ... - - @overload - def randint(self, low: int, high: None | int = ..., size: None = ..., dtype: _DTypeLikeBool = ...) -> bool: - ... - - @overload - def randint(self, low: int, high: None | int = ..., size: None = ..., dtype: _DTypeLikeInt | _DTypeLikeUInt = ...) -> int: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: _DTypeLikeBool = ...) -> ndarray[Any, dtype[bool_]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int8] | type[int8] | _Int8Codes | _SupportsDType[dtype[int8]] = ...) -> ndarray[Any, dtype[int8]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int16] | type[int16] | _Int16Codes | _SupportsDType[dtype[int16]] = ...) -> ndarray[Any, dtype[int16]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int32] | type[int32] | _Int32Codes | _SupportsDType[dtype[int32]] = ...) -> ndarray[Any, dtype[int32]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: None | dtype[int64] | type[int64] | _Int64Codes | _SupportsDType[dtype[int64]] = ...) -> ndarray[Any, dtype[int64]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint8] | type[uint8] | _UInt8Codes | _SupportsDType[dtype[uint8]] = ...) -> ndarray[Any, dtype[uint8]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint16] | type[uint16] | _UInt16Codes | _SupportsDType[dtype[uint16]] = ...) -> ndarray[Any, dtype[uint16]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint32] | type[uint32] | _UInt32Codes | _SupportsDType[dtype[uint32]] = ...) -> ndarray[Any, dtype[uint32]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint64] | type[uint64] | _UInt64Codes | _SupportsDType[dtype[uint64]] = ...) -> ndarray[Any, dtype[uint64]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[int_] | type[int] | type[int_] | _IntCodes | _SupportsDType[dtype[int_]] = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def randint(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ..., dtype: dtype[uint] | type[uint] | _UIntCodes | _SupportsDType[dtype[uint]] = ...) -> ndarray[Any, dtype[uint]]: - ... - - def bytes(self, length: int) -> builtins.bytes: - ... - - @overload - def choice(self, a: int, size: None = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ...) -> int: - ... - - @overload - def choice(self, a: int, size: _ShapeLike = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def choice(self, a: ArrayLike, size: None = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ...) -> Any: - ... - - @overload - def choice(self, a: ArrayLike, size: _ShapeLike = ..., replace: bool = ..., p: None | _ArrayLikeFloat_co = ...) -> ndarray[Any, Any]: - ... - - @overload - def uniform(self, low: float = ..., high: float = ..., size: None = ...) -> float: - ... - - @overload - def uniform(self, low: _ArrayLikeFloat_co = ..., high: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def rand(self) -> float: - ... - - @overload - def rand(self, *args: int) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def randn(self) -> float: - ... - - @overload - def randn(self, *args: int) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def random_integers(self, low: int, high: None | int = ..., size: None = ...) -> int: - ... - - @overload - def random_integers(self, low: _ArrayLikeInt_co, high: None | _ArrayLikeInt_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def standard_normal(self, size: None = ...) -> float: - ... - - @overload - def standard_normal(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def normal(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: - ... - - @overload - def normal(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_gamma(self, shape: float, size: None = ...) -> float: - ... - - @overload - def standard_gamma(self, shape: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def gamma(self, shape: float, scale: float = ..., size: None = ...) -> float: - ... - - @overload - def gamma(self, shape: _ArrayLikeFloat_co, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def f(self, dfnum: float, dfden: float, size: None = ...) -> float: - ... - - @overload - def f(self, dfnum: _ArrayLikeFloat_co, dfden: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def noncentral_f(self, dfnum: float, dfden: float, nonc: float, size: None = ...) -> float: - ... - - @overload - def noncentral_f(self, dfnum: _ArrayLikeFloat_co, dfden: _ArrayLikeFloat_co, nonc: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def chisquare(self, df: float, size: None = ...) -> float: - ... - - @overload - def chisquare(self, df: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def noncentral_chisquare(self, df: float, nonc: float, size: None = ...) -> float: - ... - - @overload - def noncentral_chisquare(self, df: _ArrayLikeFloat_co, nonc: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_t(self, df: float, size: None = ...) -> float: - ... - - @overload - def standard_t(self, df: _ArrayLikeFloat_co, size: None = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_t(self, df: _ArrayLikeFloat_co, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def vonmises(self, mu: float, kappa: float, size: None = ...) -> float: - ... - - @overload - def vonmises(self, mu: _ArrayLikeFloat_co, kappa: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def pareto(self, a: float, size: None = ...) -> float: - ... - - @overload - def pareto(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def weibull(self, a: float, size: None = ...) -> float: - ... - - @overload - def weibull(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def power(self, a: float, size: None = ...) -> float: - ... - - @overload - def power(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def standard_cauchy(self, size: None = ...) -> float: - ... - - @overload - def standard_cauchy(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def laplace(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: - ... - - @overload - def laplace(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def gumbel(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: - ... - - @overload - def gumbel(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def logistic(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: - ... - - @overload - def logistic(self, loc: _ArrayLikeFloat_co = ..., scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def lognormal(self, mean: float = ..., sigma: float = ..., size: None = ...) -> float: - ... - - @overload - def lognormal(self, mean: _ArrayLikeFloat_co = ..., sigma: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def rayleigh(self, scale: float = ..., size: None = ...) -> float: - ... - - @overload - def rayleigh(self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def wald(self, mean: float, scale: float, size: None = ...) -> float: - ... - - @overload - def wald(self, mean: _ArrayLikeFloat_co, scale: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def triangular(self, left: float, mode: float, right: float, size: None = ...) -> float: - ... - - @overload - def triangular(self, left: _ArrayLikeFloat_co, mode: _ArrayLikeFloat_co, right: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - @overload - def binomial(self, n: int, p: float, size: None = ...) -> int: - ... - - @overload - def binomial(self, n: _ArrayLikeInt_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def negative_binomial(self, n: float, p: float, size: None = ...) -> int: - ... - - @overload - def negative_binomial(self, n: _ArrayLikeFloat_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def poisson(self, lam: float = ..., size: None = ...) -> int: - ... - - @overload - def poisson(self, lam: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def zipf(self, a: float, size: None = ...) -> int: - ... - - @overload - def zipf(self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def geometric(self, p: float, size: None = ...) -> int: - ... - - @overload - def geometric(self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def hypergeometric(self, ngood: int, nbad: int, nsample: int, size: None = ...) -> int: - ... - - @overload - def hypergeometric(self, ngood: _ArrayLikeInt_co, nbad: _ArrayLikeInt_co, nsample: _ArrayLikeInt_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def logseries(self, p: float, size: None = ...) -> int: - ... - - @overload - def logseries(self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - def multivariate_normal(self, mean: _ArrayLikeFloat_co, cov: _ArrayLikeFloat_co, size: None | _ShapeLike = ..., check_valid: Literal["warn", "raise", "ignore"] = ..., tol: float = ...) -> ndarray[Any, dtype[float64]]: - ... - - def multinomial(self, n: _ArrayLikeInt_co, pvals: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: - ... - - def dirichlet(self, alpha: _ArrayLikeFloat_co, size: None | _ShapeLike = ...) -> ndarray[Any, dtype[float64]]: - ... - - def shuffle(self, x: ArrayLike) -> None: - ... - - @overload - def permutation(self, x: int) -> ndarray[Any, dtype[int_]]: - ... - - @overload - def permutation(self, x: ArrayLike) -> ndarray[Any, Any]: - ... - - - -_rand: RandomState -beta = ... -binomial = ... -bytes = ... -chisquare = ... -choice = ... -dirichlet = ... -exponential = ... -f = ... -gamma = ... -get_state = ... -geometric = ... -gumbel = ... -hypergeometric = ... -laplace = ... -logistic = ... -lognormal = ... -logseries = ... -multinomial = ... -multivariate_normal = ... -negative_binomial = ... -noncentral_chisquare = ... -noncentral_f = ... -normal = ... -pareto = ... -permutation = ... -poisson = ... -power = ... -rand = ... -randint = ... -randn = ... -random = ... -random_integers = ... -random_sample = ... -rayleigh = ... -seed = ... -set_state = ... -shuffle = ... -standard_cauchy = ... -standard_exponential = ... -standard_gamma = ... -standard_normal = ... -standard_t = ... -triangular = ... -uniform = ... -vonmises = ... -wald = ... -weibull = ... -zipf = ... -sample = ... -ranf = ... -def set_bit_generator(bitgen: BitGenerator) -> None: - ... - -def get_bit_generator() -> BitGenerator: - ... - diff --git a/typings/numpy/testing/__init__.pyi b/typings/numpy/testing/__init__.pyi deleted file mode 100644 index 7426a5f..0000000 --- a/typings/numpy/testing/__init__.pyi +++ /dev/null @@ -1,11 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy._pytesttester import PytestTester -from unittest import TestCase as TestCase -from numpy.testing._private.utils import HAS_LAPACK64 as HAS_LAPACK64, HAS_REFCOUNT as HAS_REFCOUNT, IS_PYPY as IS_PYPY, IS_PYSTON as IS_PYSTON, IgnoreException as IgnoreException, KnownFailureException as KnownFailureException, SkipTest as SkipTest, assert_ as assert_, assert_allclose as assert_allclose, assert_almost_equal as assert_almost_equal, assert_approx_equal as assert_approx_equal, assert_array_almost_equal as assert_array_almost_equal, assert_array_almost_equal_nulp as assert_array_almost_equal_nulp, assert_array_compare as assert_array_compare, assert_array_equal as assert_array_equal, assert_array_less as assert_array_less, assert_array_max_ulp as assert_array_max_ulp, assert_equal as assert_equal, assert_no_gc_cycles as assert_no_gc_cycles, assert_no_warnings as assert_no_warnings, assert_raises as assert_raises, assert_raises_regex as assert_raises_regex, assert_string_equal as assert_string_equal, assert_warns as assert_warns, break_cycles as break_cycles, build_err_msg as build_err_msg, clear_and_catch_warnings as clear_and_catch_warnings, decorate_methods as decorate_methods, jiffies as jiffies, measure as measure, memusage as memusage, print_assert_equal as print_assert_equal, rundocs as rundocs, runstring as runstring, suppress_warnings as suppress_warnings, tempdir as tempdir, temppath as temppath, verbose as verbose - -__all__: list[str] -__path__: list[str] -test: PytestTester diff --git a/typings/numpy/testing/_private/utils.pyi b/typings/numpy/testing/_private/utils.pyi deleted file mode 100644 index 4c1b100..0000000 --- a/typings/numpy/testing/_private/utils.pyi +++ /dev/null @@ -1,241 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import os -import sys -import ast -import types -import warnings -import unittest -import contextlib -from re import Pattern -from collections.abc import Callable, Iterable, Sequence -from typing import Any, AnyStr, ClassVar, Final, Literal as L, ParamSpec, SupportsIndex, TypeVar, Union, overload, type_check_only -from numpy import _FloatValue, bool_, number, object_ -from numpy._typing import ArrayLike, DTypeLike, NDArray, _ArrayLikeDT64_co, _ArrayLikeNumber_co, _ArrayLikeObject_co, _ArrayLikeTD64_co - -if sys.version_info >= (3, 10): - ... -else: - ... -_P = ParamSpec("_P") -_T = TypeVar("_T") -_ET = TypeVar("_ET", bound=BaseException) -_FT = TypeVar("_FT", bound=Callable[..., Any]) -_ComparisonFunc = Callable[[NDArray[Any], NDArray[Any]], Union[bool, bool_, number[Any], NDArray[Union[bool_, number[Any], object_]],],] -__all__: list[str] -class KnownFailureException(Exception): - ... - - -class IgnoreException(Exception): - ... - - -class clear_and_catch_warnings(warnings.catch_warnings): - class_modules: ClassVar[tuple[types.ModuleType, ...]] - modules: set[types.ModuleType] - @overload - def __new__(cls, record: L[False] = ..., modules: Iterable[types.ModuleType] = ...) -> _clear_and_catch_warnings_without_records: - ... - - @overload - def __new__(cls, record: L[True], modules: Iterable[types.ModuleType] = ...) -> _clear_and_catch_warnings_with_records: - ... - - @overload - def __new__(cls, record: bool, modules: Iterable[types.ModuleType] = ...) -> clear_and_catch_warnings: - ... - - def __enter__(self) -> None | list[warnings.WarningMessage]: - ... - - def __exit__(self, __exc_type: None | type[BaseException] = ..., __exc_val: None | BaseException = ..., __exc_tb: None | types.TracebackType = ...) -> None: - ... - - - -@type_check_only -class _clear_and_catch_warnings_with_records(clear_and_catch_warnings): - def __enter__(self) -> list[warnings.WarningMessage]: - ... - - - -@type_check_only -class _clear_and_catch_warnings_without_records(clear_and_catch_warnings): - def __enter__(self) -> None: - ... - - - -class suppress_warnings: - log: list[warnings.WarningMessage] - def __init__(self, forwarding_rule: L["always", "module", "once", "location"] = ...) -> None: - ... - - def filter(self, category: type[Warning] = ..., message: str = ..., module: None | types.ModuleType = ...) -> None: - ... - - def record(self, category: type[Warning] = ..., message: str = ..., module: None | types.ModuleType = ...) -> list[warnings.WarningMessage]: - ... - - def __enter__(self: _T) -> _T: - ... - - def __exit__(self, __exc_type: None | type[BaseException] = ..., __exc_val: None | BaseException = ..., __exc_tb: None | types.TracebackType = ...) -> None: - ... - - def __call__(self, func: _FT) -> _FT: - ... - - - -verbose: int -IS_PYPY: Final[bool] -IS_PYSTON: Final[bool] -HAS_REFCOUNT: Final[bool] -HAS_LAPACK64: Final[bool] -def assert_(val: object, msg: str | Callable[[], str] = ...) -> None: - ... - -if sys.platform == "win32" or sys.platform == "cygwin": - ... -else: - def memusage(_proc_pid_stat: str | bytes | os.PathLike[Any] = ...) -> None | int: - ... - -if sys.platform == "linux": - def jiffies(_proc_pid_stat: str | bytes | os.PathLike[Any] = ..., _load_time: list[float] = ...) -> int: - ... - -else: - ... -def build_err_msg(arrays: Iterable[object], err_msg: str, header: str = ..., verbose: bool = ..., names: Sequence[str] = ..., precision: None | SupportsIndex = ...) -> str: - ... - -def assert_equal(actual: object, desired: object, err_msg: str = ..., verbose: bool = ...) -> None: - ... - -def print_assert_equal(test_string: str, actual: object, desired: object) -> None: - ... - -def assert_almost_equal(actual: _ArrayLikeNumber_co | _ArrayLikeObject_co, desired: _ArrayLikeNumber_co | _ArrayLikeObject_co, decimal: int = ..., err_msg: str = ..., verbose: bool = ...) -> None: - ... - -def assert_approx_equal(actual: _FloatValue, desired: _FloatValue, significant: int = ..., err_msg: str = ..., verbose: bool = ...) -> None: - ... - -def assert_array_compare(comparison: _ComparisonFunc, x: ArrayLike, y: ArrayLike, err_msg: str = ..., verbose: bool = ..., header: str = ..., precision: SupportsIndex = ..., equal_nan: bool = ..., equal_inf: bool = ..., *, strict: bool = ...) -> None: - ... - -def assert_array_equal(x: ArrayLike, y: ArrayLike, err_msg: str = ..., verbose: bool = ..., *, strict: bool = ...) -> None: - ... - -def assert_array_almost_equal(x: _ArrayLikeNumber_co | _ArrayLikeObject_co, y: _ArrayLikeNumber_co | _ArrayLikeObject_co, decimal: float = ..., err_msg: str = ..., verbose: bool = ...) -> None: - ... - -@overload -def assert_array_less(x: _ArrayLikeNumber_co | _ArrayLikeObject_co, y: _ArrayLikeNumber_co | _ArrayLikeObject_co, err_msg: str = ..., verbose: bool = ...) -> None: - ... - -@overload -def assert_array_less(x: _ArrayLikeTD64_co, y: _ArrayLikeTD64_co, err_msg: str = ..., verbose: bool = ...) -> None: - ... - -@overload -def assert_array_less(x: _ArrayLikeDT64_co, y: _ArrayLikeDT64_co, err_msg: str = ..., verbose: bool = ...) -> None: - ... - -def runstring(astr: str | bytes | types.CodeType, dict: None | dict[str, Any]) -> Any: - ... - -def assert_string_equal(actual: str, desired: str) -> None: - ... - -def rundocs(filename: None | str | os.PathLike[str] = ..., raise_on_error: bool = ...) -> None: - ... - -def raises(*args: type[BaseException]) -> Callable[[_FT], _FT]: - ... - -@overload -def assert_raises(expected_exception: type[BaseException] | tuple[type[BaseException], ...], callable: Callable[_P, Any], /, *args: _P.args, **kwargs: _P.kwargs) -> None: - ... - -@overload -def assert_raises(expected_exception: type[_ET] | tuple[type[_ET], ...], *, msg: None | str = ...) -> unittest.case._AssertRaisesContext[_ET]: - ... - -@overload -def assert_raises_regex(expected_exception: type[BaseException] | tuple[type[BaseException], ...], expected_regex: str | bytes | Pattern[Any], callable: Callable[_P, Any], /, *args: _P.args, **kwargs: _P.kwargs) -> None: - ... - -@overload -def assert_raises_regex(expected_exception: type[_ET] | tuple[type[_ET], ...], expected_regex: str | bytes | Pattern[Any], *, msg: None | str = ...) -> unittest.case._AssertRaisesContext[_ET]: - ... - -def decorate_methods(cls: type[Any], decorator: Callable[[Callable[..., Any]], Any], testmatch: None | str | bytes | Pattern[Any] = ...) -> None: - ... - -def measure(code_str: str | bytes | ast.mod | ast.AST, times: int = ..., label: None | str = ...) -> float: - ... - -@overload -def assert_allclose(actual: _ArrayLikeNumber_co | _ArrayLikeObject_co, desired: _ArrayLikeNumber_co | _ArrayLikeObject_co, rtol: float = ..., atol: float = ..., equal_nan: bool = ..., err_msg: str = ..., verbose: bool = ...) -> None: - ... - -@overload -def assert_allclose(actual: _ArrayLikeTD64_co, desired: _ArrayLikeTD64_co, rtol: float = ..., atol: float = ..., equal_nan: bool = ..., err_msg: str = ..., verbose: bool = ...) -> None: - ... - -def assert_array_almost_equal_nulp(x: _ArrayLikeNumber_co, y: _ArrayLikeNumber_co, nulp: float = ...) -> None: - ... - -def assert_array_max_ulp(a: _ArrayLikeNumber_co, b: _ArrayLikeNumber_co, maxulp: float = ..., dtype: DTypeLike = ...) -> NDArray[Any]: - ... - -@overload -def assert_warns(warning_class: type[Warning]) -> contextlib._GeneratorContextManager[None]: - ... - -@overload -def assert_warns(warning_class: type[Warning], func: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> _T: - ... - -@overload -def assert_no_warnings() -> contextlib._GeneratorContextManager[None]: - ... - -@overload -def assert_no_warnings(func: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> _T: - ... - -@overload -def tempdir(suffix: None = ..., prefix: None = ..., dir: None = ...) -> contextlib._GeneratorContextManager[str]: - ... - -@overload -def tempdir(suffix: None | AnyStr = ..., prefix: None | AnyStr = ..., dir: None | AnyStr | os.PathLike[AnyStr] = ...) -> contextlib._GeneratorContextManager[AnyStr]: - ... - -@overload -def temppath(suffix: None = ..., prefix: None = ..., dir: None = ..., text: bool = ...) -> contextlib._GeneratorContextManager[str]: - ... - -@overload -def temppath(suffix: None | AnyStr = ..., prefix: None | AnyStr = ..., dir: None | AnyStr | os.PathLike[AnyStr] = ..., text: bool = ...) -> contextlib._GeneratorContextManager[AnyStr]: - ... - -@overload -def assert_no_gc_cycles() -> contextlib._GeneratorContextManager[None]: - ... - -@overload -def assert_no_gc_cycles(func: Callable[_P, Any], /, *args: _P.args, **kwargs: _P.kwargs) -> None: - ... - -def break_cycles() -> None: - ... - diff --git a/typings/numpy/tests/__init__.pyi b/typings/numpy/tests/__init__.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/numpy/tests/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/numpy/typing/__init__.pyi b/typings/numpy/typing/__init__.pyi deleted file mode 100644 index 12f659f..0000000 --- a/typings/numpy/typing/__init__.pyi +++ /dev/null @@ -1,166 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from numpy._typing import ArrayLike, DTypeLike, NBitBase, NDArray -from numpy._typing._add_docstring import _docstrings -from numpy._pytesttester import PytestTester - -""" -============================ -Typing (:mod:`numpy.typing`) -============================ - -.. versionadded:: 1.20 - -Large parts of the NumPy API have :pep:`484`-style type annotations. In -addition a number of type aliases are available to users, most prominently -the two below: - -- `ArrayLike`: objects that can be converted to arrays -- `DTypeLike`: objects that can be converted to dtypes - -.. _typing-extensions: https://pypi.org/project/typing-extensions/ - -Mypy plugin ------------ - -.. versionadded:: 1.21 - -.. automodule:: numpy.typing.mypy_plugin - -.. currentmodule:: numpy.typing - -Differences from the runtime NumPy API --------------------------------------- - -NumPy is very flexible. Trying to describe the full range of -possibilities statically would result in types that are not very -helpful. For that reason, the typed NumPy API is often stricter than -the runtime NumPy API. This section describes some notable -differences. - -ArrayLike -~~~~~~~~~ - -The `ArrayLike` type tries to avoid creating object arrays. For -example, - -.. code-block:: python - - >>> np.array(x**2 for x in range(10)) - array( at ...>, dtype=object) - -is valid NumPy code which will create a 0-dimensional object -array. Type checkers will complain about the above example when using -the NumPy types however. If you really intended to do the above, then -you can either use a ``# type: ignore`` comment: - -.. code-block:: python - - >>> np.array(x**2 for x in range(10)) # type: ignore - -or explicitly type the array like object as `~typing.Any`: - -.. code-block:: python - - >>> from typing import Any - >>> array_like: Any = (x**2 for x in range(10)) - >>> np.array(array_like) - array( at ...>, dtype=object) - -ndarray -~~~~~~~ - -It's possible to mutate the dtype of an array at runtime. For example, -the following code is valid: - -.. code-block:: python - - >>> x = np.array([1, 2]) - >>> x.dtype = np.bool_ - -This sort of mutation is not allowed by the types. Users who want to -write statically typed code should instead use the `numpy.ndarray.view` -method to create a view of the array with a different dtype. - -DTypeLike -~~~~~~~~~ - -The `DTypeLike` type tries to avoid creation of dtype objects using -dictionary of fields like below: - -.. code-block:: python - - >>> x = np.dtype({"field1": (float, 1), "field2": (int, 3)}) - -Although this is valid NumPy code, the type checker will complain about it, -since its usage is discouraged. -Please see : :ref:`Data type objects ` - -Number precision -~~~~~~~~~~~~~~~~ - -The precision of `numpy.number` subclasses is treated as a covariant generic -parameter (see :class:`~NBitBase`), simplifying the annotating of processes -involving precision-based casting. - -.. code-block:: python - - >>> from typing import TypeVar - >>> import numpy as np - >>> import numpy.typing as npt - - >>> T = TypeVar("T", bound=npt.NBitBase) - >>> def func(a: "np.floating[T]", b: "np.floating[T]") -> "np.floating[T]": - ... ... - -Consequently, the likes of `~numpy.float16`, `~numpy.float32` and -`~numpy.float64` are still sub-types of `~numpy.floating`, but, contrary to -runtime, they're not necessarily considered as sub-classes. - -Timedelta64 -~~~~~~~~~~~ - -The `~numpy.timedelta64` class is not considered a subclass of -`~numpy.signedinteger`, the former only inheriting from `~numpy.generic` -while static type checking. - -0D arrays -~~~~~~~~~ - -During runtime numpy aggressively casts any passed 0D arrays into their -corresponding `~numpy.generic` instance. Until the introduction of shape -typing (see :pep:`646`) it is unfortunately not possible to make the -necessary distinction between 0D and >0D arrays. While thus not strictly -correct, all operations are that can potentially perform a 0D-array -> scalar -cast are currently annotated as exclusively returning an `ndarray`. - -If it is known in advance that an operation _will_ perform a -0D-array -> scalar cast, then one can consider manually remedying the -situation with either `typing.cast` or a ``# type: ignore`` comment. - -Record array dtypes -~~~~~~~~~~~~~~~~~~~ - -The dtype of `numpy.recarray`, and the `numpy.rec` functions in general, -can be specified in one of two ways: - -* Directly via the ``dtype`` argument. -* With up to five helper arguments that operate via `numpy.format_parser`: - ``formats``, ``names``, ``titles``, ``aligned`` and ``byteorder``. - -These two approaches are currently typed as being mutually exclusive, -*i.e.* if ``dtype`` is specified than one may not specify ``formats``. -While this mutual exclusivity is not (strictly) enforced during runtime, -combining both dtype specifiers can lead to unexpected or even downright -buggy behavior. - -API ---- - -""" -__all__ = ["ArrayLike", "DTypeLike", "NBitBase", "NDArray"] -if __doc__ is not None: - ... -test = ... diff --git a/typings/numpy/version.pyi b/typings/numpy/version.pyi deleted file mode 100644 index 4d3d54f..0000000 --- a/typings/numpy/version.pyi +++ /dev/null @@ -1,10 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -version = ... -__version__ = ... -full_version = ... -git_revision = ... -release = ... -short_version = ... diff --git a/typings/seaborn/__init__.pyi b/typings/seaborn/__init__.pyi deleted file mode 100644 index 646fb7c..0000000 --- a/typings/seaborn/__init__.pyi +++ /dev/null @@ -1,21 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib as mpl -from .rcmod import * -from .utils import * -from .palettes import * -from .relational import * -from .regression import * -from .categorical import * -from .distributions import * -from .matrix import * -from .miscplot import * -from .axisgrid import * -from .widgets import * -from .colors import crayons, xkcd_rgb -from . import cm - -_orig_rc_params = ... -__version__ = ... diff --git a/typings/seaborn/_core.pyi b/typings/seaborn/_core.pyi deleted file mode 100644 index ca4b046..0000000 --- a/typings/seaborn/_core.pyi +++ /dev/null @@ -1,275 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._decorators import share_init_params_with_map - -class SemanticMapping: - """Base class for mapping data values to plot attributes.""" - map_type = ... - levels = ... - lookup_table = ... - def __init__(self, plotter) -> None: - ... - - def map(cls, plotter, *args, **kwargs): - ... - - def __call__(self, key, *args, **kwargs): # -> list[Unknown]: - """Get the attribute(s) values for the data key.""" - ... - - - -@share_init_params_with_map -class HueMapping(SemanticMapping): - """Mapping that sets artist colors according to data values.""" - palette = ... - norm = ... - cmap = ... - def __init__(self, plotter, palette=..., order=..., norm=...) -> None: - """Map the levels of the `hue` variable to distinct colors. - - Parameters - ---------- - # TODO add generic parameters - - """ - ... - - def infer_map_type(self, palette, norm, input_format, var_type): # -> Literal['categorical', 'numeric']: - """Determine how to implement the mapping.""" - ... - - def categorical_mapping(self, data, palette, order): # -> tuple[list[Any], dict[Unknown, Unknown] | dict[Any, str | tuple[float, float, float]]]: - """Determine colors when the hue mapping is categorical.""" - ... - - def numeric_mapping(self, data, palette, norm): # -> tuple[list[Unknown] | list[Any], dict[Unknown, Unknown], Unknown, Unknown | _ColorPalette | list[tuple[float, float, float]] | Any | list[str] | Literal['ch:']]: - """Determine colors when the hue variable is quantitative.""" - ... - - - -@share_init_params_with_map -class SizeMapping(SemanticMapping): - """Mapping that sets artist sizes according to data values.""" - norm = ... - def __init__(self, plotter, sizes=..., order=..., norm=...) -> None: - """Map the levels of the `size` variable to distinct values. - - Parameters - ---------- - # TODO add generic parameters - - """ - ... - - def infer_map_type(self, norm, sizes, var_type): # -> Literal['numeric', 'categorical']: - ... - - def categorical_mapping(self, data, sizes, order): # -> tuple[list[Any], dict[Unknown, Unknown] | dict[Any, Unknown]]: - ... - - def numeric_mapping(self, data, sizes, norm): # -> tuple[list[Any], dict[Unknown, Unknown] | dict[Any, Unknown], Unknown]: - ... - - - -@share_init_params_with_map -class StyleMapping(SemanticMapping): - """Mapping that sets artist style according to data values.""" - map_type = ... - def __init__(self, plotter, markers=..., dashes=..., order=...) -> None: - """Map the levels of the `style` variable to distinct values. - - Parameters - ---------- - # TODO add generic parameters - - """ - ... - - - -class VectorPlotter: - """Base class for objects underlying *plot functions.""" - _semantic_mappings = ... - semantics = ... - wide_structure = ... - flat_structure = ... - _default_size_range = ... - def __init__(self, data=..., variables=...) -> None: - ... - - @classmethod - def get_semantics(cls, kwargs, semantics=...): # -> dict[Unknown, Unknown]: - """Subset a dictionary` arguments with known semantic variables.""" - ... - - @property - def has_xy_data(self): # -> bool: - """Return True at least one of x or y is defined.""" - ... - - @property - def var_levels(self): # -> dict[Unknown, Unknown]: - """Property interface to ordered list of variables levels. - - Each time it's accessed, it updates the var_levels dictionary with the - list of levels in the current semantic mappers. But it also allows the - dictionary to persist, so it can be used to set levels by a key. This is - used to track the list of col/row levels using an attached FacetGrid - object, but it's kind of messy and ideally fixed by improving the - faceting logic so it interfaces better with the modern approach to - tracking plot variables. - - """ - ... - - def assign_variables(self, data=..., variables=...): # -> Self@VectorPlotter: - """Define plot variables, optionally using lookup from `data`.""" - ... - - def iter_data(self, grouping_vars=..., reverse=..., from_comp_data=...): # -> Generator[tuple[dict[str | Unknown, Any], DataFrame | Series | Unknown] | tuple[dict[Unknown, Unknown], DataFrame | Unknown], Any, None]: - """Generator for getting subsets of data defined by semantic variables. - - Also injects "col" and "row" into grouping semantics. - - Parameters - ---------- - grouping_vars : string or list of strings - Semantic variables that define the subsets of data. - reverse : bool, optional - If True, reverse the order of iteration. - from_comp_data : bool, optional - If True, use self.comp_data rather than self.plot_data - - Yields - ------ - sub_vars : dict - Keys are semantic names, values are the level of that semantic. - sub_data : :class:`pandas.DataFrame` - Subset of ``plot_data`` for this combination of semantic values. - - """ - ... - - @property - def comp_data(self): # -> DataFrame: - """Dataframe with numeric x and y, after unit conversion and log scaling.""" - ... - - - -def variable_type(vector, boolean_type=...): # -> str: - """ - Determine whether a vector contains numeric, categorical, or datetime data. - - This function differs from the pandas typing API in two ways: - - - Python sequences or object-typed PyData objects are considered numeric if - all of their entries are numeric. - - String or mixed-type data are considered categorical even if not - explicitly represented as a :class:`pandas.api.types.CategoricalDtype`. - - Parameters - ---------- - vector : :func:`pandas.Series`, :func:`numpy.ndarray`, or Python sequence - Input data to test. - boolean_type : 'numeric' or 'categorical' - Type to use for vectors containing only 0s and 1s (and NAs). - - Returns - ------- - var_type : 'numeric', 'categorical', or 'datetime' - Name identifying the type of data in the vector. - """ - ... - -def infer_orient(x=..., y=..., orient=..., require_numeric=...): # -> Literal['v', 'h']: - """Determine how the plot should be oriented based on the data. - - For historical reasons, the convention is to call a plot "horizontally" - or "vertically" oriented based on the axis representing its dependent - variable. Practically, this is used when determining the axis for - numerical aggregation. - - Paramters - --------- - x, y : Vector data or None - Positional data vectors for the plot. - orient : string or None - Specified orientation, which must start with "v" or "h" if not None. - require_numeric : bool - If set, raise when the implied dependent variable is not numeric. - - Returns - ------- - orient : "v" or "h" - - Raises - ------ - ValueError: When `orient` is not None and does not start with "h" or "v" - TypeError: When dependant variable is not numeric, with `require_numeric` - - """ - ... - -def unique_dashes(n): # -> list[Unknown]: - """Build an arbitrarily long list of unique dash styles for lines. - - Parameters - ---------- - n : int - Number of unique dash specs to generate. - - Returns - ------- - dashes : list of strings or tuples - Valid arguments for the ``dashes`` parameter on - :class:`matplotlib.lines.Line2D`. The first spec is a solid - line (``""``), the remainder are sequences of long and short - dashes. - - """ - ... - -def unique_markers(n): # -> list[Unknown]: - """Build an arbitrarily long list of unique marker styles for points. - - Parameters - ---------- - n : int - Number of unique marker specs to generate. - - Returns - ------- - markers : list of string or tuples - Values for defining :class:`matplotlib.markers.MarkerStyle` objects. - All markers will be filled. - - """ - ... - -def categorical_order(vector, order=...): # -> list[Any]: - """Return a list of unique data values. - - Determine an ordered list of levels in ``values``. - - Parameters - ---------- - vector : list, array, Categorical, or Series - Vector of "categorical" values - order : list-like, optional - Desired order of category levels to override the order determined - from the ``values`` object. - - Returns - ------- - order : list - Ordered list of category levels not including null values. - - """ - ... - diff --git a/typings/seaborn/_decorators.pyi b/typings/seaborn/_decorators.pyi deleted file mode 100644 index f411dc4..0000000 --- a/typings/seaborn/_decorators.pyi +++ /dev/null @@ -1,8 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -def share_init_params_with_map(cls): - """Make cls.map a classmethod with same signature as cls.__init__.""" - ... - diff --git a/typings/seaborn/_docstrings.pyi b/typings/seaborn/_docstrings.pyi deleted file mode 100644 index cbeee67..0000000 --- a/typings/seaborn/_docstrings.pyi +++ /dev/null @@ -1,30 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -class DocstringComponents: - regexp = ... - def __init__(self, comp_dict, strip_whitespace=...) -> None: - """Read entries from a dict, optionally stripping outer whitespace.""" - ... - - def __getattr__(self, attr): # -> Any: - """Provided dot access to entries.""" - ... - - @classmethod - def from_nested_components(cls, **kwargs): # -> Self@DocstringComponents: - """Add multiple sub-sets of components.""" - ... - - @classmethod - def from_function_params(cls, func): # -> Self@DocstringComponents: - """Use the numpydoc parser to extract components from existing func.""" - ... - - - -_core_params = ... -_core_returns = ... -_seealso_blurbs = ... -_core_docs = ... diff --git a/typings/seaborn/_statistics.pyi b/typings/seaborn/_statistics.pyi deleted file mode 100644 index 5471d4b..0000000 --- a/typings/seaborn/_statistics.pyi +++ /dev/null @@ -1,132 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -"""Statistical transformations for visualization. - -This module is currently private, but is being written to eventually form part -of the public API. - -The classes should behave roughly in the style of scikit-learn. - -- All data-independent parameters should be passed to the class constructor. -- Each class should impelment a default transformation that is exposed through - __call__. These are currently written for vector arguements, but I think - consuming a whole `plot_data` DataFrame and return it with transformed - variables would make more sense. -- Some class have data-dependent preprocessing that should be cached and used - multiple times (think defining histogram bins off all data and then counting - observations within each bin multiple times per data subsets). These currently - have unique names, but it would be good to have a common name. Not quite - `fit`, but something similar. -- Alternatively, the transform interface could take some information about grouping - variables and do a groupby internally. -- Some classes should define alternate transforms that might make the most sense - with a different function. For example, KDE usually evaluates the distribution - on a regular grid, but it would be useful for it to transform at the actual - datapoints. Then again, this could be controlled by a parameter at the time of - class instantiation. - -""" -class KDE: - """Univariate and bivariate kernel density estimator.""" - def __init__(self, *, bw_method=..., bw_adjust=..., gridsize=..., cut=..., clip=..., cumulative=...) -> None: - """Initialize the estimator with its parameters. - - Parameters - ---------- - bw_method : string, scalar, or callable, optional - Method for determining the smoothing bandwidth to use; passed to - :class:`scipy.stats.gaussian_kde`. - bw_adjust : number, optional - Factor that multiplicatively scales the value chosen using - ``bw_method``. Increasing will make the curve smoother. See Notes. - gridsize : int, optional - Number of points on each dimension of the evaluation grid. - cut : number, optional - Factor, multiplied by the smoothing bandwidth, that determines how - far the evaluation grid extends past the extreme datapoints. When - set to 0, truncate the curve at the data limits. - clip : pair of numbers None, or a pair of such pairs - Do not evaluate the density outside of these limits. - cumulative : bool, optional - If True, estimate a cumulative distribution function. - - """ - ... - - def define_support(self, x1, x2=..., weights=..., cache=...): # -> NDArray[floating[Any]] | tuple[NDArray[floating[Any]], NDArray[floating[Any]]]: - """Create the evaluation grid for a given data set.""" - ... - - def __call__(self, x1, x2=..., weights=...): # -> tuple[NDArray[Unknown] | Unknown, NDArray[floating[Any]] | tuple[NDArray[floating[Any]], NDArray[floating[Any]]]] | tuple[NDArray[float64] | Unknown, NDArray[floating[Any]] | tuple[NDArray[floating[Any]], NDArray[floating[Any]]]]: - """Fit and evaluate on univariate or bivariate data.""" - ... - - - -class Histogram: - """Univariate and bivariate histogram estimator.""" - def __init__(self, stat=..., bins=..., binwidth=..., binrange=..., discrete=..., cumulative=...) -> None: - """Initialize the estimator with its parameters. - - Parameters - ---------- - stat : {"count", "frequency", "density", "probability"} - Aggregate statistic to compute in each bin. - - - ``count`` shows the number of observations - - ``frequency`` shows the number of observations divided by the bin width - - ``density`` normalizes counts so that the area of the histogram is 1 - - ``probability`` normalizes counts so that the sum of the bar heights is 1 - - bins : str, number, vector, or a pair of such values - Generic bin parameter that can be the name of a reference rule, - the number of bins, or the breaks of the bins. - Passed to :func:`numpy.histogram_bin_edges`. - binwidth : number or pair of numbers - Width of each bin, overrides ``bins`` but can be used with - ``binrange``. - binrange : pair of numbers or a pair of pairs - Lowest and highest value for bin edges; can be used either - with ``bins`` or ``binwidth``. Defaults to data extremes. - discrete : bool or pair of bools - If True, set ``binwidth`` and ``binrange`` such that bin - edges cover integer values in the dataset. - cumulative : bool - If True, return the cumulative statistic. - - """ - ... - - def define_bin_edges(self, x1, x2=..., weights=..., cache=...): # -> NDArray[Any] | tuple[Unknown, ...]: - """Given data, return the edges of the histogram bins.""" - ... - - def __call__(self, x1, x2=..., weights=...): # -> tuple[Any | ndarray[Any, Any] | NDArray[float64] | NDArray[Any], Unknown | NDArray[Any] | tuple[Unknown, ...]] | tuple[Unknown, Unknown | NDArray[Any] | tuple[Unknown, ...]]: - """Count the occurrances in each bin, maybe normalize.""" - ... - - - -class ECDF: - """Univariate empirical cumulative distribution estimator.""" - def __init__(self, stat=..., complementary=...) -> None: - """Initialize the class with its paramters - - Parameters - ---------- - stat : {{"proportion", "count"}} - Distribution statistic to compute. - complementary : bool - If True, use the complementary CDF (1 - CDF) - - """ - ... - - def __call__(self, x1, x2=..., weights=...): # -> tuple[Any, Any]: - """Return proportion or count of observations below each sorted datapoint.""" - ... - - - diff --git a/typings/seaborn/_testing.pyi b/typings/seaborn/_testing.pyi deleted file mode 100644 index 71299a2..0000000 --- a/typings/seaborn/_testing.pyi +++ /dev/null @@ -1,16 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -LINE_PROPS = ... -COLLECTION_PROPS = ... -BAR_PROPS = ... -def assert_artists_equal(list1, list2, properties): # -> None: - ... - -def assert_legends_equal(leg1, leg2): # -> None: - ... - -def assert_plots_equal(ax1, ax2, labels=...): # -> None: - ... - diff --git a/typings/seaborn/algorithms.pyi b/typings/seaborn/algorithms.pyi deleted file mode 100644 index fee7dc3..0000000 --- a/typings/seaborn/algorithms.pyi +++ /dev/null @@ -1,35 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -"""Algorithms to support fitting routines in seaborn plotting functions.""" -def bootstrap(*args, **kwargs): # -> NDArray[Unknown]: - """Resample one or more arrays with replacement and store aggregate values. - - Positional arguments are a sequence of arrays to bootstrap along the first - axis and pass to a summary function. - - Keyword arguments: - n_boot : int, default 10000 - Number of iterations - axis : int, default None - Will pass axis to ``func`` as a keyword argument. - units : array, default None - Array of sampling unit IDs. When used the bootstrap resamples units - and then observations within units instead of individual - datapoints. - func : string or callable, default np.mean - Function to call on the args that are passed in. If string, tries - to use as named method on numpy array. - seed : Generator | SeedSequence | RandomState | int | None - Seed for the random number generator; useful if you want - reproducible resamples. - - Returns - ------- - boot_dist: array - array of bootstrapped statistic values - - """ - ... - diff --git a/typings/seaborn/axisgrid.pyi b/typings/seaborn/axisgrid.pyi deleted file mode 100644 index 87880c3..0000000 --- a/typings/seaborn/axisgrid.pyi +++ /dev/null @@ -1,548 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._decorators import _deprecate_positional_args - -__all__ = ["FacetGrid", "PairGrid", "JointGrid", "pairplot", "jointplot"] -_param_docs = ... -class Grid: - """Base class for grids of subplots.""" - _margin_titles = ... - _legend_out = ... - def __init__(self) -> None: - ... - - def set(self, **kwargs): # -> Self@Grid: - """Set attributes on each subplot Axes.""" - ... - - def savefig(self, *args, **kwargs): # -> None: - """Save the figure.""" - ... - - def tight_layout(self, *args, **kwargs): # -> None: - """Call fig.tight_layout within rect that exclude the legend.""" - ... - - def add_legend(self, legend_data=..., title=..., label_order=..., adjust_subtitles=..., **kwargs): # -> Self@Grid: - """Draw a legend, maybe placing it outside axes and resizing the figure. - - Parameters - ---------- - legend_data : dict - Dictionary mapping label names (or two-element tuples where the - second element is a label name) to matplotlib artist handles. The - default reads from ``self._legend_data``. - title : string - Title for the legend. The default reads from ``self._hue_var``. - label_order : list of labels - The order that the legend entries should appear in. The default - reads from ``self.hue_names``. - adjust_subtitles : bool - If True, modify entries with invisible artists to left-align - the labels and set the font size to that of a title. - kwargs : key, value pairings - Other keyword arguments are passed to the underlying legend methods - on the Figure or Axes object. - - Returns - ------- - self : Grid instance - Returns self for easy chaining. - - """ - ... - - @property - def legend(self): # -> None: - """The :class:`matplotlib.legend.Legend` object, if present.""" - ... - - - -_facet_docs = ... -class FacetGrid(Grid): - """Multi-plot grid for plotting conditional relationships.""" - @_deprecate_positional_args - def __init__(self, data, *, row=..., col=..., hue=..., col_wrap=..., sharex=..., sharey=..., height=..., aspect=..., palette=..., row_order=..., col_order=..., hue_order=..., hue_kws=..., dropna=..., legend_out=..., despine=..., margin_titles=..., xlim=..., ylim=..., subplot_kws=..., gridspec_kws=..., size=...) -> None: - ... - - def facet_data(self): # -> Generator[tuple[tuple[int, int, int], Unknown], Any, None]: - """Generator for name indices and data subsets for each facet. - - Yields - ------ - (i, j, k), data_ijk : tuple of ints, DataFrame - The ints provide an index into the {row, col, hue}_names attribute, - and the dataframe contains a subset of the full data corresponding - to each facet. The generator yields subsets that correspond with - the self.axes.flat iterator, or self.axes[i, j] when `col_wrap` - is None. - - """ - ... - - def map(self, func, *args, **kwargs): # -> Self@FacetGrid: - """Apply a plotting function to each facet's subset of the data. - - Parameters - ---------- - func : callable - A plotting function that takes data and keyword arguments. It - must plot to the currently active matplotlib Axes and take a - `color` keyword argument. If faceting on the `hue` dimension, - it must also take a `label` keyword argument. - args : strings - Column names in self.data that identify variables with data to - plot. The data for each variable is passed to `func` in the - order the variables are specified in the call. - kwargs : keyword arguments - All keyword arguments are passed to the plotting function. - - Returns - ------- - self : object - Returns self. - - """ - ... - - def map_dataframe(self, func, *args, **kwargs): # -> Self@FacetGrid: - """Like ``.map`` but passes args as strings and inserts data in kwargs. - - This method is suitable for plotting with functions that accept a - long-form DataFrame as a `data` keyword argument and access the - data in that DataFrame using string variable names. - - Parameters - ---------- - func : callable - A plotting function that takes data and keyword arguments. Unlike - the `map` method, a function used here must "understand" Pandas - objects. It also must plot to the currently active matplotlib Axes - and take a `color` keyword argument. If faceting on the `hue` - dimension, it must also take a `label` keyword argument. - args : strings - Column names in self.data that identify variables with data to - plot. The data for each variable is passed to `func` in the - order the variables are specified in the call. - kwargs : keyword arguments - All keyword arguments are passed to the plotting function. - - Returns - ------- - self : object - Returns self. - - """ - ... - - def facet_axis(self, row_i, col_j, modify_state=...): # -> Any | ndarray[Any, dtype[Any]]: - """Make the axis identified by these indices active and return it.""" - ... - - def despine(self, **kwargs): # -> Self@FacetGrid: - """Remove axis spines from the facets.""" - ... - - def set_axis_labels(self, x_var=..., y_var=..., clear_inner=..., **kwargs): # -> Self@FacetGrid: - """Set axis labels on the left column and bottom row of the grid.""" - ... - - def set_xlabels(self, label=..., clear_inner=..., **kwargs): # -> Self@FacetGrid: - """Label the x axis on the bottom row of the grid.""" - ... - - def set_ylabels(self, label=..., clear_inner=..., **kwargs): # -> Self@FacetGrid: - """Label the y axis on the left column of the grid.""" - ... - - def set_xticklabels(self, labels=..., step=..., **kwargs): # -> Self@FacetGrid: - """Set x axis tick labels of the grid.""" - ... - - def set_yticklabels(self, labels=..., **kwargs): # -> Self@FacetGrid: - """Set y axis tick labels on the left column of the grid.""" - ... - - def set_titles(self, template=..., row_template=..., col_template=..., **kwargs): # -> Self@FacetGrid: - """Draw titles either above each facet or on the grid margins. - - Parameters - ---------- - template : string - Template for all titles with the formatting keys {col_var} and - {col_name} (if using a `col` faceting variable) and/or {row_var} - and {row_name} (if using a `row` faceting variable). - row_template: - Template for the row variable when titles are drawn on the grid - margins. Must have {row_var} and {row_name} formatting keys. - col_template: - Template for the row variable when titles are drawn on the grid - margins. Must have {col_var} and {col_name} formatting keys. - - Returns - ------- - self: object - Returns self. - - """ - ... - - @property - def fig(self): # -> Figure: - """The :class:`matplotlib.figure.Figure` with the plot.""" - ... - - @property - def axes(self): # -> Any | NDArray[Any]: - """An array of the :class:`matplotlib.axes.Axes` objects in the grid.""" - ... - - @property - def ax(self): # -> Any: - """The :class:`matplotlib.axes.Axes` when no faceting variables are assigned.""" - ... - - @property - def axes_dict(self): # -> dict[Any, Any] | dict[tuple[Any, Any], Any]: - """A mapping of facet names to corresponding :class:`matplotlib.axes.Axes`. - - If only one of ``row`` or ``col`` is assigned, each key is a string - representing a level of that variable. If both facet dimensions are - assigned, each key is a ``({row_level}, {col_level})`` tuple. - - """ - ... - - - -class PairGrid(Grid): - """Subplot grid for plotting pairwise relationships in a dataset. - - This object maps each variable in a dataset onto a column and row in a - grid of multiple axes. Different axes-level plotting functions can be - used to draw bivariate plots in the upper and lower triangles, and the - the marginal distribution of each variable can be shown on the diagonal. - - Several different common plots can be generated in a single line using - :func:`pairplot`. Use :class:`PairGrid` when you need more flexibility. - - See the :ref:`tutorial ` for more information. - - """ - @_deprecate_positional_args - def __init__(self, data, *, hue=..., hue_order=..., palette=..., hue_kws=..., vars=..., x_vars=..., y_vars=..., corner=..., diag_sharey=..., height=..., aspect=..., layout_pad=..., despine=..., dropna=..., size=...) -> None: - """Initialize the plot figure and PairGrid object. - - Parameters - ---------- - data : DataFrame - Tidy (long-form) dataframe where each column is a variable and - each row is an observation. - hue : string (variable name) - Variable in ``data`` to map plot aspects to different colors. This - variable will be excluded from the default x and y variables. - hue_order : list of strings - Order for the levels of the hue variable in the palette - palette : dict or seaborn color palette - Set of colors for mapping the ``hue`` variable. If a dict, keys - should be values in the ``hue`` variable. - hue_kws : dictionary of param -> list of values mapping - Other keyword arguments to insert into the plotting call to let - other plot attributes vary across levels of the hue variable (e.g. - the markers in a scatterplot). - vars : list of variable names - Variables within ``data`` to use, otherwise use every column with - a numeric datatype. - {x, y}_vars : lists of variable names - Variables within ``data`` to use separately for the rows and - columns of the figure; i.e. to make a non-square plot. - corner : bool - If True, don't add axes to the upper (off-diagonal) triangle of the - grid, making this a "corner" plot. - height : scalar - Height (in inches) of each facet. - aspect : scalar - Aspect * height gives the width (in inches) of each facet. - layout_pad : scalar - Padding between axes; passed to ``fig.tight_layout``. - despine : boolean - Remove the top and right spines from the plots. - dropna : boolean - Drop missing values from the data before plotting. - - See Also - -------- - pairplot : Easily drawing common uses of :class:`PairGrid`. - FacetGrid : Subplot grid for plotting conditional relationships. - - Examples - -------- - - .. include:: ../docstrings/PairGrid.rst - - """ - ... - - def map(self, func, **kwargs): # -> Self@PairGrid: - """Plot with the same function in every subplot. - - Parameters - ---------- - func : callable plotting function - Must take x, y arrays as positional arguments and draw onto the - "currently active" matplotlib Axes. Also needs to accept kwargs - called ``color`` and ``label``. - - """ - ... - - def map_lower(self, func, **kwargs): # -> Self@PairGrid: - """Plot with a bivariate function on the lower diagonal subplots. - - Parameters - ---------- - func : callable plotting function - Must take x, y arrays as positional arguments and draw onto the - "currently active" matplotlib Axes. Also needs to accept kwargs - called ``color`` and ``label``. - - """ - ... - - def map_upper(self, func, **kwargs): # -> Self@PairGrid: - """Plot with a bivariate function on the upper diagonal subplots. - - Parameters - ---------- - func : callable plotting function - Must take x, y arrays as positional arguments and draw onto the - "currently active" matplotlib Axes. Also needs to accept kwargs - called ``color`` and ``label``. - - """ - ... - - def map_offdiag(self, func, **kwargs): # -> Self@PairGrid: - """Plot with a bivariate function on the off-diagonal subplots. - - Parameters - ---------- - func : callable plotting function - Must take x, y arrays as positional arguments and draw onto the - "currently active" matplotlib Axes. Also needs to accept kwargs - called ``color`` and ``label``. - - """ - ... - - def map_diag(self, func, **kwargs): # -> Self@PairGrid: - """Plot with a univariate function on each diagonal subplot. - - Parameters - ---------- - func : callable plotting function - Must take an x array as a positional argument and draw onto the - "currently active" matplotlib Axes. Also needs to accept kwargs - called ``color`` and ``label``. - - """ - ... - - - -class JointGrid: - """Grid for drawing a bivariate plot with marginal univariate plots. - - Many plots can be drawn by using the figure-level interface :func:`jointplot`. - Use this class directly when you need more flexibility. - - """ - @_deprecate_positional_args - def __init__(self, *, x=..., y=..., data=..., height=..., ratio=..., space=..., dropna=..., xlim=..., ylim=..., size=..., marginal_ticks=..., hue=..., palette=..., hue_order=..., hue_norm=...) -> None: - ... - - def plot(self, joint_func, marginal_func, **kwargs): # -> Self@JointGrid: - """Draw the plot by passing functions for joint and marginal axes. - - This method passes the ``kwargs`` dictionary to both functions. If you - need more control, call :meth:`JointGrid.plot_joint` and - :meth:`JointGrid.plot_marginals` directly with specific parameters. - - Parameters - ---------- - joint_func, marginal_func: callables - Functions to draw the bivariate and univariate plots. See methods - referenced above for information about the required characteristics - of these functions. - kwargs - Additional keyword arguments are passed to both functions. - - Returns - ------- - :class:`JointGrid` instance - Returns ``self`` for easy method chaining. - - """ - ... - - def plot_joint(self, func, **kwargs): # -> Self@JointGrid: - """Draw a bivariate plot on the joint axes of the grid. - - Parameters - ---------- - func : plotting callable - If a seaborn function, it should accept ``x`` and ``y``. Otherwise, - it must accept ``x`` and ``y`` vectors of data as the first two - positional arguments, and it must plot on the "current" axes. - If ``hue`` was defined in the class constructor, the function must - accept ``hue`` as a parameter. - kwargs - Keyword argument are passed to the plotting function. - - Returns - ------- - :class:`JointGrid` instance - Returns ``self`` for easy method chaining. - - """ - ... - - def plot_marginals(self, func, **kwargs): # -> Self@JointGrid: - """Draw univariate plots on each marginal axes. - - Parameters - ---------- - func : plotting callable - If a seaborn function, it should accept ``x`` and ``y`` and plot - when only one of them is defined. Otherwise, it must accept a vector - of data as the first positional argument and determine its orientation - using the ``vertical`` parameter, and it must plot on the "current" axes. - If ``hue`` was defined in the class constructor, it must accept ``hue`` - as a parameter. - kwargs - Keyword argument are passed to the plotting function. - - Returns - ------- - :class:`JointGrid` instance - Returns ``self`` for easy method chaining. - - """ - ... - - def set_axis_labels(self, xlabel=..., ylabel=..., **kwargs): # -> Self@JointGrid: - """Set axis labels on the bivariate axes. - - Parameters - ---------- - xlabel, ylabel : strings - Label names for the x and y variables. - kwargs : key, value mappings - Other keyword arguments are passed to the following functions: - - - :meth:`matplotlib.axes.Axes.set_xlabel` - - :meth:`matplotlib.axes.Axes.set_ylabel` - - Returns - ------- - :class:`JointGrid` instance - Returns ``self`` for easy method chaining. - - """ - ... - - def savefig(self, *args, **kwargs): # -> None: - """Save the figure using a "tight" bounding box by default. - - Wraps :meth:`matplotlib.figure.Figure.savefig`. - - """ - ... - - - -@_deprecate_positional_args -def pairplot(data, *, hue=..., hue_order=..., palette=..., vars=..., x_vars=..., y_vars=..., kind=..., diag_kind=..., markers=..., height=..., aspect=..., corner=..., dropna=..., plot_kws=..., diag_kws=..., grid_kws=..., size=...): - """Plot pairwise relationships in a dataset. - - By default, this function will create a grid of Axes such that each numeric - variable in ``data`` will by shared across the y-axes across a single row and - the x-axes across a single column. The diagonal plots are treated - differently: a univariate distribution plot is drawn to show the marginal - distribution of the data in each column. - - It is also possible to show a subset of variables or plot different - variables on the rows and columns. - - This is a high-level interface for :class:`PairGrid` that is intended to - make it easy to draw a few common styles. You should use :class:`PairGrid` - directly if you need more flexibility. - - Parameters - ---------- - data : `pandas.DataFrame` - Tidy (long-form) dataframe where each column is a variable and - each row is an observation. - hue : name of variable in ``data`` - Variable in ``data`` to map plot aspects to different colors. - hue_order : list of strings - Order for the levels of the hue variable in the palette - palette : dict or seaborn color palette - Set of colors for mapping the ``hue`` variable. If a dict, keys - should be values in the ``hue`` variable. - vars : list of variable names - Variables within ``data`` to use, otherwise use every column with - a numeric datatype. - {x, y}_vars : lists of variable names - Variables within ``data`` to use separately for the rows and - columns of the figure; i.e. to make a non-square plot. - kind : {'scatter', 'kde', 'hist', 'reg'} - Kind of plot to make. - diag_kind : {'auto', 'hist', 'kde', None} - Kind of plot for the diagonal subplots. If 'auto', choose based on - whether or not ``hue`` is used. - markers : single matplotlib marker code or list - Either the marker to use for all scatterplot points or a list of markers - with a length the same as the number of levels in the hue variable so that - differently colored points will also have different scatterplot - markers. - height : scalar - Height (in inches) of each facet. - aspect : scalar - Aspect * height gives the width (in inches) of each facet. - corner : bool - If True, don't add axes to the upper (off-diagonal) triangle of the - grid, making this a "corner" plot. - dropna : boolean - Drop missing values from the data before plotting. - {plot, diag, grid}_kws : dicts - Dictionaries of keyword arguments. ``plot_kws`` are passed to the - bivariate plotting function, ``diag_kws`` are passed to the univariate - plotting function, and ``grid_kws`` are passed to the :class:`PairGrid` - constructor. - - Returns - ------- - grid : :class:`PairGrid` - Returns the underlying :class:`PairGrid` instance for further tweaking. - - See Also - -------- - PairGrid : Subplot grid for more flexible plotting of pairwise relationships. - JointGrid : Grid for plotting joint and marginal distributions of two variables. - - Examples - -------- - - .. include:: ../docstrings/pairplot.rst - - """ - ... - -@_deprecate_positional_args -def jointplot(*, x=..., y=..., data=..., kind=..., color=..., height=..., ratio=..., space=..., dropna=..., xlim=..., ylim=..., marginal_ticks=..., joint_kws=..., marginal_kws=..., hue=..., palette=..., hue_order=..., hue_norm=..., **kwargs): - ... - diff --git a/typings/seaborn/categorical.pyi b/typings/seaborn/categorical.pyi deleted file mode 100644 index c4fbe74..0000000 --- a/typings/seaborn/categorical.pyi +++ /dev/null @@ -1,312 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._decorators import _deprecate_positional_args - -__all__ = ["catplot", "factorplot", "stripplot", "swarmplot", "boxplot", "violinplot", "boxenplot", "pointplot", "barplot", "countplot"] -class _CategoricalPlotter: - width = ... - default_palette = ... - require_numeric = ... - def establish_variables(self, x=..., y=..., hue=..., data=..., orient=..., order=..., hue_order=..., units=...): - """Convert input specification into a common representation.""" - ... - - def establish_colors(self, color, palette, saturation): # -> None: - """Get a list of colors for the main component of the plots.""" - ... - - @property - def hue_offsets(self): # -> Any | NDArray[float64]: - """A list of center positions for plots when hue nesting is used.""" - ... - - @property - def nested_width(self): # -> float: - """A float with the width of plot elements when hue nesting is used.""" - ... - - def annotate_axes(self, ax): # -> None: - """Add descriptive labels to an Axes object.""" - ... - - def add_legend_data(self, ax, color, label): # -> None: - """Add a dummy patch object so we can get legend data.""" - ... - - - -class _BoxPlotter(_CategoricalPlotter): - def __init__(self, x, y, hue, data, order, hue_order, orient, color, palette, saturation, width, dodge, fliersize, linewidth) -> None: - ... - - def draw_boxplot(self, ax, kws): # -> None: - """Use matplotlib to draw a boxplot on an Axes.""" - ... - - def restyle_boxplot(self, artist_dict, color, props): # -> None: - """Take a drawn matplotlib boxplot and make it look nice.""" - ... - - def plot(self, ax, boxplot_kws): # -> None: - """Make the plot.""" - ... - - - -class _ViolinPlotter(_CategoricalPlotter): - def __init__(self, x, y, hue, data, order, hue_order, bw, cut, scale, scale_hue, gridsize, width, inner, split, dodge, orient, linewidth, color, palette, saturation) -> None: - ... - - def estimate_densities(self, bw, cut, scale, scale_hue, gridsize): # -> None: - """Find the support and density for all of the data.""" - ... - - def fit_kde(self, x, bw): # -> tuple[gaussian_kde, Unknown]: - """Estimate a KDE for a vector of data with flexible bandwidth.""" - ... - - def kde_support(self, x, bw, cut, gridsize): - """Define a grid of support for the violin.""" - ... - - def scale_area(self, density, max_density, scale_hue): # -> None: - """Scale the relative area under the KDE curve. - - This essentially preserves the "standard" KDE scaling, but the - resulting maximum density will be 1 so that the curve can be - properly multiplied by the violin width. - - """ - ... - - def scale_width(self, density): # -> None: - """Scale each density curve to the same height.""" - ... - - def scale_count(self, density, counts, scale_hue): # -> None: - """Scale each density curve by the number of observations.""" - ... - - @property - def dwidth(self): - ... - - def draw_violins(self, ax): # -> None: - """Draw the violins onto `ax`.""" - ... - - def draw_single_observation(self, ax, at_group, at_quant, density): # -> None: - """Draw a line to mark a single observation.""" - ... - - def draw_box_lines(self, ax, data, support, density, center): # -> None: - """Draw boxplot information at center of the density.""" - ... - - def draw_quartiles(self, ax, data, support, density, center, split=...): # -> None: - """Draw the quartiles as lines at width of density.""" - ... - - def draw_points(self, ax, data, center): # -> None: - """Draw individual observations as points at middle of the violin.""" - ... - - def draw_stick_lines(self, ax, data, support, density, center, split=...): # -> None: - """Draw individual observations as sticks at width of density.""" - ... - - def draw_to_density(self, ax, center, val, support, density, split, **kws): # -> None: - """Draw a line orthogonal to the value axis at width of density.""" - ... - - def plot(self, ax): # -> None: - """Make the violin plot.""" - ... - - - -class _CategoricalScatterPlotter(_CategoricalPlotter): - default_palette = ... - require_numeric = ... - @property - def point_colors(self): # -> list[Unknown]: - """Return an index into the palette for each scatter point.""" - ... - - def add_legend_data(self, ax): # -> None: - """Add empty scatterplot artists with labels for the legend.""" - ... - - - -class _StripPlotter(_CategoricalScatterPlotter): - """1-d scatterplot with categorical organization.""" - def __init__(self, x, y, hue, data, order, hue_order, jitter, dodge, orient, color, palette) -> None: - """Initialize the plotter.""" - ... - - def draw_stripplot(self, ax, kws): # -> None: - """Draw the points onto `ax`.""" - ... - - def plot(self, ax, kws): # -> None: - """Make the plot.""" - ... - - - -class _SwarmPlotter(_CategoricalScatterPlotter): - def __init__(self, x, y, hue, data, order, hue_order, dodge, orient, color, palette) -> None: - """Initialize the plotter.""" - ... - - def could_overlap(self, xy_i, swarm, d): # -> NDArray[Unknown]: - """Return a list of all swarm points that could overlap with target. - - Assumes that swarm is a sorted list of all points below xy_i. - """ - ... - - def position_candidates(self, xy_i, neighbors, d): # -> NDArray[Unknown]: - """Return a list of (x, y) coordinates that might be valid.""" - ... - - def first_non_overlapping_candidate(self, candidates, neighbors, d): - """Remove candidates from the list if they overlap with the swarm.""" - ... - - def beeswarm(self, orig_xy, d): # -> NDArray[Unknown]: - """Adjust x position of points to avoid overlaps.""" - ... - - def add_gutters(self, points, center, width): - """Stop points from extending beyond their territory.""" - ... - - def swarm_points(self, ax, points, center, width, s, **kws): # -> None: - """Find new positions on the categorical axis for each point.""" - ... - - def draw_swarmplot(self, ax, kws): # -> None: - """Plot the data.""" - ... - - def plot(self, ax, kws): # -> None: - """Make the full plot.""" - ... - - - -class _CategoricalStatPlotter(_CategoricalPlotter): - require_numeric = ... - @property - def nested_width(self): # -> float: - """A float with the width of plot elements when hue nesting is used.""" - ... - - def estimate_statistic(self, estimator, ci, n_boot, seed): # -> None: - ... - - def draw_confints(self, ax, at_group, confint, colors, errwidth=..., capsize=..., **kws): # -> None: - ... - - - -class _BarPlotter(_CategoricalStatPlotter): - """Show point estimates and confidence intervals with bars.""" - def __init__(self, x, y, hue, data, order, hue_order, estimator, ci, n_boot, units, seed, orient, color, palette, saturation, errcolor, errwidth, capsize, dodge) -> None: - """Initialize the plotter.""" - ... - - def draw_bars(self, ax, kws): # -> None: - """Draw the bars onto `ax`.""" - ... - - def plot(self, ax, bar_kws): # -> None: - """Make the plot.""" - ... - - - -class _PointPlotter(_CategoricalStatPlotter): - default_palette = ... - def __init__(self, x, y, hue, data, order, hue_order, estimator, ci, n_boot, units, seed, markers, linestyles, dodge, join, scale, orient, color, palette, errwidth=..., capsize=...) -> None: - """Initialize the plotter.""" - ... - - @property - def hue_offsets(self): # -> NDArray[float64]: - """Offsets relative to the center position for each hue level.""" - ... - - def draw_points(self, ax): # -> None: - """Draw the main data components of the plot.""" - ... - - def plot(self, ax): # -> None: - """Make the plot.""" - ... - - - -class _CountPlotter(_BarPlotter): - require_numeric = ... - - -class _LVPlotter(_CategoricalPlotter): - def __init__(self, x, y, hue, data, order, hue_order, orient, color, palette, saturation, width, dodge, k_depth, linewidth, scale, outlier_prop, trust_alpha, showfliers=...) -> None: - ... - - def draw_letter_value_plot(self, ax, kws): # -> None: - """Use matplotlib to draw a letter value plot on an Axes.""" - ... - - def plot(self, ax, boxplot_kws): # -> None: - """Make the plot.""" - ... - - - -_categorical_docs = ... -@_deprecate_positional_args -def boxplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., orient=..., color=..., palette=..., saturation=..., width=..., dodge=..., fliersize=..., linewidth=..., whis=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def violinplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., bw=..., cut=..., scale=..., scale_hue=..., gridsize=..., width=..., inner=..., split=..., dodge=..., orient=..., linewidth=..., color=..., palette=..., saturation=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def boxenplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., orient=..., color=..., palette=..., saturation=..., width=..., dodge=..., k_depth=..., linewidth=..., scale=..., outlier_prop=..., trust_alpha=..., showfliers=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def stripplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., jitter=..., dodge=..., orient=..., color=..., palette=..., size=..., edgecolor=..., linewidth=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def swarmplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., dodge=..., orient=..., color=..., palette=..., size=..., edgecolor=..., linewidth=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def barplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., estimator=..., ci=..., n_boot=..., units=..., seed=..., orient=..., color=..., palette=..., saturation=..., errcolor=..., errwidth=..., capsize=..., dodge=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def pointplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., estimator=..., ci=..., n_boot=..., units=..., seed=..., markers=..., linestyles=..., dodge=..., join=..., scale=..., orient=..., color=..., palette=..., errwidth=..., capsize=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def countplot(*, x=..., y=..., hue=..., data=..., order=..., hue_order=..., orient=..., color=..., palette=..., saturation=..., dodge=..., ax=..., **kwargs): # -> Axes: - ... - -def factorplot(*args, **kwargs): - """Deprecated; please use `catplot` instead.""" - ... - -@_deprecate_positional_args -def catplot(*, x=..., y=..., hue=..., data=..., row=..., col=..., col_wrap=..., estimator=..., ci=..., n_boot=..., units=..., seed=..., order=..., hue_order=..., row_order=..., col_order=..., kind=..., height=..., aspect=..., orient=..., color=..., palette=..., legend=..., legend_out=..., sharex=..., sharey=..., margin_titles=..., facet_kws=..., **kwargs): - ... - diff --git a/typings/seaborn/cm.pyi b/typings/seaborn/cm.pyi deleted file mode 100644 index f9abe2c..0000000 --- a/typings/seaborn/cm.pyi +++ /dev/null @@ -1,11 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -_rocket_lut = ... -_mako_lut = ... -_vlag_lut = ... -_icefire_lut = ... -_flare_lut = ... -_crest_lut = ... -_lut_dict = ... diff --git a/typings/seaborn/colors/__init__.pyi b/typings/seaborn/colors/__init__.pyi deleted file mode 100644 index 0233e53..0000000 --- a/typings/seaborn/colors/__init__.pyi +++ /dev/null @@ -1,7 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .xkcd_rgb import xkcd_rgb -from .crayons import crayons - diff --git a/typings/seaborn/colors/crayons.pyi b/typings/seaborn/colors/crayons.pyi deleted file mode 100644 index 5acb7a4..0000000 --- a/typings/seaborn/colors/crayons.pyi +++ /dev/null @@ -1,5 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -crayons = ... diff --git a/typings/seaborn/colors/xkcd_rgb.pyi b/typings/seaborn/colors/xkcd_rgb.pyi deleted file mode 100644 index 5bc7ac5..0000000 --- a/typings/seaborn/colors/xkcd_rgb.pyi +++ /dev/null @@ -1,5 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -xkcd_rgb = ... diff --git a/typings/seaborn/conftest.pyi b/typings/seaborn/conftest.pyi deleted file mode 100644 index 29cc1bd..0000000 --- a/typings/seaborn/conftest.pyi +++ /dev/null @@ -1,98 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import pytest - -def has_verdana(): # -> bool: - """Helper to verify if Verdana font is present""" - ... - -@pytest.fixture(scope="session", autouse=True) -def remove_pandas_unit_conversion(): # -> None: - ... - -@pytest.fixture(autouse=True) -def close_figs(): # -> Generator[None, Any, None]: - ... - -@pytest.fixture(autouse=True) -def random_seed(): # -> None: - ... - -@pytest.fixture() -def rng(): # -> RandomState: - ... - -@pytest.fixture -def wide_df(rng): # -> DataFrame: - ... - -@pytest.fixture -def wide_array(wide_df): # -> NDArray[Unknown]: - ... - -@pytest.fixture -def flat_series(rng): # -> Series: - ... - -@pytest.fixture -def flat_array(flat_series): # -> NDArray[Unknown]: - ... - -@pytest.fixture -def flat_list(flat_series): - ... - -@pytest.fixture(params=["series", "array", "list"]) -def flat_data(rng, request): # -> Series | ndarray[Unknown, Unknown] | NDArray[Unknown] | list[Unknown] | Any: - ... - -@pytest.fixture -def wide_list_of_series(rng): # -> list[Series]: - ... - -@pytest.fixture -def wide_list_of_arrays(wide_list_of_series): # -> list[NDArray[Unknown]]: - ... - -@pytest.fixture -def wide_list_of_lists(wide_list_of_series): # -> list[Unknown]: - ... - -@pytest.fixture -def wide_dict_of_series(wide_list_of_series): # -> dict[Unknown, Unknown]: - ... - -@pytest.fixture -def wide_dict_of_arrays(wide_list_of_series): # -> dict[Unknown, NDArray[Unknown]]: - ... - -@pytest.fixture -def wide_dict_of_lists(wide_list_of_series): # -> dict[Unknown, Unknown]: - ... - -@pytest.fixture -def long_df(rng): # -> DataFrame: - ... - -@pytest.fixture -def long_dict(long_df): - ... - -@pytest.fixture -def repeated_df(rng): # -> DataFrame: - ... - -@pytest.fixture -def missing_df(rng, long_df): - ... - -@pytest.fixture -def object_df(rng, long_df): - ... - -@pytest.fixture -def null_series(flat_series): # -> Series: - ... - diff --git a/typings/seaborn/distributions.pyi b/typings/seaborn/distributions.pyi deleted file mode 100644 index 83099a3..0000000 --- a/typings/seaborn/distributions.pyi +++ /dev/null @@ -1,209 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._core import VectorPlotter -from ._decorators import _deprecate_positional_args - -"""Plotting functions for visualizing distributions.""" -__all__ = ["displot", "histplot", "kdeplot", "ecdfplot", "rugplot", "distplot"] -_dist_params = ... -_param_docs = ... -class _DistributionPlotter(VectorPlotter): - semantics = ... - wide_structure = ... - flat_structure = ... - def __init__(self, data=..., variables=...) -> None: - ... - - @property - def univariate(self): # -> bool: - """Return True if only x or y are used.""" - ... - - @property - def data_variable(self): # -> str: - """Return the variable with data for univariate plots.""" - ... - - @property - def has_xy_data(self): # -> bool: - """Return True at least one of x or y is defined.""" - ... - - def plot_univariate_histogram(self, multiple, element, fill, common_norm, common_bins, shrink, kde, kde_kws, color, legend, line_kws, estimate_kws, **plot_kws): - ... - - def plot_bivariate_histogram(self, common_bins, common_norm, thresh, pthresh, pmax, color, legend, cbar, cbar_ax, cbar_kws, estimate_kws, **plot_kws): - ... - - def plot_univariate_density(self, multiple, common_norm, common_grid, fill, legend, estimate_kws, **plot_kws): - ... - - def plot_bivariate_density(self, common_norm, fill, levels, thresh, color, legend, cbar, cbar_ax, cbar_kws, estimate_kws, **contour_kws): - ... - - def plot_univariate_ecdf(self, estimate_kws, legend, **plot_kws): # -> None: - ... - - def plot_rug(self, height, expand_margins, legend, **kws): # -> None: - ... - - - -class _DistributionFacetPlotter(_DistributionPlotter): - semantics = ... - - -def histplot(data=..., *, x=..., y=..., hue=..., weights=..., stat=..., bins=..., binwidth=..., binrange=..., discrete=..., cumulative=..., common_bins=..., common_norm=..., multiple=..., element=..., fill=..., shrink=..., kde=..., kde_kws=..., line_kws=..., thresh=..., pthresh=..., pmax=..., cbar=..., cbar_ax=..., cbar_kws=..., palette=..., hue_order=..., hue_norm=..., color=..., log_scale=..., legend=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def kdeplot(x=..., *, y=..., shade=..., vertical=..., kernel=..., bw=..., gridsize=..., cut=..., clip=..., legend=..., cumulative=..., shade_lowest=..., cbar=..., cbar_ax=..., cbar_kws=..., ax=..., weights=..., hue=..., palette=..., hue_order=..., hue_norm=..., multiple=..., common_norm=..., common_grid=..., levels=..., thresh=..., bw_method=..., bw_adjust=..., log_scale=..., color=..., fill=..., data=..., data2=..., **kwargs): # -> Axes: - ... - -def ecdfplot(data=..., *, x=..., y=..., hue=..., weights=..., stat=..., complementary=..., palette=..., hue_order=..., hue_norm=..., log_scale=..., legend=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def rugplot(x=..., *, height=..., axis=..., ax=..., data=..., y=..., hue=..., palette=..., hue_order=..., hue_norm=..., expand_margins=..., legend=..., a=..., **kwargs): # -> Axes: - ... - -def displot(data=..., *, x=..., y=..., hue=..., row=..., col=..., weights=..., kind=..., rug=..., rug_kws=..., log_scale=..., legend=..., palette=..., hue_order=..., hue_norm=..., color=..., col_wrap=..., row_order=..., col_order=..., height=..., aspect=..., facet_kws=..., **kwargs): # -> FacetGrid: - ... - -def distplot(a=..., bins=..., hist=..., kde=..., rug=..., fit=..., hist_kws=..., kde_kws=..., rug_kws=..., fit_kws=..., color=..., vertical=..., norm_hist=..., axlabel=..., label=..., ax=..., x=...): - """DEPRECATED: Flexibly plot a univariate distribution of observations. - - .. warning:: - This function is deprecated and will be removed in a future version. - Please adapt your code to use one of two new functions: - - - :func:`displot`, a figure-level function with a similar flexibility - over the kind of plot to draw - - :func:`histplot`, an axes-level function for plotting histograms, - including with kernel density smoothing - - This function combines the matplotlib ``hist`` function (with automatic - calculation of a good default bin size) with the seaborn :func:`kdeplot` - and :func:`rugplot` functions. It can also fit ``scipy.stats`` - distributions and plot the estimated PDF over the data. - - Parameters - ---------- - a : Series, 1d-array, or list. - Observed data. If this is a Series object with a ``name`` attribute, - the name will be used to label the data axis. - bins : argument for matplotlib hist(), or None, optional - Specification of hist bins. If unspecified, as reference rule is used - that tries to find a useful default. - hist : bool, optional - Whether to plot a (normed) histogram. - kde : bool, optional - Whether to plot a gaussian kernel density estimate. - rug : bool, optional - Whether to draw a rugplot on the support axis. - fit : random variable object, optional - An object with `fit` method, returning a tuple that can be passed to a - `pdf` method a positional arguments following a grid of values to - evaluate the pdf on. - hist_kws : dict, optional - Keyword arguments for :meth:`matplotlib.axes.Axes.hist`. - kde_kws : dict, optional - Keyword arguments for :func:`kdeplot`. - rug_kws : dict, optional - Keyword arguments for :func:`rugplot`. - color : matplotlib color, optional - Color to plot everything but the fitted curve in. - vertical : bool, optional - If True, observed values are on y-axis. - norm_hist : bool, optional - If True, the histogram height shows a density rather than a count. - This is implied if a KDE or fitted density is plotted. - axlabel : string, False, or None, optional - Name for the support axis label. If None, will try to get it - from a.name if False, do not set a label. - label : string, optional - Legend label for the relevant component of the plot. - ax : matplotlib axis, optional - If provided, plot on this axis. - - Returns - ------- - ax : matplotlib Axes - Returns the Axes object with the plot for further tweaking. - - See Also - -------- - kdeplot : Show a univariate or bivariate distribution with a kernel - density estimate. - rugplot : Draw small vertical lines to show each observation in a - distribution. - - Examples - -------- - - Show a default plot with a kernel density estimate and histogram with bin - size determined automatically with a reference rule: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns, numpy as np - >>> sns.set_theme(); np.random.seed(0) - >>> x = np.random.randn(100) - >>> ax = sns.distplot(x) - - Use Pandas objects to get an informative axis label: - - .. plot:: - :context: close-figs - - >>> import pandas as pd - >>> x = pd.Series(x, name="x variable") - >>> ax = sns.distplot(x) - - Plot the distribution with a kernel density estimate and rug plot: - - .. plot:: - :context: close-figs - - >>> ax = sns.distplot(x, rug=True, hist=False) - - Plot the distribution with a histogram and maximum likelihood gaussian - distribution fit: - - .. plot:: - :context: close-figs - - >>> from scipy.stats import norm - >>> ax = sns.distplot(x, fit=norm, kde=False) - - Plot the distribution on the vertical axis: - - .. plot:: - :context: close-figs - - >>> ax = sns.distplot(x, vertical=True) - - Change the color of all the plot elements: - - .. plot:: - :context: close-figs - - >>> sns.set_color_codes() - >>> ax = sns.distplot(x, color="y") - - Pass specific parameters to the underlying plot functions: - - .. plot:: - :context: close-figs - - >>> ax = sns.distplot(x, rug=True, rug_kws={"color": "g"}, - ... kde_kws={"color": "k", "lw": 3, "label": "KDE"}, - ... hist_kws={"histtype": "step", "linewidth": 3, - ... "alpha": 1, "color": "g"}) - - """ - ... - diff --git a/typings/seaborn/external/__init__.pyi b/typings/seaborn/external/__init__.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/seaborn/external/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/seaborn/external/docscrape.pyi b/typings/seaborn/external/docscrape.pyi deleted file mode 100644 index 68c0bb8..0000000 --- a/typings/seaborn/external/docscrape.pyi +++ /dev/null @@ -1,165 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from collections.abc import Mapping - -"""Extract reference documentation from the NumPy source tree. - -Copyright (C) 2008 Stefan van der Walt , Pauli Virtanen - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -""" -def strip_blank_lines(l): - "Remove leading and trailing blank lines from a list of lines" - ... - -class Reader: - """A line-based string reader. - - """ - def __init__(self, data) -> None: - """ - Parameters - ---------- - data : str - String with lines separated by '\n'. - - """ - ... - - def __getitem__(self, n): - ... - - def reset(self): # -> None: - ... - - def read(self): # -> Literal['']: - ... - - def seek_next_non_empty_line(self): # -> None: - ... - - def eof(self): # -> bool: - ... - - def read_to_condition(self, condition_func): # -> list[Unknown]: - ... - - def read_to_next_empty_line(self): # -> list[Unknown]: - ... - - def read_to_next_unindented_line(self): # -> list[Unknown]: - ... - - def peek(self, n=...): # -> Literal['']: - ... - - def is_empty(self): # -> bool: - ... - - - -class ParseError(Exception): - def __str__(self) -> str: - ... - - - -Parameter = ... -class NumpyDocString(Mapping): - """Parses a numpydoc string to an abstract representation - - Instances define a mapping from section title to structured data. - - """ - sections = ... - def __init__(self, docstring, config=...) -> None: - ... - - def __getitem__(self, key): - ... - - def __setitem__(self, key, val): # -> None: - ... - - def __iter__(self): # -> Iterator[str]: - ... - - def __len__(self): # -> int: - ... - - _role = ... - _funcbacktick = ... - _funcplain = ... - _funcname = ... - _funcnamenext = ... - _funcnamenext = ... - _description = ... - _func_rgx = ... - _line_rgx = ... - empty_description = ... - def __str__(self, func_role=...) -> str: - ... - - - -def indent(str, indent=...): # -> LiteralString: - ... - -def dedent_lines(lines): # -> list[str]: - """Deindent a list of lines maximally""" - ... - -def header(text, style=...): - ... - -class FunctionDoc(NumpyDocString): - def __init__(self, func, role=..., doc=..., config=...) -> None: - ... - - def get_func(self): # -> tuple[Any | Overload[(__o: object, /) -> None, (__name: str, __bases: tuple[type, ...], __dict: dict[str, Any], **kwds: Any) -> None] | Unknown, Any | str]: - ... - - def __str__(self) -> str: - ... - - - -class ClassDoc(NumpyDocString): - extra_public_methods = ... - def __init__(self, cls, doc=..., modulename=..., func_doc=..., config=...) -> None: - ... - - @property - def methods(self): # -> list[Unknown] | list[str]: - ... - - @property - def properties(self): # -> list[Unknown] | list[str]: - ... - - - diff --git a/typings/seaborn/external/husl.pyi b/typings/seaborn/external/husl.pyi deleted file mode 100644 index abd7f73..0000000 --- a/typings/seaborn/external/husl.pyi +++ /dev/null @@ -1,104 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -__version__ = ... -m = ... -m_inv = ... -refX = ... -refY = ... -refZ = ... -refU = ... -refV = ... -lab_e = ... -lab_k = ... -def husl_to_rgb(h, s, l): # -> list[Unknown | float]: - ... - -def husl_to_hex(h, s, l): # -> LiteralString: - ... - -def rgb_to_husl(r, g, b): # -> list[Unknown]: - ... - -def hex_to_husl(hex): # -> list[Unknown]: - ... - -def huslp_to_rgb(h, s, l): # -> list[Unknown | float]: - ... - -def huslp_to_hex(h, s, l): # -> LiteralString: - ... - -def rgb_to_huslp(r, g, b): # -> list[Unknown]: - ... - -def hex_to_huslp(hex): # -> list[Unknown]: - ... - -def lch_to_rgb(l, c, h): # -> list[Unknown | float]: - ... - -def rgb_to_lch(r, g, b): # -> list[Unknown]: - ... - -def max_chroma(L, H): # -> float: - ... - -def max_chroma_pastel(L): # -> float: - ... - -def dot_product(a, b): # -> int: - ... - -def f(t): # -> float: - ... - -def f_inv(t): # -> float: - ... - -def from_linear(c): # -> float: - ... - -def to_linear(c): # -> float: - ... - -def rgb_prepare(triple): # -> list[Unknown]: - ... - -def hex_to_rgb(hex): # -> list[float]: - ... - -def rgb_to_hex(triple): # -> LiteralString: - ... - -def xyz_to_rgb(triple): # -> list[Unknown | float]: - ... - -def rgb_to_xyz(triple): # -> list[int]: - ... - -def xyz_to_luv(triple): # -> list[float] | list[Unknown]: - ... - -def luv_to_xyz(triple): # -> list[float] | list[Unknown]: - ... - -def luv_to_lch(triple): # -> list[Unknown]: - ... - -def lch_to_luv(triple): # -> list[Unknown]: - ... - -def husl_to_lch(triple): # -> list[Unknown]: - ... - -def lch_to_husl(triple): # -> list[Unknown]: - ... - -def huslp_to_lch(triple): # -> list[Unknown]: - ... - -def lch_to_huslp(triple): # -> list[Unknown]: - ... - diff --git a/typings/seaborn/matrix.pyi b/typings/seaborn/matrix.pyi deleted file mode 100644 index b93e086..0000000 --- a/typings/seaborn/matrix.pyi +++ /dev/null @@ -1,557 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from .axisgrid import Grid -from ._decorators import _deprecate_positional_args - -"""Functions to visualize matrices of data.""" -__all__ = ["heatmap", "clustermap"] -class _HeatMapper: - """Draw a heatmap plot of a matrix with nice labels and colormaps.""" - def __init__(self, data, vmin, vmax, cmap, center, robust, annot, fmt, annot_kws, cbar, cbar_kws, xticklabels=..., yticklabels=..., mask=...) -> None: - """Initialize the plotting object.""" - ... - - def plot(self, ax, cax, kws): # -> None: - """Draw the heatmap on the provided Axes.""" - ... - - - -@_deprecate_positional_args -def heatmap(data, *, vmin=..., vmax=..., cmap=..., center=..., robust=..., annot=..., fmt=..., annot_kws=..., linewidths=..., linecolor=..., cbar=..., cbar_kws=..., cbar_ax=..., square=..., xticklabels=..., yticklabels=..., mask=..., ax=..., **kwargs): # -> Axes: - """Plot rectangular data as a color-encoded matrix. - - This is an Axes-level function and will draw the heatmap into the - currently-active Axes if none is provided to the ``ax`` argument. Part of - this Axes space will be taken and used to plot a colormap, unless ``cbar`` - is False or a separate Axes is provided to ``cbar_ax``. - - Parameters - ---------- - data : rectangular dataset - 2D dataset that can be coerced into an ndarray. If a Pandas DataFrame - is provided, the index/column information will be used to label the - columns and rows. - vmin, vmax : floats, optional - Values to anchor the colormap, otherwise they are inferred from the - data and other keyword arguments. - cmap : matplotlib colormap name or object, or list of colors, optional - The mapping from data values to color space. If not provided, the - default will depend on whether ``center`` is set. - center : float, optional - The value at which to center the colormap when plotting divergant data. - Using this parameter will change the default ``cmap`` if none is - specified. - robust : bool, optional - If True and ``vmin`` or ``vmax`` are absent, the colormap range is - computed with robust quantiles instead of the extreme values. - annot : bool or rectangular dataset, optional - If True, write the data value in each cell. If an array-like with the - same shape as ``data``, then use this to annotate the heatmap instead - of the data. Note that DataFrames will match on position, not index. - fmt : str, optional - String formatting code to use when adding annotations. - annot_kws : dict of key, value mappings, optional - Keyword arguments for :meth:`matplotlib.axes.Axes.text` when ``annot`` - is True. - linewidths : float, optional - Width of the lines that will divide each cell. - linecolor : color, optional - Color of the lines that will divide each cell. - cbar : bool, optional - Whether to draw a colorbar. - cbar_kws : dict of key, value mappings, optional - Keyword arguments for :meth:`matplotlib.figure.Figure.colorbar`. - cbar_ax : matplotlib Axes, optional - Axes in which to draw the colorbar, otherwise take space from the - main Axes. - square : bool, optional - If True, set the Axes aspect to "equal" so each cell will be - square-shaped. - xticklabels, yticklabels : "auto", bool, list-like, or int, optional - If True, plot the column names of the dataframe. If False, don't plot - the column names. If list-like, plot these alternate labels as the - xticklabels. If an integer, use the column names but plot only every - n label. If "auto", try to densely plot non-overlapping labels. - mask : bool array or DataFrame, optional - If passed, data will not be shown in cells where ``mask`` is True. - Cells with missing values are automatically masked. - ax : matplotlib Axes, optional - Axes in which to draw the plot, otherwise use the currently-active - Axes. - kwargs : other keyword arguments - All other keyword arguments are passed to - :meth:`matplotlib.axes.Axes.pcolormesh`. - - Returns - ------- - ax : matplotlib Axes - Axes object with the heatmap. - - See Also - -------- - clustermap : Plot a matrix using hierachical clustering to arrange the - rows and columns. - - Examples - -------- - - Plot a heatmap for a numpy array: - - .. plot:: - :context: close-figs - - >>> import numpy as np; np.random.seed(0) - >>> import seaborn as sns; sns.set_theme() - >>> uniform_data = np.random.rand(10, 12) - >>> ax = sns.heatmap(uniform_data) - - Change the limits of the colormap: - - .. plot:: - :context: close-figs - - >>> ax = sns.heatmap(uniform_data, vmin=0, vmax=1) - - Plot a heatmap for data centered on 0 with a diverging colormap: - - .. plot:: - :context: close-figs - - >>> normal_data = np.random.randn(10, 12) - >>> ax = sns.heatmap(normal_data, center=0) - - Plot a dataframe with meaningful row and column labels: - - .. plot:: - :context: close-figs - - >>> flights = sns.load_dataset("flights") - >>> flights = flights.pivot("month", "year", "passengers") - >>> ax = sns.heatmap(flights) - - Annotate each cell with the numeric value using integer formatting: - - .. plot:: - :context: close-figs - - >>> ax = sns.heatmap(flights, annot=True, fmt="d") - - Add lines between each cell: - - .. plot:: - :context: close-figs - - >>> ax = sns.heatmap(flights, linewidths=.5) - - Use a different colormap: - - .. plot:: - :context: close-figs - - >>> ax = sns.heatmap(flights, cmap="YlGnBu") - - Center the colormap at a specific value: - - .. plot:: - :context: close-figs - - >>> ax = sns.heatmap(flights, center=flights.loc["Jan", 1955]) - - Plot every other column label and don't plot row labels: - - .. plot:: - :context: close-figs - - >>> data = np.random.randn(50, 20) - >>> ax = sns.heatmap(data, xticklabels=2, yticklabels=False) - - Don't draw a colorbar: - - .. plot:: - :context: close-figs - - >>> ax = sns.heatmap(flights, cbar=False) - - Use different axes for the colorbar: - - .. plot:: - :context: close-figs - - >>> grid_kws = {"height_ratios": (.9, .05), "hspace": .3} - >>> f, (ax, cbar_ax) = plt.subplots(2, gridspec_kw=grid_kws) - >>> ax = sns.heatmap(flights, ax=ax, - ... cbar_ax=cbar_ax, - ... cbar_kws={"orientation": "horizontal"}) - - Use a mask to plot only part of a matrix - - .. plot:: - :context: close-figs - - >>> corr = np.corrcoef(np.random.randn(10, 200)) - >>> mask = np.zeros_like(corr) - >>> mask[np.triu_indices_from(mask)] = True - >>> with sns.axes_style("white"): - ... f, ax = plt.subplots(figsize=(7, 5)) - ... ax = sns.heatmap(corr, mask=mask, vmax=.3, square=True) - """ - ... - -class _DendrogramPlotter: - """Object for drawing tree of similarities between data rows/columns""" - def __init__(self, data, linkage, metric, method, axis, label, rotate) -> None: - """Plot a dendrogram of the relationships between the columns of data - - Parameters - ---------- - data : pandas.DataFrame - Rectangular data - """ - ... - - @property - def calculated_linkage(self): - ... - - def calculate_dendrogram(self): # -> dict[str, Unknown]: - """Calculates a dendrogram based on the linkage matrix - - Made a separate function, not a property because don't want to - recalculate the dendrogram every time it is accessed. - - Returns - ------- - dendrogram : dict - Dendrogram dictionary as returned by scipy.cluster.hierarchy - .dendrogram. The important key-value pairing is - "reordered_ind" which indicates the re-ordering of the matrix - """ - ... - - @property - def reordered_ind(self): - """Indices of the matrix, reordered by the dendrogram""" - ... - - def plot(self, ax, tree_kws): # -> Self@_DendrogramPlotter: - """Plots a dendrogram of the similarities between data on the axes - - Parameters - ---------- - ax : matplotlib.axes.Axes - Axes object upon which the dendrogram is plotted - - """ - ... - - - -@_deprecate_positional_args -def dendrogram(data, *, linkage=..., axis=..., label=..., metric=..., method=..., rotate=..., tree_kws=..., ax=...): # -> _DendrogramPlotter: - """Draw a tree diagram of relationships within a matrix - - Parameters - ---------- - data : pandas.DataFrame - Rectangular data - linkage : numpy.array, optional - Linkage matrix - axis : int, optional - Which axis to use to calculate linkage. 0 is rows, 1 is columns. - label : bool, optional - If True, label the dendrogram at leaves with column or row names - metric : str, optional - Distance metric. Anything valid for scipy.spatial.distance.pdist - method : str, optional - Linkage method to use. Anything valid for - scipy.cluster.hierarchy.linkage - rotate : bool, optional - When plotting the matrix, whether to rotate it 90 degrees - counter-clockwise, so the leaves face right - tree_kws : dict, optional - Keyword arguments for the ``matplotlib.collections.LineCollection`` - that is used for plotting the lines of the dendrogram tree. - ax : matplotlib axis, optional - Axis to plot on, otherwise uses current axis - - Returns - ------- - dendrogramplotter : _DendrogramPlotter - A Dendrogram plotter object. - - Notes - ----- - Access the reordered dendrogram indices with - dendrogramplotter.reordered_ind - - """ - ... - -class ClusterGrid(Grid): - def __init__(self, data, pivot_kws=..., z_score=..., standard_scale=..., figsize=..., row_colors=..., col_colors=..., mask=..., dendrogram_ratio=..., colors_ratio=..., cbar_pos=...) -> None: - """Grid object for organizing clustered heatmap input on to axes""" - ... - - def format_data(self, data, pivot_kws, z_score=..., standard_scale=...): - """Extract variables from data or use directly.""" - ... - - @staticmethod - def z_score(data2d, axis=...): - """Standarize the mean and variance of the data axis - - Parameters - ---------- - data2d : pandas.DataFrame - Data to normalize - axis : int - Which axis to normalize across. If 0, normalize across rows, if 1, - normalize across columns. - - Returns - ------- - normalized : pandas.DataFrame - Noramlized data with a mean of 0 and variance of 1 across the - specified axis. - """ - ... - - @staticmethod - def standard_scale(data2d, axis=...): - """Divide the data by the difference between the max and min - - Parameters - ---------- - data2d : pandas.DataFrame - Data to normalize - axis : int - Which axis to normalize across. If 0, normalize across rows, if 1, - normalize across columns. - vmin : int - If 0, then subtract the minimum of the data before dividing by - the range. - - Returns - ------- - standardized : pandas.DataFrame - Noramlized data with a mean of 0 and variance of 1 across the - specified axis. - - """ - ... - - def dim_ratios(self, colors, dendrogram_ratio, colors_ratio): # -> list[Unknown]: - """Get the proportions of the figure taken up by each axes.""" - ... - - @staticmethod - def color_list_to_matrix_and_cmap(colors, ind, axis=...): # -> tuple[ndarray[Any, dtype[Any]], Unknown]: - """Turns a list of colors into a numpy matrix and matplotlib colormap - - These arguments can now be plotted using heatmap(matrix, cmap) - and the provided colors will be plotted. - - Parameters - ---------- - colors : list of matplotlib colors - Colors to label the rows or columns of a dataframe. - ind : list of ints - Ordering of the rows or columns, to reorder the original colors - by the clustered dendrogram order - axis : int - Which axis this is labeling - - Returns - ------- - matrix : numpy.array - A numpy array of integer values, where each corresponds to a color - from the originally provided list of colors - cmap : matplotlib.colors.ListedColormap - - """ - ... - - def savefig(self, *args, **kwargs): # -> None: - ... - - def plot_dendrograms(self, row_cluster, col_cluster, metric, method, row_linkage, col_linkage, tree_kws): # -> None: - ... - - def plot_colors(self, xind, yind, **kws): # -> None: - """Plots color labels between the dendrogram and the heatmap - - Parameters - ---------- - heatmap_kws : dict - Keyword arguments heatmap - - """ - ... - - def plot_matrix(self, colorbar_kws, xind, yind, **kws): # -> None: - ... - - def plot(self, metric, method, colorbar_kws, row_cluster, col_cluster, row_linkage, col_linkage, tree_kws, **kws): # -> Self@ClusterGrid: - ... - - - -@_deprecate_positional_args -def clustermap(data, *, pivot_kws=..., method=..., metric=..., z_score=..., standard_scale=..., figsize=..., cbar_kws=..., row_cluster=..., col_cluster=..., row_linkage=..., col_linkage=..., row_colors=..., col_colors=..., mask=..., dendrogram_ratio=..., colors_ratio=..., cbar_pos=..., tree_kws=..., **kwargs): # -> ClusterGrid: - """ - Plot a matrix dataset as a hierarchically-clustered heatmap. - - Parameters - ---------- - data : 2D array-like - Rectangular data for clustering. Cannot contain NAs. - pivot_kws : dict, optional - If `data` is a tidy dataframe, can provide keyword arguments for - pivot to create a rectangular dataframe. - method : str, optional - Linkage method to use for calculating clusters. See - :func:`scipy.cluster.hierarchy.linkage` documentation for more - information. - metric : str, optional - Distance metric to use for the data. See - :func:`scipy.spatial.distance.pdist` documentation for more options. - To use different metrics (or methods) for rows and columns, you may - construct each linkage matrix yourself and provide them as - `{row,col}_linkage`. - z_score : int or None, optional - Either 0 (rows) or 1 (columns). Whether or not to calculate z-scores - for the rows or the columns. Z scores are: z = (x - mean)/std, so - values in each row (column) will get the mean of the row (column) - subtracted, then divided by the standard deviation of the row (column). - This ensures that each row (column) has mean of 0 and variance of 1. - standard_scale : int or None, optional - Either 0 (rows) or 1 (columns). Whether or not to standardize that - dimension, meaning for each row or column, subtract the minimum and - divide each by its maximum. - figsize : tuple of (width, height), optional - Overall size of the figure. - cbar_kws : dict, optional - Keyword arguments to pass to `cbar_kws` in :func:`heatmap`, e.g. to - add a label to the colorbar. - {row,col}_cluster : bool, optional - If ``True``, cluster the {rows, columns}. - {row,col}_linkage : :class:`numpy.ndarray`, optional - Precomputed linkage matrix for the rows or columns. See - :func:`scipy.cluster.hierarchy.linkage` for specific formats. - {row,col}_colors : list-like or pandas DataFrame/Series, optional - List of colors to label for either the rows or columns. Useful to evaluate - whether samples within a group are clustered together. Can use nested lists or - DataFrame for multiple color levels of labeling. If given as a - :class:`pandas.DataFrame` or :class:`pandas.Series`, labels for the colors are - extracted from the DataFrames column names or from the name of the Series. - DataFrame/Series colors are also matched to the data by their index, ensuring - colors are drawn in the correct order. - mask : bool array or DataFrame, optional - If passed, data will not be shown in cells where `mask` is True. - Cells with missing values are automatically masked. Only used for - visualizing, not for calculating. - {dendrogram,colors}_ratio : float, or pair of floats, optional - Proportion of the figure size devoted to the two marginal elements. If - a pair is given, they correspond to (row, col) ratios. - cbar_pos : tuple of (left, bottom, width, height), optional - Position of the colorbar axes in the figure. Setting to ``None`` will - disable the colorbar. - tree_kws : dict, optional - Parameters for the :class:`matplotlib.collections.LineCollection` - that is used to plot the lines of the dendrogram tree. - kwargs : other keyword arguments - All other keyword arguments are passed to :func:`heatmap`. - - Returns - ------- - :class:`ClusterGrid` - A :class:`ClusterGrid` instance. - - See Also - -------- - heatmap : Plot rectangular data as a color-encoded matrix. - - Notes - ----- - The returned object has a ``savefig`` method that should be used if you - want to save the figure object without clipping the dendrograms. - - To access the reordered row indices, use: - ``clustergrid.dendrogram_row.reordered_ind`` - - Column indices, use: - ``clustergrid.dendrogram_col.reordered_ind`` - - Examples - -------- - - Plot a clustered heatmap: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme(color_codes=True) - >>> iris = sns.load_dataset("iris") - >>> species = iris.pop("species") - >>> g = sns.clustermap(iris) - - Change the size and layout of the figure: - - .. plot:: - :context: close-figs - - >>> g = sns.clustermap(iris, - ... figsize=(7, 5), - ... row_cluster=False, - ... dendrogram_ratio=(.1, .2), - ... cbar_pos=(0, .2, .03, .4)) - - Add colored labels to identify observations: - - .. plot:: - :context: close-figs - - >>> lut = dict(zip(species.unique(), "rbg")) - >>> row_colors = species.map(lut) - >>> g = sns.clustermap(iris, row_colors=row_colors) - - Use a different colormap and adjust the limits of the color range: - - .. plot:: - :context: close-figs - - >>> g = sns.clustermap(iris, cmap="mako", vmin=0, vmax=10) - - Use a different similarity metric: - - .. plot:: - :context: close-figs - - >>> g = sns.clustermap(iris, metric="correlation") - - Use a different clustering method: - - .. plot:: - :context: close-figs - - >>> g = sns.clustermap(iris, method="single") - - Standardize the data within the columns: - - .. plot:: - :context: close-figs - - >>> g = sns.clustermap(iris, standard_scale=1) - - Normalize the data within the rows: - - .. plot:: - :context: close-figs - - >>> g = sns.clustermap(iris, z_score=0, cmap="vlag") - """ - ... - diff --git a/typings/seaborn/miscplot.pyi b/typings/seaborn/miscplot.pyi deleted file mode 100644 index e2b5504..0000000 --- a/typings/seaborn/miscplot.pyi +++ /dev/null @@ -1,22 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -__all__ = ["palplot", "dogplot"] -def palplot(pal, size=...): # -> None: - """Plot the values in a color palette as a horizontal array. - - Parameters - ---------- - pal : sequence of matplotlib colors - colors, i.e. as returned by seaborn.color_palette() - size : - scaling factor for size of plot - - """ - ... - -def dogplot(*_, **__): # -> None: - """Who's a good boy?""" - ... - diff --git a/typings/seaborn/palettes.pyi b/typings/seaborn/palettes.pyi deleted file mode 100644 index 2644183..0000000 --- a/typings/seaborn/palettes.pyi +++ /dev/null @@ -1,706 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -__all__ = ["color_palette", "hls_palette", "husl_palette", "mpl_palette", "dark_palette", "light_palette", "diverging_palette", "blend_palette", "xkcd_palette", "crayon_palette", "cubehelix_palette", "set_color_codes"] -SEABORN_PALETTES = ... -MPL_QUAL_PALS = ... -QUAL_PALETTE_SIZES = ... -QUAL_PALETTES = ... -class _ColorPalette(list): - """Set the color palette in a with statement, otherwise be a list.""" - def __enter__(self): # -> Self@_ColorPalette: - """Open the context.""" - ... - - def __exit__(self, *args): # -> None: - """Close the context.""" - ... - - def as_hex(self): # -> _ColorPalette: - """Return a color palette with hex codes instead of RGB values.""" - ... - - - -def color_palette(palette=..., n_colors=..., desat=..., as_cmap=...): # -> _ColorPalette | list[tuple[float, float, float]] | Any | list[str]: - """Return a list of colors or continuous colormap defining a palette. - - Possible ``palette`` values include: - - Name of a seaborn palette (deep, muted, bright, pastel, dark, colorblind) - - Name of matplotlib colormap - - 'husl' or 'hls' - - 'ch:' - - 'light:', 'dark:', 'blend:,', - - A sequence of colors in any format matplotlib accepts - - Calling this function with ``palette=None`` will return the current - matplotlib color cycle. - - This function can also be used in a ``with`` statement to temporarily - set the color cycle for a plot or set of plots. - - See the :ref:`tutorial ` for more information. - - Parameters - ---------- - palette: None, string, or sequence, optional - Name of palette or None to return current palette. If a sequence, input - colors are used but possibly cycled and desaturated. - n_colors : int, optional - Number of colors in the palette. If ``None``, the default will depend - on how ``palette`` is specified. Named palettes default to 6 colors, - but grabbing the current palette or passing in a list of colors will - not change the number of colors unless this is specified. Asking for - more colors than exist in the palette will cause it to cycle. Ignored - when ``as_cmap`` is True. - desat : float, optional - Proportion to desaturate each color by. - as_cmap : bool - If True, return a :class:`matplotlib.colors.Colormap`. - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - See Also - -------- - set_palette : Set the default color cycle for all plots. - set_color_codes : Reassign color codes like ``"b"``, ``"g"``, etc. to - colors from one of the seaborn palettes. - - Examples - -------- - - .. include:: ../docstrings/color_palette.rst - - """ - ... - -def hls_palette(n_colors=..., h=..., l=..., s=..., as_cmap=...): # -> _ColorPalette: - """Get a set of evenly spaced colors in HLS hue space. - - h, l, and s should be between 0 and 1 - - Parameters - ---------- - - n_colors : int - number of colors in the palette - h : float - first hue - l : float - lightness - s : float - saturation - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - See Also - -------- - husl_palette : Make a palette using evenly spaced hues in the HUSL system. - - Examples - -------- - - Create a palette of 10 colors with the default parameters: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme() - >>> sns.palplot(sns.hls_palette(10)) - - Create a palette of 10 colors that begins at a different hue value: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.hls_palette(10, h=.5)) - - Create a palette of 10 colors that are darker than the default: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.hls_palette(10, l=.4)) - - Create a palette of 10 colors that are less saturated than the default: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.hls_palette(10, s=.4)) - - """ - ... - -def husl_palette(n_colors=..., h=..., s=..., l=..., as_cmap=...): # -> _ColorPalette: - """Get a set of evenly spaced colors in HUSL hue space. - - h, s, and l should be between 0 and 1 - - Parameters - ---------- - - n_colors : int - number of colors in the palette - h : float - first hue - s : float - saturation - l : float - lightness - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - See Also - -------- - hls_palette : Make a palette using evently spaced circular hues in the - HSL system. - - Examples - -------- - - Create a palette of 10 colors with the default parameters: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme() - >>> sns.palplot(sns.husl_palette(10)) - - Create a palette of 10 colors that begins at a different hue value: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.husl_palette(10, h=.5)) - - Create a palette of 10 colors that are darker than the default: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.husl_palette(10, l=.4)) - - Create a palette of 10 colors that are less saturated than the default: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.husl_palette(10, s=.4)) - - """ - ... - -def mpl_palette(name, n_colors=..., as_cmap=...): # -> _ColorPalette: - """Return discrete colors from a matplotlib palette. - - Note that this handles the qualitative colorbrewer palettes - properly, although if you ask for more colors than a particular - qualitative palette can provide you will get fewer than you are - expecting. In contrast, asking for qualitative color brewer palettes - using :func:`color_palette` will return the expected number of colors, - but they will cycle. - - If you are using the IPython notebook, you can also use the function - :func:`choose_colorbrewer_palette` to interactively select palettes. - - Parameters - ---------- - name : string - Name of the palette. This should be a named matplotlib colormap. - n_colors : int - Number of discrete colors in the palette. - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - Examples - -------- - - Create a qualitative colorbrewer palette with 8 colors: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme() - >>> sns.palplot(sns.mpl_palette("Set2", 8)) - - Create a sequential colorbrewer palette: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.mpl_palette("Blues")) - - Create a diverging palette: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.mpl_palette("seismic", 8)) - - Create a "dark" sequential palette: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.mpl_palette("GnBu_d")) - - """ - ... - -def dark_palette(color, n_colors=..., reverse=..., as_cmap=..., input=...): # -> _ColorPalette: - """Make a sequential palette that blends from dark to ``color``. - - This kind of palette is good for data that range between relatively - uninteresting low values and interesting high values. - - The ``color`` parameter can be specified in a number of ways, including - all options for defining a color in matplotlib and several additional - color spaces that are handled by seaborn. You can also use the database - of named colors from the XKCD color survey. - - If you are using the IPython notebook, you can also choose this palette - interactively with the :func:`choose_dark_palette` function. - - Parameters - ---------- - color : base color for high values - hex, rgb-tuple, or html color name - n_colors : int, optional - number of colors in the palette - reverse : bool, optional - if True, reverse the direction of the blend - as_cmap : bool, optional - If True, return a :class:`matplotlib.colors.Colormap`. - input : {'rgb', 'hls', 'husl', xkcd'} - Color space to interpret the input color. The first three options - apply to tuple inputs and the latter applies to string inputs. - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - See Also - -------- - light_palette : Create a sequential palette with bright low values. - diverging_palette : Create a diverging palette with two colors. - - Examples - -------- - - Generate a palette from an HTML color: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme() - >>> sns.palplot(sns.dark_palette("purple")) - - Generate a palette that decreases in lightness: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.dark_palette("seagreen", reverse=True)) - - Generate a palette from an HUSL-space seed: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.dark_palette((260, 75, 60), input="husl")) - - Generate a colormap object: - - .. plot:: - :context: close-figs - - >>> from numpy import arange - >>> x = arange(25).reshape(5, 5) - >>> cmap = sns.dark_palette("#2ecc71", as_cmap=True) - >>> ax = sns.heatmap(x, cmap=cmap) - - """ - ... - -def light_palette(color, n_colors=..., reverse=..., as_cmap=..., input=...): # -> _ColorPalette: - """Make a sequential palette that blends from light to ``color``. - - This kind of palette is good for data that range between relatively - uninteresting low values and interesting high values. - - The ``color`` parameter can be specified in a number of ways, including - all options for defining a color in matplotlib and several additional - color spaces that are handled by seaborn. You can also use the database - of named colors from the XKCD color survey. - - If you are using the IPython notebook, you can also choose this palette - interactively with the :func:`choose_light_palette` function. - - Parameters - ---------- - color : base color for high values - hex code, html color name, or tuple in ``input`` space. - n_colors : int, optional - number of colors in the palette - reverse : bool, optional - if True, reverse the direction of the blend - as_cmap : bool, optional - If True, return a :class:`matplotlib.colors.Colormap`. - input : {'rgb', 'hls', 'husl', xkcd'} - Color space to interpret the input color. The first three options - apply to tuple inputs and the latter applies to string inputs. - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - See Also - -------- - dark_palette : Create a sequential palette with dark low values. - diverging_palette : Create a diverging palette with two colors. - - Examples - -------- - - Generate a palette from an HTML color: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme() - >>> sns.palplot(sns.light_palette("purple")) - - Generate a palette that increases in lightness: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.light_palette("seagreen", reverse=True)) - - Generate a palette from an HUSL-space seed: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.light_palette((260, 75, 60), input="husl")) - - Generate a colormap object: - - .. plot:: - :context: close-figs - - >>> from numpy import arange - >>> x = arange(25).reshape(5, 5) - >>> cmap = sns.light_palette("#2ecc71", as_cmap=True) - >>> ax = sns.heatmap(x, cmap=cmap) - - """ - ... - -def diverging_palette(h_neg, h_pos, s=..., l=..., sep=..., n=..., center=..., as_cmap=...): # -> _ColorPalette: - """Make a diverging palette between two HUSL colors. - - If you are using the IPython notebook, you can also choose this palette - interactively with the :func:`choose_diverging_palette` function. - - Parameters - ---------- - h_neg, h_pos : float in [0, 359] - Anchor hues for negative and positive extents of the map. - s : float in [0, 100], optional - Anchor saturation for both extents of the map. - l : float in [0, 100], optional - Anchor lightness for both extents of the map. - sep : int, optional - Size of the intermediate region. - n : int, optional - Number of colors in the palette (if not returning a cmap) - center : {"light", "dark"}, optional - Whether the center of the palette is light or dark - as_cmap : bool, optional - If True, return a :class:`matplotlib.colors.Colormap`. - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - See Also - -------- - dark_palette : Create a sequential palette with dark values. - light_palette : Create a sequential palette with light values. - - Examples - -------- - - Generate a blue-white-red palette: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme() - >>> sns.palplot(sns.diverging_palette(240, 10, n=9)) - - Generate a brighter green-white-purple palette: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.diverging_palette(150, 275, s=80, l=55, n=9)) - - Generate a blue-black-red palette: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.diverging_palette(250, 15, s=75, l=40, - ... n=9, center="dark")) - - Generate a colormap object: - - .. plot:: - :context: close-figs - - >>> from numpy import arange - >>> x = arange(25).reshape(5, 5) - >>> cmap = sns.diverging_palette(220, 20, as_cmap=True) - >>> ax = sns.heatmap(x, cmap=cmap) - - """ - ... - -def blend_palette(colors, n_colors=..., as_cmap=..., input=...): # -> _ColorPalette: - """Make a palette that blends between a list of colors. - - Parameters - ---------- - colors : sequence of colors in various formats interpreted by ``input`` - hex code, html color name, or tuple in ``input`` space. - n_colors : int, optional - Number of colors in the palette. - as_cmap : bool, optional - If True, return a :class:`matplotlib.colors.Colormap`. - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - """ - ... - -def xkcd_palette(colors): # -> _ColorPalette | list[tuple[float, float, float]] | Any | list[str]: - """Make a palette with color names from the xkcd color survey. - - See xkcd for the full list of colors: https://xkcd.com/color/rgb/ - - This is just a simple wrapper around the ``seaborn.xkcd_rgb`` dictionary. - - Parameters - ---------- - colors : list of strings - List of keys in the ``seaborn.xkcd_rgb`` dictionary. - - Returns - ------- - palette : seaborn color palette - Returns the list of colors as RGB tuples in an object that behaves like - other seaborn color palettes. - - See Also - -------- - crayon_palette : Make a palette with Crayola crayon colors. - - """ - ... - -def crayon_palette(colors): # -> _ColorPalette | list[tuple[float, float, float]] | Any | list[str]: - """Make a palette with color names from Crayola crayons. - - Colors are taken from here: - https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors - - This is just a simple wrapper around the ``seaborn.crayons`` dictionary. - - Parameters - ---------- - colors : list of strings - List of keys in the ``seaborn.crayons`` dictionary. - - Returns - ------- - palette : seaborn color palette - Returns the list of colors as rgb tuples in an object that behaves like - other seaborn color palettes. - - See Also - -------- - xkcd_palette : Make a palette with named colors from the XKCD color survey. - - """ - ... - -def cubehelix_palette(n_colors=..., start=..., rot=..., gamma=..., hue=..., light=..., dark=..., reverse=..., as_cmap=...): # -> _ColorPalette: - """Make a sequential palette from the cubehelix system. - - This produces a colormap with linearly-decreasing (or increasing) - brightness. That means that information will be preserved if printed to - black and white or viewed by someone who is colorblind. "cubehelix" is - also available as a matplotlib-based palette, but this function gives the - user more control over the look of the palette and has a different set of - defaults. - - In addition to using this function, it is also possible to generate a - cubehelix palette generally in seaborn using a string-shorthand; see the - example below. - - Parameters - ---------- - n_colors : int - Number of colors in the palette. - start : float, 0 <= start <= 3 - The hue at the start of the helix. - rot : float - Rotations around the hue wheel over the range of the palette. - gamma : float 0 <= gamma - Gamma factor to emphasize darker (gamma < 1) or lighter (gamma > 1) - colors. - hue : float, 0 <= hue <= 1 - Saturation of the colors. - dark : float 0 <= dark <= 1 - Intensity of the darkest color in the palette. - light : float 0 <= light <= 1 - Intensity of the lightest color in the palette. - reverse : bool - If True, the palette will go from dark to light. - as_cmap : bool - If True, return a :class:`matplotlib.colors.Colormap`. - - Returns - ------- - list of RGB tuples or :class:`matplotlib.colors.Colormap` - - See Also - -------- - choose_cubehelix_palette : Launch an interactive widget to select cubehelix - palette parameters. - dark_palette : Create a sequential palette with dark low values. - light_palette : Create a sequential palette with bright low values. - - References - ---------- - Green, D. A. (2011). "A colour scheme for the display of astronomical - intensity images". Bulletin of the Astromical Society of India, Vol. 39, - p. 289-295. - - Examples - -------- - - Generate the default palette: - - .. plot:: - :context: close-figs - - >>> import seaborn as sns; sns.set_theme() - >>> sns.palplot(sns.cubehelix_palette()) - - Rotate backwards from the same starting location: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.cubehelix_palette(rot=-.4)) - - Use a different starting point and shorter rotation: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.cubehelix_palette(start=2.8, rot=.1)) - - Reverse the direction of the lightness ramp: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.cubehelix_palette(reverse=True)) - - Generate a colormap object: - - .. plot:: - :context: close-figs - - >>> from numpy import arange - >>> x = arange(25).reshape(5, 5) - >>> cmap = sns.cubehelix_palette(as_cmap=True) - >>> ax = sns.heatmap(x, cmap=cmap) - - Use the full lightness range: - - .. plot:: - :context: close-figs - - >>> cmap = sns.cubehelix_palette(dark=0, light=1, as_cmap=True) - >>> ax = sns.heatmap(x, cmap=cmap) - - Use through the :func:`color_palette` interface: - - .. plot:: - :context: close-figs - - >>> sns.palplot(sns.color_palette("ch:2,r=.2,l=.6")) - - """ - ... - -def set_color_codes(palette=...): # -> None: - """Change how matplotlib color shorthands are interpreted. - - Calling this will change how shorthand codes like "b" or "g" - are interpreted by matplotlib in subsequent plots. - - Parameters - ---------- - palette : {deep, muted, pastel, dark, bright, colorblind} - Named seaborn palette to use as the source of colors. - - See Also - -------- - set : Color codes can be set through the high-level seaborn style - manager. - set_palette : Color codes can also be set through the function that - sets the matplotlib color cycle. - - Examples - -------- - - Map matplotlib color codes to the default seaborn palette. - - .. plot:: - :context: close-figs - - >>> import matplotlib.pyplot as plt - >>> import seaborn as sns; sns.set_theme() - >>> sns.set_color_codes() - >>> _ = plt.plot([0, 1], color="r") - - Use a different seaborn palette. - - .. plot:: - :context: close-figs - - >>> sns.set_color_codes("dark") - >>> _ = plt.plot([0, 1], color="g") - >>> _ = plt.plot([0, 2], color="m") - - """ - ... - diff --git a/typings/seaborn/rcmod.pyi b/typings/seaborn/rcmod.pyi deleted file mode 100644 index 41193b9..0000000 --- a/typings/seaborn/rcmod.pyi +++ /dev/null @@ -1,265 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -import matplotlib as mpl -from distutils.version import LooseVersion - -"""Control plot style and scaling using the matplotlib rcParams interface.""" -__all__ = ["set_theme", "set", "reset_defaults", "reset_orig", "axes_style", "set_style", "plotting_context", "set_context", "set_palette"] -_style_keys = ... -_context_keys = ... -if LooseVersion(mpl.__version__) >= "3.0": - ... -def set_theme(context=..., style=..., palette=..., font=..., font_scale=..., color_codes=..., rc=...): # -> None: - """Set multiple theme parameters in one step. - - Each set of parameters can be set directly or temporarily, see the - referenced functions below for more information. - - Parameters - ---------- - context : string or dict - Plotting context parameters, see :func:`plotting_context`. - style : string or dict - Axes style parameters, see :func:`axes_style`. - palette : string or sequence - Color palette, see :func:`color_palette`. - font : string - Font family, see matplotlib font manager. - font_scale : float, optional - Separate scaling factor to independently scale the size of the - font elements. - color_codes : bool - If ``True`` and ``palette`` is a seaborn palette, remap the shorthand - color codes (e.g. "b", "g", "r", etc.) to the colors from this palette. - rc : dict or None - Dictionary of rc parameter mappings to override the above. - - """ - ... - -def set(*args, **kwargs): # -> None: - """Alias for :func:`set_theme`, which is the preferred interface.""" - ... - -def reset_defaults(): # -> None: - """Restore all RC params to default settings.""" - ... - -def reset_orig(): # -> None: - """Restore all RC params to original settings (respects custom rc).""" - ... - -def axes_style(style=..., rc=...): # -> _AxesStyle: - """Return a parameter dict for the aesthetic style of the plots. - - This affects things like the color of the axes, whether a grid is - enabled by default, and other aesthetic elements. - - This function returns an object that can be used in a ``with`` statement - to temporarily change the style parameters. - - Parameters - ---------- - style : dict, None, or one of {darkgrid, whitegrid, dark, white, ticks} - A dictionary of parameters or the name of a preconfigured set. - rc : dict, optional - Parameter mappings to override the values in the preset seaborn - style dictionaries. This only updates parameters that are - considered part of the style definition. - - Examples - -------- - >>> st = axes_style("whitegrid") - - >>> set_style("ticks", {"xtick.major.size": 8, "ytick.major.size": 8}) - - >>> import matplotlib.pyplot as plt - >>> with axes_style("white"): - ... f, ax = plt.subplots() - ... ax.plot(x, y) # doctest: +SKIP - - See Also - -------- - set_style : set the matplotlib parameters for a seaborn theme - plotting_context : return a parameter dict to to scale plot elements - color_palette : define the color palette for a plot - - """ - ... - -def set_style(style=..., rc=...): # -> None: - """Set the aesthetic style of the plots. - - This affects things like the color of the axes, whether a grid is - enabled by default, and other aesthetic elements. - - Parameters - ---------- - style : dict, None, or one of {darkgrid, whitegrid, dark, white, ticks} - A dictionary of parameters or the name of a preconfigured set. - rc : dict, optional - Parameter mappings to override the values in the preset seaborn - style dictionaries. This only updates parameters that are - considered part of the style definition. - - Examples - -------- - >>> set_style("whitegrid") - - >>> set_style("ticks", {"xtick.major.size": 8, "ytick.major.size": 8}) - - See Also - -------- - axes_style : return a dict of parameters or use in a ``with`` statement - to temporarily set the style. - set_context : set parameters to scale plot elements - set_palette : set the default color palette for figures - - """ - ... - -def plotting_context(context=..., font_scale=..., rc=...): # -> _PlottingContext: - """Return a parameter dict to scale elements of the figure. - - This affects things like the size of the labels, lines, and other - elements of the plot, but not the overall style. The base context - is "notebook", and the other contexts are "paper", "talk", and "poster", - which are version of the notebook parameters scaled by .8, 1.3, and 1.6, - respectively. - - This function returns an object that can be used in a ``with`` statement - to temporarily change the context parameters. - - Parameters - ---------- - context : dict, None, or one of {paper, notebook, talk, poster} - A dictionary of parameters or the name of a preconfigured set. - font_scale : float, optional - Separate scaling factor to independently scale the size of the - font elements. - rc : dict, optional - Parameter mappings to override the values in the preset seaborn - context dictionaries. This only updates parameters that are - considered part of the context definition. - - Examples - -------- - >>> c = plotting_context("poster") - - >>> c = plotting_context("notebook", font_scale=1.5) - - >>> c = plotting_context("talk", rc={"lines.linewidth": 2}) - - >>> import matplotlib.pyplot as plt - >>> with plotting_context("paper"): - ... f, ax = plt.subplots() - ... ax.plot(x, y) # doctest: +SKIP - - See Also - -------- - set_context : set the matplotlib parameters to scale plot elements - axes_style : return a dict of parameters defining a figure style - color_palette : define the color palette for a plot - - """ - ... - -def set_context(context=..., font_scale=..., rc=...): # -> None: - """Set the plotting context parameters. - - This affects things like the size of the labels, lines, and other - elements of the plot, but not the overall style. The base context - is "notebook", and the other contexts are "paper", "talk", and "poster", - which are version of the notebook parameters scaled by .8, 1.3, and 1.6, - respectively. - - Parameters - ---------- - context : dict, None, or one of {paper, notebook, talk, poster} - A dictionary of parameters or the name of a preconfigured set. - font_scale : float, optional - Separate scaling factor to independently scale the size of the - font elements. - rc : dict, optional - Parameter mappings to override the values in the preset seaborn - context dictionaries. This only updates parameters that are - considered part of the context definition. - - Examples - -------- - >>> set_context("paper") - - >>> set_context("talk", font_scale=1.4) - - >>> set_context("talk", rc={"lines.linewidth": 2}) - - See Also - -------- - plotting_context : return a dictionary of rc parameters, or use in - a ``with`` statement to temporarily set the context. - set_style : set the default parameters for figure style - set_palette : set the default color palette for figures - - """ - ... - -class _RCAesthetics(dict): - def __enter__(self): # -> None: - ... - - def __exit__(self, exc_type, exc_value, exc_tb): # -> None: - ... - - def __call__(self, func): # -> _Wrapped[..., Unknown, (*args: Unknown, **kwargs: Unknown), Unknown]: - ... - - - -class _AxesStyle(_RCAesthetics): - """Light wrapper on a dict to set style temporarily.""" - _keys = ... - _set = ... - - -class _PlottingContext(_RCAesthetics): - """Light wrapper on a dict to set context temporarily.""" - _keys = ... - _set = ... - - -def set_palette(palette, n_colors=..., desat=..., color_codes=...): # -> None: - """Set the matplotlib color cycle using a seaborn palette. - - Parameters - ---------- - palette : seaborn color paltte | matplotlib colormap | hls | husl - Palette definition. Should be something that :func:`color_palette` - can process. - n_colors : int - Number of colors in the cycle. The default number of colors will depend - on the format of ``palette``, see the :func:`color_palette` - documentation for more information. - desat : float - Proportion to desaturate each color by. - color_codes : bool - If ``True`` and ``palette`` is a seaborn palette, remap the shorthand - color codes (e.g. "b", "g", "r", etc.) to the colors from this palette. - - Examples - -------- - >>> set_palette("Reds") - - >>> set_palette("Set1", 8, .75) - - See Also - -------- - color_palette : build a color palette or set the color cycle temporarily - in a ``with`` statement. - set_context : set parameters to scale plot elements - set_style : set the default parameters for figure style - - """ - ... - diff --git a/typings/seaborn/regression.pyi b/typings/seaborn/regression.pyi deleted file mode 100644 index c1a8ffe..0000000 --- a/typings/seaborn/regression.pyi +++ /dev/null @@ -1,158 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._decorators import _deprecate_positional_args - -"""Plotting functions for linear models (broadly construed).""" -_has_statsmodels = ... -__all__ = ["lmplot", "regplot", "residplot"] -class _LinearPlotter: - """Base class for plotting relational data in tidy format. - - To get anything useful done you'll have to inherit from this, but setup - code that can be abstracted out should be put here. - - """ - def establish_variables(self, data, **kws): # -> None: - """Extract variables from data or use directly.""" - ... - - def dropna(self, *vars): # -> None: - """Remove observations with missing data.""" - ... - - def plot(self, ax): - ... - - - -class _RegressionPlotter(_LinearPlotter): - """Plotter for numeric independent variables with regression model. - - This does the computations and drawing for the `regplot` function, and - is thus also used indirectly by `lmplot`. - """ - def __init__(self, x, y, data=..., x_estimator=..., x_bins=..., x_ci=..., scatter=..., fit_reg=..., ci=..., n_boot=..., units=..., seed=..., order=..., logistic=..., lowess=..., robust=..., logx=..., x_partial=..., y_partial=..., truncate=..., dropna=..., x_jitter=..., y_jitter=..., color=..., label=...) -> None: - ... - - @property - def scatter_data(self): # -> tuple[ndarray[Any, dtype[Unknown]] | NDArray[floating[Any]], ndarray[Any, dtype[Unknown]] | NDArray[floating[Any]]]: - """Data where each observation is a point.""" - ... - - @property - def estimate_data(self): # -> tuple[list[Any], list[Unknown], list[Unknown]]: - """Data with a point estimate and CI for each discrete x value.""" - ... - - def fit_regression(self, ax=..., x_range=..., grid=...): # -> tuple[Unknown, Unknown | NDArray[float64] | Any, Unknown | None]: - """Fit the regression model.""" - ... - - def fit_fast(self, grid): # -> tuple[Any, None] | tuple[Any, Any]: - """Low-level regression and prediction using linear algebra.""" - ... - - def fit_poly(self, grid, order): # -> tuple[Unknown, None] | tuple[Unknown, NDArray[Unknown]]: - """Regression using numpy polyfit for higher-order trends.""" - ... - - def fit_statsmodels(self, grid, model, **kwargs): # -> tuple[Unknown | NDArray[float64], None] | tuple[Unknown | NDArray[float64], NDArray[Unknown]]: - """More general regression function using statsmodels objects.""" - ... - - def fit_lowess(self): # -> tuple[Unknown, Unknown]: - """Fit a locally-weighted regression, which returns its own grid.""" - ... - - def fit_logx(self, grid): # -> tuple[Any, None] | tuple[Any, Any]: - """Fit the model in log-space.""" - ... - - def bin_predictor(self, bins): # -> tuple[Any, Any]: - """Discretize a predictor by assigning value to closest bin.""" - ... - - def regress_out(self, a, b): # -> ndarray[Any, dtype[Unknown]]: - """Regress b from a keeping a's original mean.""" - ... - - def plot(self, ax, scatter_kws, line_kws): # -> None: - """Draw the full plot.""" - ... - - def scatterplot(self, ax, kws): # -> None: - """Draw the data.""" - ... - - def lineplot(self, ax, kws): # -> None: - """Draw the model.""" - ... - - - -_regression_docs = ... -@_deprecate_positional_args -def lmplot(*, x=..., y=..., data=..., hue=..., col=..., row=..., palette=..., col_wrap=..., height=..., aspect=..., markers=..., sharex=..., sharey=..., hue_order=..., col_order=..., row_order=..., legend=..., legend_out=..., x_estimator=..., x_bins=..., x_ci=..., scatter=..., fit_reg=..., ci=..., n_boot=..., units=..., seed=..., order=..., logistic=..., lowess=..., robust=..., logx=..., x_partial=..., y_partial=..., truncate=..., x_jitter=..., y_jitter=..., scatter_kws=..., line_kws=..., size=...): # -> FacetGrid: - ... - -@_deprecate_positional_args -def regplot(*, x=..., y=..., data=..., x_estimator=..., x_bins=..., x_ci=..., scatter=..., fit_reg=..., ci=..., n_boot=..., units=..., seed=..., order=..., logistic=..., lowess=..., robust=..., logx=..., x_partial=..., y_partial=..., truncate=..., dropna=..., x_jitter=..., y_jitter=..., label=..., color=..., marker=..., scatter_kws=..., line_kws=..., ax=...): # -> Axes: - ... - -@_deprecate_positional_args -def residplot(*, x=..., y=..., data=..., lowess=..., x_partial=..., y_partial=..., order=..., robust=..., dropna=..., label=..., color=..., scatter_kws=..., line_kws=..., ax=...): # -> Axes: - """Plot the residuals of a linear regression. - - This function will regress y on x (possibly as a robust or polynomial - regression) and then draw a scatterplot of the residuals. You can - optionally fit a lowess smoother to the residual plot, which can - help in determining if there is structure to the residuals. - - Parameters - ---------- - x : vector or string - Data or column name in `data` for the predictor variable. - y : vector or string - Data or column name in `data` for the response variable. - data : DataFrame, optional - DataFrame to use if `x` and `y` are column names. - lowess : boolean, optional - Fit a lowess smoother to the residual scatterplot. - {x, y}_partial : matrix or string(s) , optional - Matrix with same first dimension as `x`, or column name(s) in `data`. - These variables are treated as confounding and are removed from - the `x` or `y` variables before plotting. - order : int, optional - Order of the polynomial to fit when calculating the residuals. - robust : boolean, optional - Fit a robust linear regression when calculating the residuals. - dropna : boolean, optional - If True, ignore observations with missing data when fitting and - plotting. - label : string, optional - Label that will be used in any plot legends. - color : matplotlib color, optional - Color to use for all elements of the plot. - {scatter, line}_kws : dictionaries, optional - Additional keyword arguments passed to scatter() and plot() for drawing - the components of the plot. - ax : matplotlib axis, optional - Plot into this axis, otherwise grab the current axis or make a new - one if not existing. - - Returns - ------- - ax: matplotlib axes - Axes with the regression plot. - - See Also - -------- - regplot : Plot a simple linear regression model. - jointplot : Draw a :func:`residplot` with univariate marginal distributions - (when used with ``kind="resid"``). - - """ - ... - diff --git a/typings/seaborn/relational.pyi b/typings/seaborn/relational.pyi deleted file mode 100644 index f952891..0000000 --- a/typings/seaborn/relational.pyi +++ /dev/null @@ -1,59 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -from ._core import VectorPlotter -from ._decorators import _deprecate_positional_args - -__all__ = ["relplot", "scatterplot", "lineplot"] -_relational_narrative = ... -_relational_docs = ... -_param_docs = ... -class _RelationalPlotter(VectorPlotter): - wide_structure = ... - sort = ... - def add_legend_data(self, ax): - """Add labeled artists to represent the different plot semantics.""" - ... - - - -class _LinePlotter(_RelationalPlotter): - _legend_attributes = ... - _legend_func = ... - def __init__(self, *, data=..., variables=..., estimator=..., ci=..., n_boot=..., seed=..., sort=..., err_style=..., err_kws=..., legend=...) -> None: - ... - - def aggregate(self, vals, grouper, units=...): # -> tuple[Unknown, Unknown, None] | tuple[Unknown, Unknown, Series | DataFrame | Unknown | None]: - """Compute an estimate and confidence interval using grouper.""" - ... - - def plot(self, ax, kws): # -> None: - """Draw the plot onto an axes, passing matplotlib kwargs.""" - ... - - - -class _ScatterPlotter(_RelationalPlotter): - _legend_attributes = ... - _legend_func = ... - def __init__(self, *, data=..., variables=..., x_bins=..., y_bins=..., estimator=..., ci=..., n_boot=..., alpha=..., x_jitter=..., y_jitter=..., legend=...) -> None: - ... - - def plot(self, ax, kws): # -> None: - ... - - - -@_deprecate_positional_args -def lineplot(*, x=..., y=..., hue=..., size=..., style=..., data=..., palette=..., hue_order=..., hue_norm=..., sizes=..., size_order=..., size_norm=..., dashes=..., markers=..., style_order=..., units=..., estimator=..., ci=..., n_boot=..., seed=..., sort=..., err_style=..., err_kws=..., legend=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def scatterplot(*, x=..., y=..., hue=..., style=..., size=..., data=..., palette=..., hue_order=..., hue_norm=..., sizes=..., size_order=..., size_norm=..., markers=..., style_order=..., x_bins=..., y_bins=..., units=..., estimator=..., ci=..., n_boot=..., alpha=..., x_jitter=..., y_jitter=..., legend=..., ax=..., **kwargs): # -> Axes: - ... - -@_deprecate_positional_args -def relplot(*, x=..., y=..., hue=..., size=..., style=..., data=..., row=..., col=..., col_wrap=..., row_order=..., col_order=..., palette=..., hue_order=..., hue_norm=..., sizes=..., size_order=..., size_norm=..., markers=..., dashes=..., style_order=..., legend=..., kind=..., height=..., aspect=..., facet_kws=..., units=..., **kwargs): # -> FacetGrid: - ... - diff --git a/typings/seaborn/tests/__init__.pyi b/typings/seaborn/tests/__init__.pyi deleted file mode 100644 index 006bc27..0000000 --- a/typings/seaborn/tests/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - diff --git a/typings/seaborn/utils.pyi b/typings/seaborn/utils.pyi deleted file mode 100644 index d3178e2..0000000 --- a/typings/seaborn/utils.pyi +++ /dev/null @@ -1,344 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -"""Utility functions, mostly for internal use.""" -__all__ = ["desaturate", "saturate", "set_hls_values", "despine", "get_dataset_names", "get_data_home", "load_dataset"] -def sort_df(df, *args, **kwargs): - """Wrapper to handle different pandas sorting API pre/post 0.17.""" - ... - -def ci_to_errsize(cis, heights): # -> NDArray[Unknown]: - """Convert intervals to error arguments relative to plot heights. - - Parameters - ---------- - cis: 2 x n sequence - sequence of confidence interval limits - heights : n sequence - sequence of plot heights - - Returns - ------- - errsize : 2 x n array - sequence of error size relative to height values in correct - format as argument for plt.bar - - """ - ... - -def pmf_hist(a, bins=...): # -> tuple[ndarray[Any, dtype[Any]], Any, Any]: - """Return arguments to plt.bar for pmf-like histogram of an array. - - DEPRECATED: will be removed in a future version. - - Parameters - ---------- - a: array-like - array to make histogram of - bins: int - number of bins - - Returns - ------- - x: array - left x position of bars - h: array - height of bars - w: float - width of bars - - """ - ... - -def desaturate(color, prop): # -> tuple[float, float, float]: - """Decrease the saturation channel of a color by some percent. - - Parameters - ---------- - color : matplotlib color - hex, rgb-tuple, or html color name - prop : float - saturation channel of color will be multiplied by this value - - Returns - ------- - new_color : rgb tuple - desaturated color code in RGB tuple representation - - """ - ... - -def saturate(color): # -> tuple[float, float, float]: - """Return a fully saturated color with the same hue. - - Parameters - ---------- - color : matplotlib color - hex, rgb-tuple, or html color name - - Returns - ------- - new_color : rgb tuple - saturated color code in RGB tuple representation - - """ - ... - -def set_hls_values(color, h=..., l=..., s=...): # -> tuple[float, float, float]: - """Independently manipulate the h, l, or s channels of a color. - - Parameters - ---------- - color : matplotlib color - hex, rgb-tuple, or html color name - h, l, s : floats between 0 and 1, or None - new values for each channel in hls space - - Returns - ------- - new_color : rgb tuple - new color code in RGB tuple representation - - """ - ... - -def axlabel(xlabel, ylabel, **kwargs): # -> None: - """Grab current axis and label it. - - DEPRECATED: will be removed in a future version. - - """ - ... - -def remove_na(vector): - """Helper method for removing null values from data vectors. - - Parameters - ---------- - vector : vector object - Must implement boolean masking with [] subscript syntax. - - Returns - ------- - clean_clean : same type as ``vector`` - Vector of data with null values removed. May be a copy or a view. - - """ - ... - -def get_color_cycle(): # -> Any | list[str]: - """Return the list of colors in the current matplotlib color cycle - - Parameters - ---------- - None - - Returns - ------- - colors : list - List of matplotlib colors in the current cycle, or dark gray if - the current color cycle is empty. - """ - ... - -def despine(fig=..., ax=..., top=..., right=..., left=..., bottom=..., offset=..., trim=...): # -> None: - """Remove the top and right spines from plot(s). - - fig : matplotlib figure, optional - Figure to despine all axes of, defaults to the current figure. - ax : matplotlib axes, optional - Specific axes object to despine. Ignored if fig is provided. - top, right, left, bottom : boolean, optional - If True, remove that spine. - offset : int or dict, optional - Absolute distance, in points, spines should be moved away - from the axes (negative values move spines inward). A single value - applies to all spines; a dict can be used to set offset values per - side. - trim : bool, optional - If True, limit spines to the smallest and largest major tick - on each non-despined axis. - - Returns - ------- - None - - """ - ... - -def percentiles(a, pcts, axis=...): # -> ndarray[Any, dtype[Unknown]]: - """Like scoreatpercentile but can take and return array of percentiles. - - DEPRECATED: will be removed in a future version. - - Parameters - ---------- - a : array - data - pcts : sequence of percentile values - percentile or percentiles to find score at - axis : int or None - if not None, computes scores over this axis - - Returns - ------- - scores: array - array of scores at requested percentiles - first dimension is length of object passed to ``pcts`` - - """ - ... - -def ci(a, which=..., axis=...): - """Return a percentile range from an array of values.""" - ... - -def sig_stars(p): # -> Literal['***', '**', '*', '.', '']: - """Return a R-style significance string corresponding to p values. - - DEPRECATED: will be removed in a future version. - - """ - ... - -def iqr(a): # -> float | NDArray[floating[Any]] | Any | NDArray[Any]: - """Calculate the IQR for an array of numbers. - - DEPRECATED: will be removed in a future version. - - """ - ... - -def get_dataset_names(): # -> list[Any]: - """Report available example datasets, useful for reporting issues. - - Requires an internet connection. - - """ - ... - -def get_data_home(data_home=...): # -> str: - """Return a path to the cache directory for example datasets. - - This directory is then used by :func:`load_dataset`. - - If the ``data_home`` argument is not specified, it tries to read from the - ``SEABORN_DATA`` environment variable and defaults to ``~/seaborn-data``. - - """ - ... - -def load_dataset(name, cache=..., data_home=..., **kws): - """Load an example dataset from the online repository (requires internet). - - This function provides quick access to a small number of example datasets - that are useful for documenting seaborn or generating reproducible examples - for bug reports. It is not necessary for normal usage. - - Note that some of the datasets have a small amount of preprocessing applied - to define a proper ordering for categorical variables. - - Use :func:`get_dataset_names` to see a list of available datasets. - - Parameters - ---------- - name : str - Name of the dataset (``{name}.csv`` on - https://github.com/mwaskom/seaborn-data). - cache : boolean, optional - If True, try to load from the local cache first, and save to the cache - if a download is required. - data_home : string, optional - The directory in which to cache data; see :func:`get_data_home`. - kws : keys and values, optional - Additional keyword arguments are passed to passed through to - :func:`pandas.read_csv`. - - Returns - ------- - df : :class:`pandas.DataFrame` - Tabular data, possibly with some preprocessing applied. - - """ - ... - -def axis_ticklabels_overlap(labels): # -> Literal[False]: - """Return a boolean for whether the list of ticklabels have overlaps. - - Parameters - ---------- - labels : list of matplotlib ticklabels - - Returns - ------- - overlap : boolean - True if any of the labels overlap. - - """ - ... - -def axes_ticklabels_overlap(ax): # -> tuple[Unknown | Literal[False], Unknown | Literal[False]]: - """Return booleans for whether the x and y ticklabels on an Axes overlap. - - Parameters - ---------- - ax : matplotlib Axes - - Returns - ------- - x_overlap, y_overlap : booleans - True when the labels on that axis overlap. - - """ - ... - -def locator_to_legend_entries(locator, limits, dtype): # -> tuple[list[Unknown], list[Unknown]]: - """Return levels and formatted levels for brief numeric legends.""" - class dummy_axis: - ... - - - -def relative_luminance(color): # -> Any: - """Calculate the relative luminance of a color according to W3C standards - - Parameters - ---------- - color : matplotlib color or sequence of matplotlib colors - Hex code, rgb-tuple, or html color name. - - Returns - ------- - luminance : float(s) between 0 and 1 - - """ - ... - -def to_utf8(obj): # -> str: - """Return a string representing a Python object. - - Strings (i.e. type ``str``) are returned unchanged. - - Byte strings (i.e. type ``bytes``) are returned as UTF-8-decoded strings. - - For other objects, the method ``__str__()`` is called, and the result is - returned as a string. - - Parameters - ---------- - obj : object - Any Python object - - Returns - ------- - s : str - UTF-8-decoded string representation of ``obj`` - - """ - ... - -def adjust_legend_subtitles(legend): # -> None: - """Make invisible-handle "subtitles" entries look more like titles.""" - ... - diff --git a/typings/seaborn/widgets.pyi b/typings/seaborn/widgets.pyi deleted file mode 100644 index 122da5b..0000000 --- a/typings/seaborn/widgets.pyi +++ /dev/null @@ -1,165 +0,0 @@ -""" -This type stub file was generated by pyright. -""" - -__all__ = ["choose_colorbrewer_palette", "choose_cubehelix_palette", "choose_dark_palette", "choose_light_palette", "choose_diverging_palette"] -def choose_colorbrewer_palette(data_type, as_cmap=...): # -> LinearSegmentedColormap | list[Unknown]: - """Select a palette from the ColorBrewer set. - - These palettes are built into matplotlib and can be used by name in - many seaborn functions, or by passing the object returned by this function. - - Parameters - ---------- - data_type : {'sequential', 'diverging', 'qualitative'} - This describes the kind of data you want to visualize. See the seaborn - color palette docs for more information about how to choose this value. - Note that you can pass substrings (e.g. 'q' for 'qualitative. - - as_cmap : bool - If True, the return value is a matplotlib colormap rather than a - list of discrete colors. - - Returns - ------- - pal or cmap : list of colors or matplotlib colormap - Object that can be passed to plotting functions. - - See Also - -------- - dark_palette : Create a sequential palette with dark low values. - light_palette : Create a sequential palette with bright low values. - diverging_palette : Create a diverging palette from selected colors. - cubehelix_palette : Create a sequential palette or colormap using the - cubehelix system. - - - """ - ... - -def choose_dark_palette(input=..., as_cmap=...): # -> LinearSegmentedColormap | list[Unknown]: - """Launch an interactive widget to create a dark sequential palette. - - This corresponds with the :func:`dark_palette` function. This kind - of palette is good for data that range between relatively uninteresting - low values and interesting high values. - - Requires IPython 2+ and must be used in the notebook. - - Parameters - ---------- - input : {'husl', 'hls', 'rgb'} - Color space for defining the seed value. Note that the default is - different than the default input for :func:`dark_palette`. - as_cmap : bool - If True, the return value is a matplotlib colormap rather than a - list of discrete colors. - - Returns - ------- - pal or cmap : list of colors or matplotlib colormap - Object that can be passed to plotting functions. - - See Also - -------- - dark_palette : Create a sequential palette with dark low values. - light_palette : Create a sequential palette with bright low values. - cubehelix_palette : Create a sequential palette or colormap using the - cubehelix system. - - """ - ... - -def choose_light_palette(input=..., as_cmap=...): # -> LinearSegmentedColormap | list[Unknown]: - """Launch an interactive widget to create a light sequential palette. - - This corresponds with the :func:`light_palette` function. This kind - of palette is good for data that range between relatively uninteresting - low values and interesting high values. - - Requires IPython 2+ and must be used in the notebook. - - Parameters - ---------- - input : {'husl', 'hls', 'rgb'} - Color space for defining the seed value. Note that the default is - different than the default input for :func:`light_palette`. - as_cmap : bool - If True, the return value is a matplotlib colormap rather than a - list of discrete colors. - - Returns - ------- - pal or cmap : list of colors or matplotlib colormap - Object that can be passed to plotting functions. - - See Also - -------- - light_palette : Create a sequential palette with bright low values. - dark_palette : Create a sequential palette with dark low values. - cubehelix_palette : Create a sequential palette or colormap using the - cubehelix system. - - """ - ... - -def choose_diverging_palette(as_cmap=...): # -> LinearSegmentedColormap | list[Unknown]: - """Launch an interactive widget to choose a diverging color palette. - - This corresponds with the :func:`diverging_palette` function. This kind - of palette is good for data that range between interesting low values - and interesting high values with a meaningful midpoint. (For example, - change scores relative to some baseline value). - - Requires IPython 2+ and must be used in the notebook. - - Parameters - ---------- - as_cmap : bool - If True, the return value is a matplotlib colormap rather than a - list of discrete colors. - - Returns - ------- - pal or cmap : list of colors or matplotlib colormap - Object that can be passed to plotting functions. - - See Also - -------- - diverging_palette : Create a diverging color palette or colormap. - choose_colorbrewer_palette : Interactively choose palettes from the - colorbrewer set, including diverging palettes. - - """ - ... - -def choose_cubehelix_palette(as_cmap=...): # -> LinearSegmentedColormap | list[Unknown]: - """Launch an interactive widget to create a sequential cubehelix palette. - - This corresponds with the :func:`cubehelix_palette` function. This kind - of palette is good for data that range between relatively uninteresting - low values and interesting high values. The cubehelix system allows the - palette to have more hue variance across the range, which can be helpful - for distinguishing a wider range of values. - - Requires IPython 2+ and must be used in the notebook. - - Parameters - ---------- - as_cmap : bool - If True, the return value is a matplotlib colormap rather than a - list of discrete colors. - - Returns - ------- - pal or cmap : list of colors or matplotlib colormap - Object that can be passed to plotting functions. - - See Also - -------- - cubehelix_palette : Create a sequential palette or colormap using the - cubehelix system. - - """ - ... -