LvArray
LvArray copied to clipboard
feat: Deduce access level in PyArrayWrapper from constness of given array reference
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