Exercises
- Do we have to install NumPy independently if our Python was installed via Anaconda?
- What are the advantages of using a super package to install many modules simultaneously?
- How do you find all the functions contained in NumPy or SciPy?
- How many ways are there to import a specific function contained in SciPy?
- What is wrong with the following operation?
>>>x=[1,2,3] >>>x.sum()
- How can we print all the data items for a given array?
- What is wrong with the following lines of code?
>>>import np >>>x=np.array([True,false,true,false],bool)
- Find out the meaning of
skewtest
included in the stats submodule (SciPy), and give an example of using this function. - What is the difference between an arithmetic mean and a geometric mean?
- Debug the following lines of code, which are used to estimate a geometric mean for a given set of returns:
>>>import scipy as sp >>>ret=np.array([0.05,0.11,-0.03]) >>>pow(np.prod(ret+1),1/len(ret))-1
- Write a Python...