我应该切换到Python吗? [英] Should i switch to Python?

查看:81
本文介绍了我应该切换到Python吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在考虑切换到Python编程语言.目前,Matlab是我部门用于快速开发和原型化代码的首选语言.这样做非常好,但是Mathworks(生产Matlab的公司)一直在修改许可条款,从而导致本该不存在的麻烦.

I recently have been considering switching to the Python programming language. Currently, Matlab is the language of choice in my department for rapid development and prototyping of code. It’s very good at this, but Mathworks (the company who produces Matlab) have been tinkering with the licencing terms, leading to hassles where none should exist.

推荐答案

我发现python + numpy + scipy + matplotlib + IPython + [random sci/numericalpackages]几乎可以完全替代matlab.当然肯定缺少某些软件包,因此,如果在matlab中提供了一套专门的工具,而在python中却没有,这可能是一个问题,但是除此之外,我没有回头.

I have found python+numpy+scipy+matplotlib+IPython+[random sci/numerical packages] to be almost a complete replacement for matlab. There are certainly some packages missing, so if there is a specialized set of tools that are available in matlab but not in python, this might be an issue, but otherwise, I haven't looked back.

我将提到python与matlab相比有几个明显的优势

I'll mention a couple of distinct advantages of python over matlab

  • 使用真正的编程语言,而不是在数字包上抛出的语言(numpy出现在python上,而不是其他方式).与Matlab相比,管理大型python项目完全是一件乐事. matlab中有多少种不同的oop系统?
  • 完全免费且便携式.我可以在几乎任何机器上使用python而不会出现许可问题.从我的角度来看,这是最大的优势.
  • 用SWIG,Cython,f2py等包装C,C ++中的其他库,Fortran相当简单,而不是像mex文件那样丑陋
  • Cython来加快慢速代码的速度(尽管我发现numpy的速度几​​乎与matlab一样快)
  • mpi4py与我必须从matlab购买的一些其他软件包才能运行并行应用程序
  • True programming language instead of a hack of a language thrown over a numerical package (numpy came to python instead of the other way around). Managing large python projects is a complete joy vs matlab. How many different oop systems have been mangled into matlab?
  • Totally free and portable. I can use python on just about any machine without licensing issues. This is the biggest advantage from my perspective.
  • Wrapping other libraries in C,C++, Fortran is fairly straightforward using SWIG, Cython,f2py,etc vs the ugliness that is a mex file
  • Cython for accelerating slow code (although I find that numpy is nearly as fast if not faster than matlab)
  • mpi4py vs some other package that I have to buy from matlab to run parallel applications

我个人大部分工作都使用Enthought Python发行版,因为它打包了所有内容,并且对学术界的个人免费.我还是从头开始构建python及其所有库和模块.模块管理可能是python中最大的弱点,但是有一些不错的东西可以帮忙,例如virtualenvpip

Personally I use the Enthought Python Distribution for a lot of my work, because it packages everything and is free for individuals in academia. I've alternatively built python and all of its libraries and modules from scratch. Module management is perhaps the largest weakness in python, but there are some nice things to help out like virtualenv and pip

这篇关于我应该切换到Python吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆