-
Type:
Task
-
Status: Done (View Workflow)
-
Priority:
Normal
-
Resolution: Done
-
Labels:None
Created on 2023-10-19 14:15:44 by Didier Vibert. % Done: 100
The wrapper (pyconv.h) was written to be able to bind std::vector to numpy arrays. This wrapper has a drawback since it returns a raw pointer to the std::vector data buffer without having the property of this vector. Thus it is not controlling the life-time of the buffer which may not survive the use of the returned pointer that seems to be directly bind by swig to the numpy array buffer.
we can remove all these wrappers, since swig is able to bind a std::vector to a python list, and then we can convert the list to a numpy array in the python API code.
we should also check if swig 4 is able to bind a std::vector to a numpy array without any wrapper... If I am correct I think it can !
MR: https://gitlab.lam.fr/CPF/cpf-redshift/-/merge_requests/561