I have a data similar to,
import numpy as np
A = np.array( [['1','2','3'], ['a','3','5']] )
Now I want to identify the cell address of 'a'. I have tried the following code for that purpose,
for i in range(0,2):
for j in range(0,3):
if (type(float(A[i,j])) == float):
print(str(i)+str(j))
since, 'a' can't be converted into floating point it shows the following error.
00
01
02
Traceback (most recent call last):
File "", line 3, in
if (type(float(A[i,j])) == float):ValueError: could not convert string to float: 'a'
Please help. Thank you in advance.
A[i][j]or is that some fancynumpymagic?isdigitand so docs.python.org/3/library/stdtypes.html__getitem__ofnumpyarrays accepts tuples!numpyhere?