Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

stackoverflow/slack shields#384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vmuriart merged 3 commits intomasterfromstackoverflow-shield
Feb 16, 2017
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
Clean README.md
Shields got too long for a single line, had to break them up into two lines.One for build/quality status, the other for social/info.Add regression number to disabled code.
  • Loading branch information
@vmuriart
vmuriart committedFeb 16, 2017
commitc0bfaa6cfb5e8c477cdf8773b4fbfc48b0a63265
9 changes: 5 additions & 4 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,7 @@
[![appveyor shield][]](https://ci.appveyor.com/project/pythonnet/pythonnet/branch/master)
[![travis shield][]](https://travis-ci.org/pythonnet/pythonnet)
[![codecov shield][]](https://codecov.io/github/pythonnet/pythonnet)

[![license shield][]](./LICENSE)
[![pypi package version][]](https://pypi.python.org/pypi/pythonnet)
[![python supported shield][]](https://pypi.python.org/pypi/pythonnet)
Expand DownExpand Up@@ -37,14 +38,14 @@ from System.Windows.Forms import Form
## Embedding Python in .NET

- All calls to python should be inside
a `using (Py.GIL()) {/_ Your code here_/}` block.
a `using (Py.GIL()) {/* Your code here*/}` block.
- Import python modules using `dynamic mod = Py.Import("mod")`,
then you can call functions as normal, eg `mod.func(args)`.
- Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))`
to apply keyword arguments.
- All python objects should be declared as `dynamic` type.
- Mathematical operations involving python and literal/managed types must
have the python object first, eg `np.pi_2` works, `2_np.pi` doesn't.
have the python object first, eg. `np.pi_2` works, `2_np.pi` doesn't.

### Example

Expand All@@ -59,7 +60,7 @@ static void Main(string[] args)
Console.WriteLine(sin(5));
double c = np.cos(5) + sin(5);
Console.WriteLine(c);
/* this block is temporarily disabled due to regression
/* this block is temporarily disabled due to regression #249
dynamic a = np.array(new List<float> { 1, 2, 3 });
dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32));
Console.WriteLine(a.dtype);
Expand All@@ -83,7 +84,7 @@ int32

[appveyor shield]: https://img.shields.io/appveyor/ci/pythonnet/pythonnet/master.svg?label=AppVeyor

[codecov shield]: https://img.shields.io/codecov/c/github/pythonnet/pythonnet/master.svg?label=codecov
[codecov shield]: https://img.shields.io/codecov/c/github/pythonnet/pythonnet/master.svg?label=Codecov

[license shield]: https://img.shields.io/badge/license-MIT-blue.svg?maxAge=3600

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp