extract getting numpy metadata to function