Why is my code looking for the attribute 'replace' in numpy?

python 3 btw :slight_smile:


It’s looking for the replace method in numpy because it is used on a numpy object (np_number). The replace method you want is only defined for string objects so this code will not work as you intend.

If you want to print out your array without brackets you can use this loop:
for i in rp_number:
print(i, end = ’ ')