Why do "Not a Number" values equal True when cast as boolean in Python/Numpy?

Pubblicato il: 18 novembre 2022
sul canale di: The Python Oracle
6
0

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Magic Ocean Looping

--

Chapters
00:00 Question
00:38 Accepted answer (Score 38)
01:06 Answer 2 (Score 8)
01:36 Answer 3 (Score 3)
02:15 Answer 4 (Score 2)
02:42 Thank you

--

Full question
https://stackoverflow.com/questions/1...

Accepted answer links:
[documentation]: http://docs.python.org/2/library/stdt...

Answer 2 links:
[truth-value testing]: http://docs.python.org/2/library/stdt...
[numpy.isnan]: http://docs.scipy.org/doc/numpy/refer...

Answer 4 links:
[python standard for truth testing]: http://docs.python.org/2/library/stdt...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/l...

--

Tags
#python #math #numpy

#avk47


In questa pagina del sito puoi guardare il video online Why do "Not a Number" values equal True when cast as boolean in Python/Numpy? della durata di ore minuti seconda in buona qualità , che l'utente ha caricato The Python Oracle 18 novembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 6 volte e gli è piaciuto 0 spettatori. Buona visione!