Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error **Python,IndexError: arrays used as indices must be of integer (or boolean) type** in** Python**. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

Table of Contents

## How Python,IndexError: arrays used as indices must be of integer (or boolean) type Error Occurs?

Today I get the following error **Python,IndexError: arrays used as indices must be of integer (or boolean) type** in** Python**.

## How To Solve Python,IndexError: arrays used as indices must be of integer (or boolean) type Error ?

**How To Solve Python,IndexError: arrays used as indices must be of integer (or boolean) type Error ?**To Solve Python,IndexError: arrays used as indices must be of integer (or boolean) type Error lats = data[:,0].astype(int)

lons = data[:,1].astype(int)

codg_tec = data[:,2].astype(int)**Python,IndexError: arrays used as indices must be of integer (or boolean) type**To Solve Python,IndexError: arrays used as indices must be of integer (or boolean) type Error lats = data[:,0].astype(int)

lons = data[:,1].astype(int)

codg_tec = data[:,2].astype(int)

## Solution 1

the problem was solved just by converting the float array into int array:

lats = data[:,0].astype(int) lons = data[:,1].astype(int) codg_tec = data[:,2].astype(int)

**Summery**

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

**Also Read**