jdtuck / fdasrsf_python

elastic fda python code
http://research.tetonedge.net
BSD 3-Clause "New" or "Revised" License
51 stars 18 forks source link

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject #22

Closed fbarfi closed 2 years ago

fbarfi commented 2 years ago
:228: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Input In [1], in ----> 1 import skfda File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/__init__.py:37, in 34 from .representation import FDataGrid 35 from .representation._functional_data import concatenate ---> 37 from . import representation, datasets, preprocessing, exploratory, misc, ml, \ 38 inference 40 import os as _os 42 try: File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/preprocessing/__init__.py:1, in ----> 1 from . import registration 2 from . import smoothing 3 from . import dim_reduction File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/preprocessing/registration/__init__.py:9, in 7 from ..._utils import invert_warping, normalize_warping 8 from . import validation ----> 9 from ._fisher_rao import ElasticRegistration, FisherRaoElasticRegistration 10 from ._landmark_registration import ( 11 landmark_elastic_registration, 12 landmark_elastic_registration_warping, (...) 16 landmark_shift_registration, 17 ) 18 from ._lstsq_shift_registration import ( 19 LeastSquaresShiftRegistration, 20 ShiftRegistration, 21 ) File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/preprocessing/registration/_fisher_rao.py:16, in 9 from ... import FDataGrid 10 from ..._utils import ( 11 _check_compatible_fdatagrid, 12 check_is_univariate, 13 invert_warping, 14 normalize_scale, 15 ) ---> 16 from ...exploratory.stats import fisher_rao_karcher_mean 17 from ...exploratory.stats._fisher_rao import _elastic_alignment_array 18 from ...misc.operators import SRSF File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/exploratory/__init__.py:2, in 1 from . import depth ----> 2 from . import outliers 3 from . import stats 4 from . import visualization File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/exploratory/outliers/__init__.py:6, in 1 from ._boxplot import BoxplotOutlierDetector 2 from ._directional_outlyingness import ( 3 MSPlotOutlierDetector, 4 directional_outlyingness_stats, 5 ) ----> 6 from ._outliergram import OutliergramOutlierDetector 7 from .neighbors_outlier import LocalOutlierFactor File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/exploratory/outliers/_outliergram.py:8, in 6 from ...representation import FDataGrid 7 from ..depth._depth import ModifiedBandDepth ----> 8 from ..stats import modified_epigraph_index 11 class OutliergramOutlierDetector( 12 BaseEstimator, # type: ignore 13 OutlierMixin, # type: ignore 14 ): 15 r"""Outlier detector using the relation between MEI and MBD. 16 17 Detects as outliers functions that have the vertical distance to the (...) 49 50 """ File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/exploratory/stats/__init__.py:1, in ----> 1 from ._fisher_rao import _fisher_rao_warping_mean, fisher_rao_karcher_mean 2 from ._stats import ( 3 cov, 4 depth_based_median, (...) 10 var, 11 ) File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/skfda/exploratory/stats/_fisher_rao.py:7, in 5 import numpy as np 6 import scipy.integrate ----> 7 from fdasrsf.utility_functions import optimum_reparam 9 from ..._utils import check_is_univariate, invert_warping, normalize_scale 10 from ...misc.operators import SRSF File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/fdasrsf/__init__.py:24, in 20 # Here we can also check for specific Python 3 versions, if needed 22 del sys ---> 24 from .time_warping import fdawarp, align_fPCA, align_fPLS, pairwise_align_bayes, pairwise_align_functions 25 from .time_warping import pairwise_align_bayes_infHMC 26 from .plot_style import f_plot, rstyle, plot_curve, plot_reg_open_curve, plot_geod_open_curve, plot_geod_close_curve File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/fdasrsf/time_warping.py:9, in 7 import numpy as np 8 import matplotlib.pyplot as plt ----> 9 import fdasrsf.utility_functions as uf 10 import fdasrsf.bayesian_functions as bf 11 import fdasrsf.fPCA as fpca File /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/fdasrsf/utility_functions.py:21, in 19 from joblib import Parallel, delayed 20 import numpy.random as rn ---> 21 import optimum_reparamN2 as orN2 22 import optimum_reparam_N as orN 23 import cbayesian as bay File src/optimum_reparamN2.pyx:1, in init optimum_reparamN2() ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
fbarfi commented 2 years ago

Tried pip install numba==0.53 problem not solved

gwyanCN commented 2 years ago

wait for one solution

gwyanCN commented 2 years ago

maybe you scipy vision is not right you can pip install -U scipy

jdtuck commented 2 years ago

You need to reinstall bumpy, sounds like a version conflict

jdtuck commented 2 years ago

see #20 for solution