楼主: Lisrelchen
5609 44

[精品图书]Learning SciPy for Numerical and Scientific Computing [推广有奖]

31
Nicolle 学生认证  发表于 2015-5-30 12:09:26

Create a Pascal Matrix

提示: 作者被禁止或删除 内容自动屏蔽

32
Nicolle 学生认证  发表于 2015-5-30 12:10:52
提示: 作者被禁止或删除 内容自动屏蔽

33
Lisrelchen 发表于 2015-5-30 12:23:54
Generate a Van der Monde matrix.
  1. Examples

  2. >>>
  3. >>> x = np.array([1, 2, 3, 5])
  4. >>> N = 3
  5. >>> np.vander(x, N)
  6. array([[ 1,  1,  1],
  7.        [ 4,  2,  1],
  8.        [ 9,  3,  1],
  9.        [25,  5,  1]])
  10. >>>
  11. >>> np.column_stack([x**(N-1-i) for i in range(N)])
  12. array([[ 1,  1,  1],
  13.        [ 4,  2,  1],
  14.        [ 9,  3,  1],
  15.        [25,  5,  1]])
  16. >>>
  17. >>> x = np.array([1, 2, 3, 5])
  18. >>> np.vander(x)
  19. array([[  1,   1,   1,   1],
  20.        [  8,   4,   2,   1],
  21.        [ 27,   9,   3,   1],
  22.        [125,  25,   5,   1]])
  23. >>> np.vander(x, increasing=True)
  24. array([[  1,   1,   1,   1],
  25.        [  1,   2,   4,   8],
  26.        [  1,   3,   9,  27],
  27.        [  1,   5,  25, 125]])
  28. The determinant of a square Vandermonde matrix is the product of the differences between the values of the input vector:

  29. >>>
  30. >>> np.linalg.det(np.vander(x))
  31. 48.000000000000043
  32. >>> (5-3)*(5-2)*(5-1)*(3-2)*(3-1)*(2-1)
  33. 48
复制代码

34
Nicolle 学生认证  发表于 2015-9-6 06:54:51

K-Means using Scipy

提示: 作者被禁止或删除 内容自动屏蔽

35
Nicolle 学生认证  发表于 2015-9-6 07:00:05

Hierarchical clustering using Scipy

提示: 作者被禁止或删除 内容自动屏蔽

36
Nicolle 学生认证  发表于 2015-9-6 07:13:36

Clustering mammals by their dentition

提示: 作者被禁止或删除 内容自动屏蔽

37
Nicolle 学生认证  发表于 2015-9-6 07:27:11

Solving Laplace's Equation using Scipy

提示: 作者被禁止或删除 内容自动屏蔽

38
Nicolle 学生认证  发表于 2015-9-6 07:34:41

Vector Addition/Subtraction

提示: 作者被禁止或删除 内容自动屏蔽

39
Nicolle 学生认证  发表于 2015-9-6 07:36:57
提示: 作者被禁止或删除 内容自动屏蔽

40
Nicolle 学生认证  发表于 2015-9-6 07:38:03
提示: 作者被禁止或删除 内容自动屏蔽

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-29 07:34