TGViewer
Channel Public Channel
Python Tasks & ML | Задачи по питону и машинному обучению

Python Tasks & ML | Задачи по питону и машинному обучению

@python_tasks

Algorithms, functions, classes, regular expressions, iterators, generators, OOP, exceptions, NumPy, pandas, scikit-learn
https://telega.in/c/python_tasks

Questions — @dina_ladnyuk
Subscribers
8.49K
Photos
30
Videos
1
Links
41

Showing posts older than #1011 · Back to latest

Older Posts 20 shown
Post #1008 3.77K
Что выведет код?
D = {}
A = D
B = D.copy()
B[ 'b' ] = 2
A[ 'b' ] = 3
print(D, B, A)
Post #1005 3.24K
Что выведет код?
import numpy as np
a = np.array([1, 2, -1])
b = np.diff(a)
print(*b)
Post #1002 3.13K
Что выведет код?
import numpy as np
a = np.array([0, 1, -2, 3])
b = a[abs(a) % 2 == 0]
print(*b)
Post #1000 3.23K
Что выведет код?
import numpy as np
a, b = np.ones(1), np.ones(1)
a.dtype = 'int'
b = b.astype('int')
print(a[0] == 1, b[0] == 1)
Post #997 3.2K
Что выведет код?
import numpy as np
a, b = np.zeros(1), np.zeros(1)
a.dtype = 'int'
b = b.astype('int')
print(a[0] == 0, b[0] == 0)
Post #994 3.38K
Что выведет код?
import numpy as np
a = np.array([1, 1])
b = np.ndarray([1, 1])
print(*(a.shape + b.shape))
Post #991 3.15K
Что выведет код?
import numpy as np
a = np.array([0.1, 0.25])
b = np.array([0.1, 0.26])
c = np.allclose(a, b, atol=1e-1)
print(c)
Post #989 3.28K
Что выведет код?
import numpy as np
a = np.array([np.nan])
b = np.array([np.nan])
x = np.isclose(a, b)
y = np.isclose(a, b, equal_nan=True)
print(*x, *y)
Post #987 3.46K
Что выведет код?
import numpy as np
a = np.array([0.1, 0.25])
b = np.array([0.3, 0.26])
c = np.isclose(a, b, atol=1e-1)
print(*c)
Post #985 3.55K
Что выведет код?
import numpy as np
a = np.array([1, 1j])
x = np.isreal(a)
y = np.iscomplex(a)
z = x.sum() + y.sum()
print(z)
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →