LvArray icon indicating copy to clipboard operation
LvArray copied to clipboard

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

Open av-novikov opened this issue 1 year ago • 0 comments

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

av-novikov avatar Oct 18 '24 21:10 av-novikov