FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Implements buffer interface for .NET arrays of primitive types by lostmsu · Pull Request #1511 · pythonnet/pythonnet · GitHub

Implements buffer interface for .NET arrays of primitive types - #1511

Merged
filmor merged 1 commit into
pythonnet:masterfrom
losttech:array-buffer-interface
Sep 3, 2021
Merged

Implements buffer interface for .NET arrays of primitive types#1511
filmor merged 1 commit into
pythonnet:masterfrom
losttech:array-buffer-interface

Conversation

lostmsu commented Aug 5, 2021

Copy link
Copy Markdown
Member

What does this implement/fix? Explain your changes.

This allows Python libraries such as NumPy efficiently copy data to/from .NET arrays.

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Updated the CHANGELOG

lostmsu force-pushed the array-buffer-interface branch from c2dff5d to 00aed52 Compare August 25, 2021 19:34
try {
np = Py.Import("numpy");
} catch (PythonException) {
Assert.Inconclusive("Numpy or dependency not installed");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We should probably make that numpy is installed in our CI then, no?

Comment thread src/runtime/arrayobject.cs Outdated
Comment thread src/runtime/arrayobject.cs Outdated
lostmsu force-pushed the array-buffer-interface branch from 00aed52 to 5e5ffff Compare August 25, 2021 21:15

lostmsu commented Aug 25, 2021
edited
Loading

Copy link
Copy Markdown
Member Author

Added pip install numpy for testing.

For buffer formats see pybind/pybind11#1908 (comment) (also added code comment)

lostmsu force-pushed the array-buffer-interface branch 2 times, most recently from 6e1f0a8 to 91de771 Compare August 28, 2021 16:35
lostmsu force-pushed the array-buffer-interface branch from 91de771 to dc9172a Compare August 28, 2021 16:37
lostmsu requested a review from filmor September 2, 2021 21:42
filmor merged commit ee0ab7f into pythonnet:master Sep 3, 2021
lostmsu deleted the array-buffer-interface branch September 4, 2021 18:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL