python - Converting a numpy string array to integers in base-16 -


i looking way convert array of strings in numpy integers represent in hexadecimal. in other words, array version of:

int("f040", 16) 

i can convert string array integers base-10 calling arr.astype(numpy.int32), can't see obvious way convert them base-16. know of way this?

ar = ['f040', 'deadbeaf']  int_array = [int(a, 16) in ar] print int_array 

output:

[61504, 3735928495l]


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -