-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I'm trying to generate an NDArray object using a short[] array but NumSharp throws an exception:
Specified method is not supported
at NumSharp.Backends.Unmanaged.ArraySlice.FromArray(Array arr, Boolean copy)
at NumSharp.NDArray..ctor(Array values, Shape shape, Char order)
[REDACTED]
For the time being I solved with something like that, but I think it's only a workaround and not a solution:
if (data.GetType() == typeof(short[]))
data = Array.ConvertAll((short[]) data, Convert.ToInt32);
NDarray ndarray = new NDArray(data, new Shape(height, width, channels));
I navigated the code and figured out that Int16 is missing ad an accepted format. Is it a wanted behavior or a missing feature?
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels