8000 Initial tensorflow stubs by hmc-cs-mdrissi · Pull Request #8974 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Initial tensorflow stubs #8974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jan 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix couple mypy errors.
  • Loading branch information
Mehdi Drissi committed Jan 11, 2023
commit 5fc1ce4d35ad78f6b32daaeefa7b7ec7b1315234
13 changes: 6 additions & 7 deletions stubs/tensorflow/tensorflow/__init__.pyi
7DE9
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from _typeshed import Incomplete
from _typeshed import Incomplete, Self
from builtins import bool as _bool
from collections import Iterable, Iterator, Sequence
from collections.abc import Iterable, Iterator, Sequence
from contextlib import contextmanager
from typing import Any, NoReturn, overload
from typing_extensions import Self, TypeAlias
from typing_extensions import TypeAlias

import numpy as np
from tensorflow.dtypes import *
Expand Down Expand Up @@ -60,8 +60,8 @@ class Tensor:
def __rand__(self, other: _TensorCompatible) -> Tensor: ...
def __or__(self, other: _TensorCompatible) -> Tensor: ...
def __ror__(self, other: _TensorCompatible) -> Tensor: ...
def __eq__(self, other: _TensorCompatible) -> Tensor: ...
def __ne__(self, other: _TensorCompatible) -> Tensor: ...
def __eq__(self, other: _TensorCompatible) -> Tensor: ... # type: ignore[override]
def __ne__(self, other: _TensorCompatible) -> Tensor: ... # type: ignore[override]
def __ge__(self, other: _TensorCompatible) -> Tensor: ...
def __gt__(self, other: _TensorCompatible) -> Tensor: ...
def __le__(self, other: _TensorCompatible) -> Tensor: ...
Expand Down Expand Up @@ -129,14 +129,13 @@ class TensorShape:
def __len__(self) -> int: ...
def __add__(self, other: Iterable[int | None]) -> TensorShape: ...
def __radd__(self, other: Iterable[int | None]) -> TensorShape: ...
def __eq__(self, other: Iterable[int | None]) -> _bool: ...
def __getattr__(self, name: str) -> Incomplete: ...

class Graph:
def add_to_collection(self, name: str, value: object) -> None: ...
def add_to_collections(self, names: Iterable[str] | str, value: object) -> None: ...
@contextmanager
def as_default(self) -> Iterator[Self]: ...
def as_default(self: Self) -> Iterator[Self]: ...
def finalize(self) -> None: ...
def get_tensor_by_name(self, name: str) -> Tensor: ...
def get_operation_by_name(self, name: str) -> Operation: ...
Expand Down
0