In python, we write like this when using "where": ```python grid=np.array([[1,2,3,0,0,4],[5,6,7,0,0,8]]) xs, ys = np.where(grid == 0) ``` but I don't know how to use "where" in Numpy.NET. I wrote like this but it proves to be wrong: ```c# var array = new int[2, 6] { { 1, 2, 3, 0, 0, 4 },{ 5, 6, 7, 0, 0, 8 } }; var a = np.array(array); var b = np.where(np.array(a==np.array(0))); Console.WriteLine(b[0]); ```
Activity
henon commentedon Jun 22, 2024
Python does some magic by converting
==toequals(...). Here is how you write the same in C#:np.where(grid.equals(0));Demonstrate use of `np.where` #128
yiJiangHen commentedon Jun 24, 2024
Thank you, dear henon! You saved my day.