Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion data_structures/binary_tree/binary_search_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __reassign_nodes(self, node: Node, new_children: Node | None) -> None:
else:
node.parent.left = new_children
else:
self.root = None
self.root = new_children

def is_right(self, node: Node) -> bool:
if node.parent and node.parent.right:
Expand Down
5 changes: 2 additions & 3 deletions maths/euclidean_distance.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from __future__ import annotations

from collections.abc import Iterable
from typing import Union

import numpy as np

Vector = Union[Iterable[float], Iterable[int], np.ndarray]
VectorOut = Union[np.float64, int, float]
Vector = Iterable[float] | Iterable[int] | np.ndarray
VectorOut = np.float64 | int | float


def euclidean_distance(vector_1: Vector, vector_2: Vector) -> VectorOut:
Expand Down