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 #985 · Back to latest

Older Posts 20 shown
Post #982 3.77K
Что выведет код?
import numpy as np
a = np.array([True, False])
print(np.all(a), np.any(a))
Post #979 3.37K
Дан код
import numpy as np
r = np.array([3, 4, 5])
Post #976 3.37K
Дан код
import numpy as np
a = np.array([[0], [1]])
b = np.array([[1], [-1]])
Post #974 3.48K
Дан код
import numpy as np
a = np.array([[0], [1]])
b = np.array([[1], [-1]])
Post #970 3.63K
Что выведет код?
import numpy as np
a = [('x', 6.0, 1), ('y', 5.0, 2), ('z', 5.0, 3)]
dtype = [('val', 'S1'), ('float', 'f8'), ('int', 'i4')]
b = np.array(a, dtype=dtype)
b.sort(order=['float', 'int'])
print(b[1][0].decode())
Post #967 3.42K
Что выведет код?
import numpy as np
dt = np.dtype([('x', 'f8')])
a = np.zeros(4, dtype=dt)
a['x'] = np.array((0., 1., 2., 3.))
print(a['x'][2] + a['x'][3])
Post #965 3.29K
Что выведет код?
import numpy as np
a = np.ones(2, dtype='int8,float32,complex')
a[0][0] = 2
a[1][1] = 3
a[0][2] = 4j
print(sum(a[0]).imag + sum(a[1]).real)
Post #962 3.18K
Что выведет код?
import numpy as np
a = np.array([1, 2, 3, 4])
b = np.searchsorted(a, 3.5)
print(b)
Post #959 3.24K
Что выведет код?
import numpy as np
a = np.array([30, 0, -1, 7])
x = np.argsort(a)
print(x[0])
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 →