清华版电子书:“偏函数”和数学上的偏函数不一样。数学上的偏函数是啥?

2022-02-14 12:08:05 +08:00
 miniyao

清华大学出版社出版在某乎上的电子书:Python 3.6 从入门到精通(视频教学版) 王英英 著

6.11 偏函数

Python 的 functools 模块提供了很多有用的功能,其中一个就是偏函数( Partial function )。注意,这里的偏函数和数学意义上的偏函数不一样。


数学上只学过偏微分、偏导数。请教:数学上的“偏函数”是个啥?

1666 次点击
所在节点    问与答
8 条回复
noe132
2022-02-14 12:12:58 +08:00
这个不就是 funtional programming 里常用的吗? currying
https://mostly-adequate.gitbook.io/mostly-adequate-guide/ch04
masterclock
2022-02-14 12:15:50 +08:00
miniyao
2022-02-14 12:41:05 +08:00
@noe132
@masterclock

标题:“偏函数”和数学上的偏函数不一样。

问的是数学上的“偏函数”是啥?哪里不一样?不是问编程里什么叫偏函数。
masterclock
2022-02-14 12:51:36 +08:00
??
这个维基百科写的难道不是数学上的偏函数?
Xusually
2022-02-14 13:30:35 +08:00
??? 2L 不是给了链接吗
miniyao
2022-02-14 13:33:31 +08:00
@masterclock
@miniyao

维基上的解释,Partial function 不就是编程上一样的吗,没看出来和数学上的“偏函数”有什么不同呀
c24941
2022-02-14 14:21:01 +08:00
Not to be confused with the partial application of a function of several variables, by fixing some of them.

https://en.wikipedia.org/wiki/Partial_application
Jooooooooo
2022-02-15 10:41:29 +08:00
@miniyao ?

In mathematics, a partial function f from a set X to a set Y is a function from a subset S of X (possibly X itself) to Y. The subset S, that is, the domain of f viewed as a function, is called the domain of definition of f. If S equals X, that is, if f is defined on every element in X, then f is said to be total.

维基你真的读过吗?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/833713

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX