- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
* * * * * * * * * * * * * * * * * * * * 10/30/20089/25/20089/11/2008 * 9/25/20089/11/2008 * Shell Scripting 9/11/2008 Research Computing Center, UNC-CH * * In order for create a section divider slide, add a new slide, select the “Title Only” Slide Layout and apply the “Section Divider” master from the Slide Design menu. For more information regarding slide layouts and slide designs, please visit /training Eigenvalues from LinearAlgebra import * val = eigenvalues(c) val, vec = eigenvectors(c) print val [1., 4., 1.] print vec [[0.816, -0.408, -0.408], [0.575, 0.577, 0.577], [-0.324, -0.487, 0.811]] also solve_linear_equations, singular_value_decomposition, etc. Least Squares Fitting Part of Hinsens Scientific Python module from LeastSquares import * def func(params,x): # y=ax^2+bx+c return params[0]*x*x + params[1]*x + params[2] data = [] for i in range(10): data.append((i,i*i)) guess = (3,2,1) fit_params, fit_error = leastSquaresFit(func,guess,data) print fit_params [1.00,0.000,0.00] FFT from FFT import * data = array((1,0,1,0,1,0,1,0)) print fft(data).real [4., 0., 0., 0., 4., 0., 0., 0.]] Also note that the FFTW package (fastest Fourier transform in the West) has a python wrapper. See notes at the end Python Standard Libraries/Modules: /library/ /dci/dci_components/shared_apps/packages/python_packages.html /pypi/ Command-line arguments import sys print len(sys.argv) # NOT argc # Print all arguments: print sys.argv # Print all arguments but the program # or module name: print sys.argv[1:] # array slice Catching Exceptions #python code a.py x = 0 try: print 1/x except ZeroDivisionError, message: print Can’t divide by zero: print message python a.py Cant divide by zero: integer division or modulo by zero Try-Finally: Cleanup f = open(file) try: process_file(f) finally: f.close() # always executed print OK # executed on success only Raising Exceptions raise IndexError raise IndexError(k out of range) rais
您可能关注的文档
- 练习题(2)分析.doc
- 课题二提升钢丝绳的应用技术分析.ppt
- 茅以升学院土木拔尖班土木工程专业本科生培养计划分析.doc
- 能源统计报表制度分析.doc
- 莆田市公路工程施工监理招标分析.doc
- 青岛市二一六年初中学业水平考试分析.doc
- 衢州学院分析.doc
- 食品科技产业园电商中心办公设备采购询价表分析.doc
- 说明[001]分析.doc
- 隧道调频覆盖工程分析.doc
- QualityAssuranceHandbook分析.doc
- PropertyVisualAids分析.ppt
- QuickguideSelectinganITsolutionforyourBusiness分析.docx
- Questionsd'histoiredessciencesdel'Univers分析.doc
- QZHJCX-B-20(10)分析.doc
- RAPPORTDESTAGEAL'ETRANGER分析.doc
- ReconfigurableMicrofluidicSystemArchitectureBasedon分析.doc
- References[CarbonNanotueInterconnects]分析.doc
- ReflectorIndex,1906分析.doc
- ReflectionsonLeadership分析.ppt
文档评论(0)