TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

LLMs all fail this NumPy indexing example

6 点作者 minihat3 个月前
When mixing basic slicing with an advanced index, NumPy moves the advanced index&#x27;s subspace to the front, so in the example, A[0, :, B] produces a shape of (4, 2) rather than (2, 4).<p><pre><code> import numpy as np A = np.random.rand(1, 2, 2) B = np.array([0, 1, 0, 1]) C = A[0, :, B] print(&quot;C.shape:&quot;, C.shape) </code></pre> So far every LLM I&#x27;ve tried (Grok 3, o1, Gemini Pro) all predict (2, 4) and can&#x27;t be persuaded otherwise.

1 comment

dekhn3 个月前
So what?
评论 #43094020 未加载