通过 J 语言中的动词秩表达 NumPy 广播
Expressing NumPy Broadcasting via Verb Rank in J
浏览论文内容
中文总结 AI 辅助
本文建立了 NumPy 广播与 J 语言动词秩之间的形式对应关系,并在 J 中实现了 NumPy 广播,为两种数组编程方法提供了形式化联系。
中文摘要 AI 辅助
数组编程范式将操作应用于整个数组而非单个元素,从而消除了显式循环并抽象了计算的许多底层细节。两种有影响力的方法塑造了数组编程:NumPy 的广播和 Kenneth Iverson 的面向数组的记号,后者首先在 APL 中引入,随后在 J 语言中得到发展。尽管 NumPy 的数组编程模型受到 Iverson 工作的影响,但这两个系统对数组操作的形式化方式不同:NumPy 主要通过数组形状和广播,而 J 通过动词秩。本文建立了 NumPy 广播与 J 秩之间的形式对应关系,并给出了在 J 中实现 NumPy 广播的实现。研究结果为两种有影响力的面向数组计算方法提供了形式化联系,并展示了它们如何解决对具有不同形状的数组应用操作而无显式循环这一共同问题。
英文摘要
The array programming paradigm applies operations to entire arrays rather than individual elements, eliminating explicit loops and abstracting many low-level details of computation. Two influential approaches have shaped array programming: NumPy's broadcasting and Kenneth Iverson's array-oriented notation, with the latter first introduced in APL and later developed in the J language. Although NumPy's array programming model was influenced by Iverson's work, the two systems formalize array operations differently: NumPy primarily through array shapes and broadcasting, and J through verb rank. This paper establishes a formal correspondence between NumPy broadcasting and J rank and presents an implementation of NumPy broadcasting in J. The results provide a formal connection between two influential approaches to array-oriented computation and show how they address the common problem of applying operations to arrays with differing shapes without explicit loops.
发表机构
- Faculty of Mathematics, Informatics and Mechanics, University of Warsaw(华沙大学数学、信息学和机械学院)
- Jsoftware Inc.(J软件公司)
机构由 AI 辅助整理,请以论文原文为准。