| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,17 +56,22 @@ static void Main(string[] args) | |||
| 56 | 56 | using (Py.GIL()) | |
| 57 | 57 | { | |
| 58 | 58 | dynamic np = Py.Import("numpy"); | |
| 59 | + Console.WriteLine(np.cos(np.pi * 2)); | ||
| 60 | + | ||
| 59 | 61 | dynamic sin = np.sin; | |
| 60 | - Console.WriteLine(np.cos(np.pi*2)); | ||
| 61 | 62 | Console.WriteLine(sin(5)); | |
| 63 | + | ||
| 62 | 64 | double c = np.cos(5) + sin(5); | |
| 63 | 65 | Console.WriteLine(c); | |
| 64 | 66 | /* this block is temporarily disabled due to regression #249 | |
| 65 | 67 | dynamic a = np.array(new List<float> { 1, 2, 3 }); | |
| 66 | - dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32)); | ||
| 67 | 68 | Console.WriteLine(a.dtype); | |
| 69 | + | ||
| 70 | + dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32)); | ||
| 68 | 71 | Console.WriteLine(b.dtype); | |
| 69 | - Console.WriteLine(a * b); */ | ||
| 72 | + | ||
| 73 | + Console.WriteLine(a * b); | ||
| 74 | + */ | ||
| 70 | 75 | Console.ReadKey(); | |
| 71 | 76 | } | |
| 72 | 77 | } | |
@@ -80,7 +85,7 @@ Output: | |||
| 80 | 85 | -0.6752620892 | |
| 81 | 86 | float64 | |
| 82 | 87 | int32 | |
| 83 | - [6. 10. 12.] | ||
| 88 | + [ 6. 10. 12.] | ||
| 84 | 89 | ``` | |
| 85 | 90 | ||
| 86 | 91 | [appveyor shield]: https://img.shields.io/appveyor/ci/pythonnet/pythonnet/master.svg?label=AppVeyor | |
| Back | FazBrowse Home | New Git URL |
0 commit comments