[PR #8378] [CLOSED] convert: fix tensor iteration by calling Items() method #59392

Closed
opened 2026-04-29 14:19:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/8378
Author: @BruceMacD
Created: 1/10/2025
Status: Closed

Base: mainHead: brucemacd/fix-convert_test


📝 Commits (1)

  • d6ee168 convert: fix tensor iteration by calling Items() method

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 convert/convert_test.go (+1 -1)

📄 Description

This fixes a range iteration error by properly calling the Items() method instead of trying to range over the method itself.

Previously the code was attempting to iterate over the function definition of Items, which isn't the valid way to do a range over a function in Go. By adding parentheses to call the method, we now correctly iterate over the returned []*Tensor slice.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/8378 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 1/10/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `brucemacd/fix-convert_test` --- ### 📝 Commits (1) - [`d6ee168`](https://github.com/ollama/ollama/commit/d6ee168ad92eb92d0f7899d2e17fe2ed7bfdf7a2) convert: fix tensor iteration by calling Items() method ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert_test.go` (+1 -1) </details> ### 📄 Description This fixes a range iteration error by properly calling the `Items()` method instead of trying to range over the method itself. Previously the code was attempting to iterate over the function definition of `Items`, which isn't the valid way to do a range over a function in Go. By adding parentheses to call the method, we now correctly iterate over the returned `[]*Tensor` slice. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 14:19:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#59392