Skip to content

Confusing instruction: System.Exception: Unable to determine array type. Could not find any non-null entries. Please specify dtype #32

@Happypig375

Description

@Happypig375
System.Console.WriteLine(np.array(new string[,]{
  { null, null }, { null, null }
}))

throws

Error: System.Exception: Unable to determine array type. Could not find any non-null entries. Please specify dtype
at NumpyDotNet.np.FindFirstNonNullValue(Array ssrc)
at NumpyDotNet.np.asanyarray(Object a, dtype dtype, NPY_ORDER order)
at NumpyDotNet.np.FromAny(Object src, dtype descr, Int32 minDepth, Int32 maxDepth, NPYARRAYFLAGS flags, Object context)
at NumpyDotNet.np.CheckFromAny(Object src, dtype descr, Int32 minDepth, Int32 maxDepth, NPYARRAYFLAGS requires, Object context)
at NumpyDotNet.np.array(Object src, dtype dtype, Boolean copy, NPY_ORDER order, Boolean subok, Int32 ndmin)

However, specifying dtype does not change this fact. The same exception is still thrown.

System.Console.WriteLine(np.array(new string[,]{
  { null, null }, { null, null }
}, np.Strings))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions