# swegym / pandas-dev__pandas-48854

- taskset: [swegym](https://harnessreport.com/tasks/swegym.md)
- difficulty: hard
- category: debugging
- language: 
- runnable from the site: no
- agent timeout: 3000s

## Results by harness

_none yet_

## Instruction

```
BUG: `pd.to_timedelta()` does not accept nullable float
### Pandas version checks

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.

- [ ] I have confirmed this bug exists on the main branch of pandas.


### Reproducible Example

```python
import pandas as pd
pd.to_timedelta(pd.Series([1], dtype="Float64"))
```


### Issue Description

The `pd.to_timedelta()` function does not accept a series using the nullable float extension dtype (either "Float32" or "Float64").

An exception is raised with the following message:
> IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

### Expected Behavior

In this example, I would expect the output to be the same as for the regular NumPy dtype:

```python
pd.to_timedelta(pd.Series([1], dtype="float64"))
```

### Installed Versions

<details>

INSTALLED VERSIONS
------------------
commit           : 87cfe4e38bafe7300a6003a1d18bd80f3f77c763
python           : 3.9.7.final.0
python-bits      : 64
OS               : Windows
OS-release       : 10
Version          : 10.0.19044
machine          : AMD64
processor        : Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
byteorder        : little
LC_ALL           : None
LANG             : None
LOCALE           : English_United States.1252

pandas           : 1.5.0
numpy            : 1.21.5
pytz             : 2022.1
dateutil         : 2.8.2
setuptools       : 63.4.1
pip              : 22.1.2
Cython           : 0.29.30
pytest           : 7.1.2
hypothesis       : None
sphinx           : 5.0.2
blosc            : None
feather          : None
xlsxwriter       : 3.0.3
lxml.etree       : 4.9.1
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.11.3
IPython          : 8.4.0
pandas_datareader: None
bs4              : 4.11.1
bottleneck       : 1.3.5
brotli           : 
fastparquet      : None
fsspec           : 2022.7.1
gcsfs            : None
matplotlib       : 3.5.2
numba            : 0.55.1
numexpr          : 2.8.3
odfpy            : None
openpyxl         : 3.0.10
pandas_gbq       : None
pyarrow          : None
pyreadstat       : None
pyxlsb           : None
s3fs             : None
scipy            : 1.7.1
snappy           : 
sqlalchemy       : 1.4.39
tables           : 3.6.1
tabulate         : 0.8.10
xarray           : 0.20.1
xlrd             : 2.0.1
xlwt             : None
zstandard        : None
tzdata           : None

</details>
```
---
Harness Report runs agent harnesses from their GitHub repos on Harbor tasks and records every model call. Every page is also `.md` and `.json`; index: https://harnessreport.com/llms.txt · MCP: https://harnessreport.com/mcp
