September 4th, 2013, 12:20 PM

Python in scientific computing ..scipy
Hi,
I need help regarding any component of Scipy module collection like NumPy, IPYthon etc.
 what's the module purpose, example as to how it's used & how it might be used in you area of study.
Thanks.
September 5th, 2013, 01:43 AM

I work for ETS, administrator of Test of English as a Foreign Language. Suppose we want to find the correlation between score on the test and years of study. (I don't know if we collect "years of English study" data. Let's assume we do.) We could use the statistics functions, corrcoef perhaps, to start the study.
Or suppose we wanted to know if there were a seasonal influence on scores. We could look for spikes in the Fourier transform of the mean score versus time over several years for students living between 42 and 50 degrees north latitude. To use the fast version of the transform we might need to interpolate data onto a uniform grid.
Maybe you want to estimate the fraction of oxygen would be left in the atmosphere if all the coal were burned in the next hundred years. The calculus functions, like integration, could be useful.
What if you have a stiffness matrix lying around and you need the normal modes. Find the Eigen values!
Your friend throws some chemicals into your blender then adds ice. These chemicals react in various ways with different reaction rates. Could you determine the end products using an ODE solver for the coupled equations? Nice of me to take temperature out of the problem, huh.
You wanna design a bridge, and you need to determine the size for each beam or cable. This is a statics problem, because THE BRIDGE ISN'T SUPPOSED TO MOVE, so you know that the sum of the forces at each joint must be zero. And you know that the sum of the moments about each joint must be 0. See
www.mae.ncsu.edu/rabiei/courses/mae206/ch06.ppt
and the like. Anyway, you end up with a linear equation solving for x
A x = b
A are geometry factors, a matrix,
b are the known loads, a vector,
x are the component forces in each member. A vector.
Monopoly is your favorite game. Which properties are landed on most frequently? Make a matrix representing the transition probability from one square to every other for each starting square. It will be a 40 by 40 matrix if I recall correctly, because there are 40 "cells" on a monopoly board. The transition probability to advance from GO to Baltic Avenue is 1/18  there's one of the 1600 matrix entries for you. (I'm pretty sure you can't get there from GO with doubles or cards.) Multiply this matrix by itself until it converges (or stop anywhere along the line) and you'll know the probability to land on a square at each move. Definitely a case for scipy. I'd use j, since it's got a built in feature for recognizing convergence and the matrix multiplication is easier to write.
Last edited by b49P23TIvg; September 5th, 2013 at 01:47 AM.
[code]
Code tags[/code] are essential for python code and Makefiles!
September 6th, 2013, 11:09 AM

This is a real good answer. I never expected this huge answer with examples in different fields of study. You are a genius man...I work with Oracle & we don't use python at all. So, I an trying to find general examples from experts like you . I appreciate it.
Thanks.
September 6th, 2013, 01:41 PM

I considered for quite a while before answering. My first thought: write a satirical detailed article about the utility of __add__, which would be useless to you. I ain't majored in English, and it wasn't worth the time anyway. Bad idea. Deciding to take you seriously, I provided that scattering of topics without, I trust, enough detail to have actually written your homework for you. I hope one of those gave you an idea to investigate somewhat deeply.
[code]
Code tags[/code] are essential for python code and Makefiles!