mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-26 18:02:27 +08:00
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
![66853113+pre-commit-ci[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
5f95d6f805
commit
bc8df6de31
@ -18,6 +18,7 @@ Overview:
|
||||
- function square_zero_matrix(N)
|
||||
- function random_matrix(W, H, a, b)
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import math
|
||||
@ -96,12 +97,10 @@ class Vector:
|
||||
raise Exception("must have the same size")
|
||||
|
||||
@overload
|
||||
def __mul__(self, other: float) -> Vector:
|
||||
...
|
||||
def __mul__(self, other: float) -> Vector: ...
|
||||
|
||||
@overload
|
||||
def __mul__(self, other: Vector) -> float:
|
||||
...
|
||||
def __mul__(self, other: Vector) -> float: ...
|
||||
|
||||
def __mul__(self, other: float | Vector) -> float | Vector:
|
||||
"""
|
||||
@ -309,12 +308,10 @@ class Matrix:
|
||||
raise Exception("matrices must have the same dimension!")
|
||||
|
||||
@overload
|
||||
def __mul__(self, other: float) -> Matrix:
|
||||
...
|
||||
def __mul__(self, other: float) -> Matrix: ...
|
||||
|
||||
@overload
|
||||
def __mul__(self, other: Vector) -> Vector:
|
||||
...
|
||||
def __mul__(self, other: Vector) -> Vector: ...
|
||||
|
||||
def __mul__(self, other: float | Vector) -> Vector | Matrix:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user