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
string str = "00000.jpg 130,83,205,108,0 130,137,154,161,1 255,137,279,160,2 125,186,177,208,3 210,186,236,208,4 285,186,311,208,5 130,237,400,292,6 230,328,555,354,7";
var line = str.Split();
List<List> allList = new List<List>();
var boxarr = line.Skip(1).Select(box => np.array(box.Split(',').Select(int.Parse))).ToList();
var aa = boxarr.ToArray();//How to convert List<NDArray> to NDArray
@williamlzw, you can stack them directly now (0.70.0, #628):
varlist=newList<NDArray>{np.array(new[]{1,2,3}),np.array(new[]{4,5,6})};varstacked=np.stack(list.ToArray());// new leading axisConsole.WriteLine(stacked);// [[1 2 3]// [4 5 6]]
np.array(jagged), np.concatenate, and np.stack(..., axis: 1) are all available too. Closing.
Activity
[-]How to convert List<NDarray> to NDarray[/-][+]How to convert List<NDArray> to NDArray[/+]Nucs commentedon Sep 7, 2026
@williamlzw, you can stack them directly now (0.70.0, #628):
np.array(jagged),np.concatenate, andnp.stack(..., axis: 1)are all available too. Closing.