You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Test]publicvoidMultiIdSetItem(){vara=np.arange(5);Debug.Log($"a = {a}");varids=np.array(newint[]{1,3});Debug.Log($"ids = {ids}");varnewValues=np.array(newint[]{10,20});Debug.Log($"newValues = {newValues}");a[ids]=newValues;Debug.Log($"after set item: a = {a}");varexpected=np.array(new[]{0,10,2,20,4});Assert.AreEqual(expected,a);}
Output:
Expected and actual are both <NumSharp.NDArray>
Values differ at index [1]
Expected: 10
But was: 1
---
a = [0, 1, 2, 3, 4]
ids = [1, 3]
newValues = [10, 20]
after set item: a = [0, 1, 2, 3, 4]
Activity
Nucs commentedon Apr 12, 2026
SetItem for multiple indices now works correctly:
Resolved via #600, #602, #603, #596.