Spaces:
Sleeping
Sleeping
Download pysr/sklearn_monkeypatch.py from MilesCranmer/PySR: direct link, hf CLI and curl.
- Browser
- Download file 340 Bytes
-
https://huggingface.co/spaces/MilesCranmer/PySR/resolve/94dbab3ff94de30da0eb850edbd50761420830c6/pysr/sklearn_monkeypatch.py
- Command line
-
hf download hf://spaces/MilesCranmer/PySR@94dbab3ff94de30da0eb850edbd50761420830c6/pysr/sklearn_monkeypatch.py
-
curl -L -o sklearn_monkeypatch.py https://huggingface.co/spaces/MilesCranmer/PySR/resolve/94dbab3ff94de30da0eb850edbd50761420830c6/pysr/sklearn_monkeypatch.py
340 Bytes
| # Here, we monkey patch scikit-learn until this | |
| # issue is fixed: https://github.com/scikit-learn/scikit-learn/issues/25922 | |
| from sklearn.utils import validation | |
| def _ensure_no_complex_data(*args, **kwargs): | |
| ... | |
| try: | |
| validation._ensure_no_complex_data = _ensure_no_complex_data | |
| except AttributeError: # pragma: no cover | |
| ... | |