NumSharp icon indicating copy to clipboard operation
NumSharp copied to clipboard

NDArray string problem

Open lokinfey opened this issue 6 years ago • 1 comments

I try to use var bb8List = new NDArray(typeof(string) , new Shape(bb8Num));

but it show error like this

Exception has occurred: CLR/System.NotSupportedException An unhandled exception of type 'System.NotSupportedException' occurred in NumSharp.Core.dll: 'Specified method is not supported.' at NumSharp.Backends.Unmanaged.ArraySlice.Allocate(Type elementType, Int32 count, Boolean fillDefault) at NumSharp.Backends.UnmanagedStorage.Allocate(Shape shape, Type dtype, Boolean fillZeros) at NumSharp.NDArray..ctor(Type dtype, Shape shape) at TFDemo.Program.Main(String[] args) in /Users/lokinfey/Desktop/File/Proj/AI/tensorflownet/code/TFDemo/Program.cs:line 61

lokinfey avatar Aug 26 '19 02:08 lokinfey

We currently do not support NDArray of string because System.String is not an unmanaged object which causes multiple problems with our current backend architecture since strings can have different sizes. We do plan to implement it ASAP.

Nucs avatar Aug 26 '19 13:08 Nucs