Skip to content
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

Тюленев Дмитрий #13

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Deeksmayker
Copy link

No description provided.

},
{
"cell_type": "code",
"source": "z = np.zeros((2, 25))\nprint(z)",
Copy link
Owner

Choose a reason for hiding this comment

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

Должно было быть z = np.zeros((5, 5))

},
{
"cell_type": "code",
"source": "r, c = np.random.randint(3, 7), np.random.randint(2,12)\na = np.random.randint(-20,20,(r,c)) \nprint(a)\nN = (r * c)//2\nprint(N)\nsample = np.random.choice(a.ravel(),size=N )\nprint(sample)",
Copy link
Owner

Choose a reason for hiding this comment

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

Лучше использовать flatten вместо ravel, так как ravel сохраняет ссылки на оригинальный массив

},
{
"cell_type": "code",
"source": "a = np.array([1, np.NaN, np.Inf], float)\nprint(np.isnan(a))\nprint(np.isinf(a))\na[1:]=0\na",
Copy link
Owner

Choose a reason for hiding this comment

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

Лучше использовать булевую индексацию
a[np.isnan(a) | np.isinf(a)] = 0

@railbotan
Copy link
Owner

5 баллов

@Deeksmayker
Copy link
Author

Если я запушил то свежачок сразу отправляется в пулл реквест как я понял?

@railbotan
Copy link
Owner

5 баллов за Pandas 1

@railbotan
Copy link
Owner

5 баллов Pandas and EDA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants