Python Forum
numpy and statistics module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
numpy and statistics module
#1
hello.
I am trying to get familiar with numpy and statstics module on python

the latter is program i made to input any list and try to find the standard deviation of the list

i am getting an error; please check on this.

thank you very much.

the latter is code

import numpy
import statistics

rawstr = raw_input("type a 4-list of integers")
rawstr1 = raw_input("type a 4-list of integers")
rawstr2 = raw_input("type a 4-list of integers")
ival = list(rawstr)
ival1 = list(rawstr1)
ival2 = list(rawstr2)

arr = numpy.array([ival1,ival2,ival3])
statistics.stdev(arr)
the latter is error
Error:
ImportError Traceback (most recent call last) <ipython-input-1-ffd1ea567921> in <module>() 1 import numpy ----> 2 import statistics 3 4 rawstr = raw_input("type a 4-list of integers") 5 rawstr1 = raw_input("type a 4-list of integers") ImportError: No module named statistics
thank you
Reply


Messages In This Thread
numpy and statistics module - by baronmontesqieu - Sep-18-2017, 09:57 AM
RE: numpy and statistics module - by Larz60+ - Sep-18-2017, 10:25 AM
RE: numpy and statistics module - by snippsat - Sep-18-2017, 12:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] How to store different data type in one numpy array? water 7 634 Mar-26-2024, 02:18 PM
Last Post: snippsat
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,642 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  AttributeError: module 'numpy' has no attribute 'array aapurdel 7 45,695 May-29-2019, 02:48 AM
Last Post: heiner55
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 3,008 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  No module named numpy rdx 7 59,223 Sep-24-2017, 07:12 AM
Last Post: Larz60+
  Statistics: Two histograms based on word frequency vectors fancy_panther 2 4,765 Mar-27-2017, 01:18 AM
Last Post: zivoni

Forum Jump:

User Panel Messages

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