1
1261
submitted 1 day ago by [email protected] to c/[email protected]
2
238
submitted 10 hours ago by [email protected] to c/[email protected]
3
274
submitted 1 day ago* (last edited 1 day ago) by [email protected] to c/[email protected]

Explanation: Python is a programming language. Numpy is a library for python that makes it possible to run large computations much faster than in native python. In order to make that possible, it needs to keep its own set of data types that are different from python's native datatypes, which means you now have two different bool types and two different sets of True and False. Lovely.

Mypy is a type checker for python (python supports static typing, but doesn't actually enforce it). Mypy treats numpy's bool_ and python's native bool as incompatible types, leading to the asinine error message above. Mypy is "technically" correct, since they are two completely different classes. But in practice, there is little functional difference between bool and bool_. So you have to do dumb workarounds like declaring every bool values as bool | np.bool_ or casting bool_ down to bool. Ugh. Both numpy and mypy declared this issue a WONTFIX. Lovely.

4
367
submitted 1 day ago by [email protected] to c/[email protected]
5
460
submitted 2 days ago by [email protected] to c/[email protected]
6
523
submitted 3 days ago by [email protected] to c/[email protected]
7
494
I am a sinner (sh.itjust.works)
submitted 3 days ago by [email protected] to c/[email protected]
8
837
submitted 3 days ago by [email protected] to c/[email protected]
9
933
Certified in AI (sh.itjust.works)
submitted 3 days ago by [email protected] to c/[email protected]
10
776
submitted 3 days ago by [email protected] to c/[email protected]
11
198
submitted 3 days ago by [email protected] to c/[email protected]
12
495
submitted 3 days ago by [email protected] to c/[email protected]
13
168
submitted 3 days ago by [email protected] to c/[email protected]
14
170
Let's do micro service (sh.itjust.works)
submitted 3 days ago by [email protected] to c/[email protected]
15
187
js Monk and Fly (sh.itjust.works)
submitted 3 days ago by [email protected] to c/[email protected]
16
440
got him (lemy.lol)
submitted 6 days ago by [email protected] to c/[email protected]
17
287
submitted 5 days ago by [email protected] to c/[email protected]
18
275
submitted 6 days ago by [email protected] to c/[email protected]
19
1089
Users (lemmy.world)
submitted 1 week ago by [email protected] to c/[email protected]
20
35
submitted 1 week ago by [email protected] to c/[email protected]
21
115
Best constant in all of iOS! (developer.apple.com)
submitted 1 week ago by [email protected] to c/[email protected]

Part of the contact management framework. The label for the contact’s mother’s sibling’s younger son or father’s sister’s younger son.

22
269
Interview tips (lemmy.ml)
submitted 1 week ago by [email protected] to c/[email protected]
23
331
submitted 1 week ago by [email protected] to c/[email protected]
24
360
submitted 1 week ago by [email protected] to c/[email protected]
25
104
Added Bugs to Keep my job (sh.itjust.works)
submitted 1 week ago by [email protected] to c/[email protected]
view more: next ›

Programmer Humor

30772 readers
917 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS