using PyArray_Scalar API for boxing/unboxing scalars