Python Forum
nanmean - np - np.mean - errror
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
nanmean - np - np.mean - errror
#2
Not sure if I understand, but the "mean" is nothing more than the sum of a list of numbers divided by the number of items in the list.  So for example, taking your column 1 numbers we can use something simple like:

col_1 = [-177.01262488, -486.95502974, -701.57667656, -739.68606132, 496.35283147]
total = 0.0

# Column 1 mean
for n in col_1:
    total += n
print("Total = ", total)
mean_1 = total / len(col_1)
print("Mean of column 1 = ", mean_1)
and end up with:

Output:
Total =  -1608.8775610300002 Mean of column 1 =  -321.77551220600003
The same could be done for column 2. Not as fancy as numpy, but it will at least give you something to compare outputs.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
nanmean - np - np.mean - errror - by venkim_python - Nov-28-2016, 07:22 AM
RE: nanmean - np - np.mean - errror - by sparkz_alot - Nov-28-2016, 02:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python indentation errror and output error jazzy 4 3,413 Sep-19-2018, 09:35 AM
Last Post: jazzy

Forum Jump:

User Panel Messages

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