8000 Implements buffer interface for .NET arrays of primitive types by lostmsu · Pull Request #1511 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

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

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

lostmsu
Copy link
Member
@lostmsu lostmsu commented Aug 5, 2021

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 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
Member

Choose a reason for hiding this comment

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

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

@lostmsu lostmsu force-pushed the array-buffer-interface branch from 00aed52 to 5e5ffff Compare August 25, 2021 21:15
@lostmsu
Copy link
Member Author
lostmsu commented Aug 25, 2021

Added pip install numpy for testing.

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

@lostmsu lostmsu force-pushed the array-buffer-interface branch 2 times, most recently from 6e1f0a8 to 91de771 Compare August 28, 2021 16:35
@lostmsu lostmsu force-pushed the array-buffer-interface branch from 91de771 to dc9172a Compare August 28, 2021 16:37
@lostmsu lostmsu requested a review from filmor September 2, 2021 21:42
@filmor filmor merged commit ee0ab7f into pythonnet:master Sep 3, 2021
@lostmsu lostmsu deleted the array-buffer-interface branch September 4, 2021 18:26
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
0