Hi All,
I tried the example of embedding python inside a clr application.
using (Py.GIL())
{
dynamic np = Py.Import("numpy");
Console.WriteLine(np.cos(np.pi * 2));
dynamic sin = np.sin;
Console.WriteLine(sin(5));
double c = np.cos(5) + sin(5);
Console.WriteLine(c);
dynamic a = np.array(new List<float> { 1, 2, 3 });
Console.WriteLine(a.dtype);
dynamic b = np.array(new List<float> { 6, 5, 4 }, dtype:
np.int32);
Console.WriteLine(b.dtype);
Console.WriteLine(a * b);
Console.ReadKey();
}
However the output I get is all scrambled
?0?
???????3 ? ?
-0.675262089199912
???4?ty
??24?
???????? ?
Is there some encoding settings that I need to set somewhere?
Thanks,
Phat