TomographicImaging/CCPi-Regularisation-Toolkit

make the Python wrapper accept pre-allocated output array

paskino opened this issue · 2 comments

It'd be nice if the Python wrapper would allow the user to pass a pre allocated array for output instead of allocating the output by default.

so it's an initialisation of a sort? Could be useful indeed.

not really an initialisation, but the Python wrapper allocates by itself the output of the regularisation, like here in TV_ROF.

https://github.com/vais-ral/CCPi-Regularisation-Toolkit/blob/413c6001003c6f1272aeb43152654baaf0c8a423/src/Python/src/cpu_regularisers.pyx#L55-L56

The wrapper should allow to pass an already allocated array. In case none is passed it should allocate it.