THIS Numpy functionality is in the STANDARD LIBRARY?! #python #coding #howto

preview_player
Показать описание
If you want to see more of me, join my Discord server!

I get a lot of people asking, so here's my setup!

Affiliations (I may earn a commission):



If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.

#python #coding #howto
Рекомендации по теме
Комментарии
Автор

You can also use filter() from functional programming

santiagohal
Автор

Isn' that just doing [i for (i, m) in zip(days, mask) if m]

SkyyySi
Автор

It would’ve interesting if you comprehensively filtered the days

wuuvok
Автор

[i for n, i in enumerate(DAYS) if MASK[n % len(MASK)]]
does the same thing no? but the itertools/numpy approach is way more readable 😅

qwkq
Автор

It's a SELECTOR! 😂 But I guess MASK has fewer characters.

burgerzach