Introduction

Scientific Computing Tools for Python. Seen in Scipy.org.

Environment

Linux, CentOS 7 with KDE, python 2.7

Installation

 python -m pip install --upgrade pip
# Do not use sudo for the next command
pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
# change the environment
vim ~/.bashrc
# export PATH=$PATH:/home/leaf/.local/bin

A simple demo to solve a Bessel function

Bessel function:  most commonly, the canonical solutions y(x) of the differential equation. Seen in wiki.

Code (Python):

 from matplotlib.pyplot import *
from numpy import *
from scipy import special, optimize
f = lambda x: -special.jv(3,x)
sol = optimize.minimize(f, 1.0)
x = linspace(0, 10, 5000)
x
plot(x, special.jv(3, x), '-', sol.x, -sol.fun, 'o')
savefig('plot.png', dpi=96)

Result:

Simple case. Just for the beginning of applying Scipy.

Scipy - Python library - Math tool - Begin的更多相关文章

  1. 分别使用 Python 和 Math.Net 调用优化算法

    1. Rosenbrock 函数 在数学最优化中,Rosenbrock 函数是一个用来测试最优化算法性能的非凸函数,由Howard Harry Rosenbrock 在 1960 年提出 .也称为 R ...

  2. Where is the python library installed?

    configure: error: Could not link test program to Python. Maybe the main Python library has been inst ...

  3. Python library not found: libpython2.7mu.so.1.0

    在使用pyinstaller生成python可执行文件的时候,包错误,提示有几个依赖的库找不到:Python library not found: libpython2.7mu.so.1.0 参考st ...

  4. kivy.org - Open source Python library for rapid development of applications

    kivy.org - Open source Python library for rapid development of applicationsthat make use of innovati ...

  5. python中math常用函数

    python中math的使用 import math #先导入math包 1 三角函数 print math.pi #打印pi的值 3.14159265359 print math.radians(1 ...

  6. Couchbase III(Python Library)

    Couchbase III(Python Library) 第一步 安装 使用pip安装: >pip install couchbase --quiet 确认是否安装成功: >python ...

  7. 机器学习、NLP、Python和Math最好的150余个教程(建议收藏)

    编辑 | MingMing 尽管机器学习的历史可以追溯到1959年,但目前,这个领域正以前所未有的速度发展.最近,我一直在网上寻找关于机器学习和NLP各方面的好资源,为了帮助到和我有相同需求的人,我整 ...

  8. python -m json.tool 中文乱码 Format JSON with python

    现在以 json 为数据传输格式的 RESTful 接口非常流行.为调试这样的接口,一个常用的办法是使用 curl 命令: curl http://somehost.com/some-restful- ...

  9. python数学math和random模块

    math模块 关注公众号"轻松学编程"了解更多. 在使用math模块时要先导入 # 导入模块 import math 1.math.ceil(num) 对num进行向上取整 num ...

随机推荐

  1. currentColor-CSS3非常有用的变量

    一.currentColor-简介 currentColor顾名思意就是“当前颜色”,准确讲应该是“当前的文字颜色”,例如: .xxx { border: 1px solid currentColor ...

  2. js小游戏---智力游戏

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD ...

  3. LeetCode之344. Reverse String

    ------------------------------- Java也可以实现一行代码反转字符串哦 AC代码如下: public class Solution { public String re ...

  4. python常用文件处理函数_1

    1.range()函数 函数原型:range(start,end,scan) 参数含义:start:计数从start开始.默认是从0开始的,如range()等价于range(0,5)  end:计数到 ...

  5. 【转】png优化相关

    Png是图像文件存储格式,在网页设计中已经不是一个陌生的名词,在前端开发中经常使用到它,如常用CSS 雪碧图.而Png的使用不仅仅如此,Png有多少种格式,有哪些特点,PC端中常用的Png格式是哪些, ...

  6. 【leetcode】Climbing Stairs

    题目简述: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either ...

  7. 【leetcode】Two Sum

    题目简述: Given an array of integers, find two numbers such that they add up to a specific target number ...

  8. 通过VS创建简单的WCF服务

    http://www.cnblogs.com/artech/archive/2007/09/15/893838.html http://www.topwcftutorials.net/2013/09/ ...

  9. 单元测试 逃不开的Done 与约定

    关注单元测试有一段时间了,也做了些尝试然后就停了下来,寻找框架.方法.各种尝试 看得多,尝试的少, 关于框架分为两类,1是自动化测试工具类,1是js单元测试框架 关于自动化测试工具我尝试了http:/ ...

  10. ARM大学计划全球经理到访华清远见,深入交流教育合作

    来源:华清远见嵌入式学院 10月20日,ARM大学计划全球经理Khaled Benkrid,高级内容主编洪川博士在ARM大学计划亚太经理陈炜博士的陪同下到访华清远见,就最新嵌入式技术.ARM处理器在教 ...