Elementwise[f][{x1,…,xn},{y1,…,yn}]
给出 {f[x1,y1],…,f[xn,yn]}.
Elementwise[f][arg1,…]
逐项作用于 arg1,… 中的所有列表.


Elementwise
Elementwise[f][{x1,…,xn},{y1,…,yn}]
给出 {f[x1,y1],…,f[xn,yn]}.
Elementwise[f][arg1,…]
逐项作用于 arg1,… 中的所有列表.
范例
打开所有单元 关闭所有单元范围 (5)
默认情况下,Greater 不会遍历列表:
用 Elementwise[Greater] 使其变为可列函数:
Min 返回参数中最小的值:
用 Elementwise[Min] 使其能作用到最深层的元素:
下面是由日期组成的 TabularColumn 对象:
用这两列数据构建 Tabular 对象:
取一个包含两列三元组的 Tabular 对象:
Elementwise 可与 Threaded 一起使用:
属性和关系 (6)
Elementwise 遍历的方式与 Listable 函数类似:
Elementwise[f][] 返回 f[]:
Elementwise[f][{}] 返回 {}:
对于几个长度相同的列表,Elementwise[f][list1,list2,…] 等价于 MapThread[f][{list1,list2,…}]:
如果任何列表包含子列表,Elementwise 将尽可能遍历所有元素:
另一个区别是 Elementwise 可遍历标量:
如果 f[list,scalar] 没有计算,Elementwise[f][list,scalar] 等价于 Thread[f[list,scalar]]:
也可用 Map 实现 Elementwise 的一些功能:
或 Thread:
Elementwise 等价于 MapAt 在所有适用层级上使用 All:
文本
Wolfram Research (2025),Elementwise,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Elementwise.html.
CMS
Wolfram 语言. 2025. "Elementwise." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/Elementwise.html.
APA
Wolfram 语言. (2025). Elementwise. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Elementwise.html 年
BibTeX
@misc{reference.wolfram_2025_elementwise, author="Wolfram Research", title="{Elementwise}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/Elementwise.html}", note=[Accessed: 18-September-2025]}
BibLaTeX
@online{reference.wolfram_2025_elementwise, organization={Wolfram Research}, title={Elementwise}, year={2025}, url={https://reference.wolfram.com/language/ref/Elementwise.html}, note=[Accessed: 18-September-2025]}