Skip to content

feat: Deduce access level in PyArrayWrapper from constness of given array reference #336

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

av-novikov
Copy link

@av-novikov av-novikov commented Oct 18, 2024

This PR supports the construction of PyArrayWrapper with a MODIFIABLE access level. Before the access level was READ_ONLY by default. Now the access level is chosen based on the constness of the reference of the underlying Array.
It is convenient and allows to avoid the change of access level from Python in GEOS: PR 3391. This is important to not add extra code to Python, because we are going to use the Python interface common between GEOS and open-darts.

We are going to use it in embedding of Python function in C++. In the example, the function has READ_ONLY first argument and MODIFIABLE second one, which we write to in Python. The example: typedef and use

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.

1 participant