Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Permanent Nan in NP
#8
You are abusing both numpy and Python
vari[~np.isnan(vari)].tolist()
will give you the list of non-NaN values in your array.

Iteration over indices is extremely un-Pythonic
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Messages In This Thread
Permanent Nan in NP - by Antigr - Jun-26-2018, 01:31 PM
RE: Permanent Nan in NP - by Larz60+ - Jun-26-2018, 02:50 PM
RE: Permanent Nan in NP - by Antigr - Jun-26-2018, 03:15 PM
RE: Permanent Nan in NP - by Larz60+ - Jun-26-2018, 03:40 PM
RE: Permanent Nan in NP - by Antigr - Jun-26-2018, 04:55 PM
RE: Permanent Nan in NP - by Larz60+ - Jun-26-2018, 05:15 PM
RE: Permanent Nan in NP - by Antigr - Jun-26-2018, 05:32 PM
RE: Permanent Nan in NP - by volcano63 - Jun-26-2018, 07:06 PM
RE: Permanent Nan in NP - by Antigr - Jun-27-2018, 01:19 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020