losttech / Gradient

This repository serves as a public issue tracker and documentation host for Gradient, full TensorFlow binding for .NET
Other
86 stars 4 forks source link

Passing multidimensional C# array to np.array results in a flat numpy array #27

Closed lostmsu closed 4 years ago

lostmsu commented 4 years ago
var shape = np.array(new float[,] { { 0, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 } }).shape;

Expected

(4,2)

Actual

8

Workaround

Use jagged array or reshape.

lostmsu commented 4 years ago

Upstream issue: https://github.com/pythonnet/pythonnet/issues/1141