資源描述:
《getting started with python libraries》由會員上傳分享,免費在線閱讀,更多相關內容在工程資料-天天文庫。
1、GettingStartedwithPythonLibrariesLet'sgetstarted.Wecanfindamindmapdescribingsoftwarethatcanbeusedfordataanalysisathttp://www.xmind.net/m/WvfC/.Obviously,wecan'tinstallallofthissoftwareinthischapter.WewillinstallNumPy,SciPy,matplotlib,andIPythonondifferen
2、toperatingsystemsandhavealookatsomesimplecodethatusesNumPy.NumPyisafundamentalPythonlibrarythatprovidesnumericalarraysandfunctions.SciPyisascientificPythonlibrary,whichsupplementsandslightlyoverlapsNumPy.NumPyandSciPyhistoricallysharedtheircodebasebutwer
3、elaterseparated.matplotlibisaplottinglibrarybasedonNumPy.YoucanreadmoreaboutmatplotlibinChapter6,DataVisualization.IPythonprovidesanarchitectureforinteractivecomputing.ThemostnotablepartofthisprojectistheIPythonshell.WewillcovertheIPythonshelllaterinthis
4、chapter.Installationinstructionsfortheothersoftwareweneedwillbegiventhroughoutthebookattheappropriatetime.Attheendofthischapter,youwillfindpointersonhowtofindadditionalinformationonlineifyougetstuckorareuncertainaboutthebestwaytosolveproblems.Inthischapt
5、er,wewillcover:?InstallingPython,SciPy,matplotlib,IPython,andNumPyonWindows,Linux,andMacintosh?WritingasimpleapplicationusingNumPyarrays?GettingtoknowIPython?OnlineresourcesandhelpGettingStartedwithPythonLibrariesSoftwareusedinthisbookThesoftwareusedinth
6、isbookisbasedonPython,soyouarerequiredtohavePythoninstalled.Onsomeoperatingsystems,Pythonisalreadyinstalled.You,however,needtocheckwhetherthePythonversioniscompatiblewiththesoftwareversionyouwanttoinstall.TherearemanyimplementationsofPython,includingcomm
7、ercialimplementationsanddistributions.Inthisbook,wewillfocusonthestandardCPythonimplementation,whichisguaranteedtobecompatiblewithNumPy.YoucandownloadPythonfromhttps://www.python.org/download/.Onthiswebsite,wecanfindinstallersforWindowsandMacOSXaswellass
8、ourcearchivesforLinux,Unix,andMacOSX.ThesoftwarewewillinstallinthischapterhasbinaryinstallersforWindows,variousLinuxdistributions,andMacOSX.Therearealsosourcedistributionsifyoupreferthat.YouneedtohavePython2.4.xoraboveinst