Python Forum
python code to calculate mean of an array of numbers using numpy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python code to calculate mean of an array of numbers using numpy
#1
Kindly advise with the correct python code to get the mean of an array of numbers using numpy method.

The data variable is an array with randomly-generated integer numbers ranging from 0 to 1 that follow a uniform distribution.

Viren
Reply
#2
The official numpy documentation perhaps?
« We can solve any problem by introducing an extra level of indirection »
Reply
#3
(May-29-2024, 02:33 PM)Gribouillis Wrote: The official numpy documentation perhaps?

I have gone through the official document but still can't get the correct code.
If you can help with the code?
Reply
#4
(May-29-2024, 03:04 PM)viren Wrote: I have gone through the official document but still can't get the correct code.
What don't you understand in the code examples of the documentation page that I linked above?
« We can solve any problem by introducing an extra level of indirection »
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert numpy array to image without loading it into RAM. DreamingInsanity 7 6,179 Feb-08-2024, 09:38 AM
Last Post: paul18fr
  How do I calculate a ratio from 2 numbers and return an equivalent list of about 1000 Pleiades 8 16,150 Jan-05-2024, 08:30 PM
Last Post: sgrey
  IPython errors for numpy array min/max methods muelaner 1 699 Nov-04-2023, 09:22 PM
Last Post: snippsat
  Expand the range of a NumPy array? PythonNPC 0 863 Jan-31-2023, 02:41 AM
Last Post: PythonNPC
  Change a numpy array to a dataframe Led_Zeppelin 3 1,238 Jan-26-2023, 09:01 PM
Last Post: deanhystad
  from numpy array to csv - rounding SchroedingersLion 6 2,469 Nov-14-2022, 09:09 PM
Last Post: deanhystad
  numpy.array has no attribute head Led_Zeppelin 1 1,431 Jul-13-2022, 12:56 AM
Last Post: Led_Zeppelin
  Seeing al the data in a dataframe or numpy.array Led_Zeppelin 1 1,249 Jul-11-2022, 08:54 PM
Last Post: Larz60+
  go over and search in numpy array faster caro 7 1,957 Jun-20-2022, 04:54 PM
Last Post: deanhystad
  Creating a numpy array from specific values of a spreadsheet column JulianZ 0 1,259 Apr-19-2022, 07:36 AM
Last Post: JulianZ

Forum Jump:

User Panel Messages

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