Expressing NumPy Broadcasting via Verb Rank in J

📅 2026-09-13
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
本文通过在J语言中引入动词秩来实现NumPy广播,解决了不同形状数组间无显式循环的操作问题。
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

NumPy broadcasting
J rank
array-oriented computation
array shapes
Innovation

Methods, ideas, or system contributions that make the work stand out.

NumPy broadcasting
J rank
array programming
formal correspondence
verb rank
M
Marcin Żołek
1Faculty of Mathematics, Informatics and Mechanics, University of Warsaw, Warsaw, Poland; 2Jsoftware Inc., Toronto, Canada