-
Notifications
You must be signed in to change notification settings - Fork 18
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
base: main
Are you sure you want to change the base?
Тюленев Дмитрий #13
Conversation
Numpy (26.02)/Numpy_Task.ipynb
Outdated
}, | ||
{ | ||
"cell_type": "code", | ||
"source": "z = np.zeros((2, 25))\nprint(z)", |
There was a problem hiding this comment.
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))
Numpy (26.02)/Numpy_Task.ipynb
Outdated
}, | ||
{ | ||
"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)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше использовать flatten вместо ravel, так как ravel сохраняет ссылки на оригинальный массив
Numpy (26.02)/Numpy_Task.ipynb
Outdated
}, | ||
{ | ||
"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", |
There was a problem hiding this comment.
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
5 баллов |
Если я запушил то свежачок сразу отправляется в пулл реквест как я понял? |
5 баллов за Pandas 1 |
5 баллов Pandas and EDA |
No description provided.