Direct working with numpy memory inplace