cannot convert from 'NumSharp.NDArray' to 'System.Array'
twister11211 opened this issue · 1 comments
twister11211 commented
im trying to bring a custom AI model into C# I prepared the input the same way in python and it runs properly im able to prepare my input data the way i need it with num sharp but cant convert it into a System.Array that the model requires the fallowing is all that was required to make it run in python if any one could show me how to do that it would be a great help
int[]input = {57, 45, 46, 56, 11, 46};
var ip = np.asarray((0)).reshape((1));
ip.reshape((1, input.Length));
QingtaoLi1 commented
You can use npArray.Data<int>().ToArray()
to convert from NDArray to int[].