10000 dot not get expected result when running ReadMe example · Issue #684 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content
dot not get expected result when running ReadMe example #684
Closed
@mushramb0

Description

@mushramb0

Environment

Pythonnet version: 2.3
Python version: 3.5.5
Operating System: Windows 10

Details

hi,my code is:
static void Main(string[] args)
{
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 });
    Console.WriteLine(b.dtype);

    Console.WriteLine(a * b);
    Console.ReadKey();
}

}

my output is:
1.0
-0.9589242746631385
-0.675262089199912
object
object
NULL

why not the same as the readme output?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0