I have data that looks like the following (all are string values)

```
>>> all_states[0:3]
[['A','B','Empty'],
 ['A', 'B', 'Empty'],
 ['C', 'D', 'Empty']]

```

I want to use a custom distance metric

```
def mydist(x, y):
    return 1
neigh = NearestNeighbors(n_neighbors=5, metric=mydist)

```

However, when I call

```
neigh.fit(np.array(all_states))

```

I get the error

**ValueError: Unable to convert array of bytes/strings into decimal numbers with dtype='numeric**'

I know that I can use the `OneHotEncoder` or the `LabelEncoder` - but can I also do that without encoding the data as I have my own distance metric?