Skip to content

B12-514_AkbulatovArtur#177

Open
warpath2 wants to merge 12 commits into
EvgrafovMichail:mainfrom
warpath2:main
Open

B12-514_AkbulatovArtur#177
warpath2 wants to merge 12 commits into
EvgrafovMichail:mainfrom
warpath2:main

Conversation

@warpath2
Copy link
Copy Markdown

@warpath2 warpath2 commented Mar 6, 2026

No description provided.

@Avshugan Avshugan added the 514 label Mar 9, 2026
azimuth: np.ndarray,
inclination: np.ndarray,
) -> tuple[np.ndarray, np.ndarray, np.ndarray]: ...
def convert_to_sphere(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не проходит ruff format

@warpath2
Copy link
Copy Markdown
Author

линт ругается на первый сем

if M != M2 or K != K2:
raise ShapeMismatchError

Imx = np.eye(M)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У меня нет террабайта оперативной памяти :(

coeffs = dots / lengths_sq
projs = np.zeros_like(matrix)

for i in range(len(matrix)):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно же projs = coeffs * matrix

vector: np.ndarray,
) -> tuple[np.ndarray | None, np.ndarray | None]: ...
) -> tuple[np.ndarray | None, np.ndarray | None]:
if matrix.shape[0] != matrix.shape[1] or matrix.shape[1] != len(vector):
Copy link
Copy Markdown
Collaborator

@Avshugan Avshugan May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем где-то len? Сделали бы все через .shape

if matrix.shape[0] != matrix.shape[1] or matrix.shape[1] != len(vector):
raise ShapeMismatchError

if abs(np.linalg.det(matrix)) < 1e-10:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Использование детерменанта для определения сингулярности матрицы - это ошибка, так как при вычислении детерменанта из-за компьютерных ошибок вы можете получить любое число.

import matplotlib.pyplot as plt
import numpy as np

script_dir = os.path.dirname(__file__)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше было бы писать код в функции

# ваш код
return FuncAnimation()

fig, ax = plt.subplots(figsize=(10, 6))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет названия графика, легенды

"id": "d7b00711",
"metadata": {},
"outputs": [],
"outputs": [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Много уж слишком длинных строк, лучше все-таки ограничится 3-4 операциями в строку (ну или меньше)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants