Cannot import FPCA #529
Replies: 2 comments 1 reply
-
That is... strange. I cannot reproduce it. import inspect
src = inspect.getsource(skfda.preprocessing.dim_reduction)
print(src) It should be: """Dim reduction."""
from __future__ import annotations
import importlib
from typing import TYPE_CHECKING, Any
import lazy_loader as lazy
_normal_getattr, __dir__, __all__ = lazy.attach(
__name__,
submodules=[
"variable_selection",
],
submod_attrs={
"_fpca": ["FPCA"],
},
)
if TYPE_CHECKING:
from ._fpca import FPCA as FPCA
def __getattr__(name: str) -> Any:
if name in {"projection", "feature_extraction"}:
return importlib.import_module(f".{name}", __name__)
return _normal_getattr(name) |
Beta Was this translation helpful? Give feedback.
-
The source is the same as above. Some upgraded packages in /usr/local/lib/python3.9/dist-packages is breaking this. Also, even with the folder first moved, I still had to pip install typing_extensions==4.3.0. There are still some errors when starting ipython but FPCA can now import: ann@cairo:~$ cat .ipython/profile_default/startup/skfda_no_usr_local.py To fix skfda.preprocessing.dim_reduction.FPCApip install typing-extensions==4.3.0import sys ann@cairo:~$ ipython3 Traceback (most recent call last): Remainder of file ignored In [1]: import skfda In [2]: skfda.preprocessing.dim_reduction.FPCA In [3]: |
Beta Was this translation helpful? Give feedback.
-
gives
and
gives
gives
'0.8.1'
Running python 3.9.2 on debian 11.
Beta Was this translation helpful? Give feedback.
All reactions