Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Happypig375 opened this issue May 29, 2022 · 1 comment · May be fixed by #33

Comments

@Happypig375
Copy link
Contributor

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))
@KevinBaselinesw
Copy link
Collaborator

I accepted your changes. They will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants