Skip to content

failed to use "where" in Numpy.NET #128

@yiJiangHen

Description

@yiJiangHen

In python, we write like this when using "where":

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:

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]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions