Fixed hardcoded valuetype in as_pybuffer<T>()