export dtype to key function