Skip to content

Resolve "Crash when writing numpy.array to DeviceProxy string array attributes"

Closes #492 (closed)

Due to I am still beginner in c++, I cannot in details explain what was the reason of this problem, but I managed to fix it (my typical style of coding :-) )

I found, that when we extract value from py in case of simple list there is conversion structure python_tangocpp, which in all case, except strings, does just ordinary bopy::extract<TangoScalarType>. But is the case of strings, we do from_str_to_char. My knowledge of c++ does not allow me to understand what this function exactly does :-(

In case of numpy arrays this conversion functionality was missing, and we did only ordinary extract<TangoScalarType> for all cases. I changed this behavior to a similar behavior with ordinary lists, and it seems to help.

Also added numpy array as typed values to tests

Merge request reports