whats wrong with this? #Import Libraries from google.colab import drive…
- User
whats wrong with this? #Import Libraries
from google.colab import drive drive.mount('/content/drive/',force_remount=True) !pip install -r '/content/drive/MyDrive/ALL/Badaei/Paper2/narx requirments.txt'
from torch import nn from sysidentpy.metrics import mean_squared_error #from sysidentpy.neural_network import NARXNN
from sysidentpy.basis_function._basis_function import Polynomial,Fourier from sysidentpy.utils.generate_data import get_siso_data from sysidentpy.utils.plotting import plot_residues_correlation, plot_results from sysidentpy.residues.residues_correlation import ( compute_residues_autocorrelation, compute_cross_correlation, ) from sysidentpy.utils.narmax_tools import regressor_code import torch from google.colab import drive
import numpy as np import pandas as pd import matplotlib.pyplot as plt from statsmodels.tsa.stattools import acf from statsmodels.tsa.stattools import pacf import os
Error: ValueError Traceback (most recent call last) in <cell line: 0>() 21 22 import numpy as np ---> 23 import pandas as pd 24 import matplotlib.pyplot as plt 25 from statsmodels.tsa.stattools import acf
6 frames /usr/local/lib/python3.11/dist-packages/pandas/init.py in 35 ) from _err 36 ---> 37 from pandas._config import ( 38 get_option, 39 set_option,
/usr/local/lib/python3.11/dist-packages/pandas/_config/init.py in 18 "warn_copy_on_write", 19 ] ---> 20 from pandas._config import config 21 from pandas._config import dates # pyright: ignore[reportUnusedImport] # noqa: F401 22 from pandas._config.config import (
/usr/local/lib/python3.11/dist-packages/pandas/_config/config.py in 66 import warnings 67 ---> 68 from pandas._typing import ( 69 F, 70 T,
/usr/local/lib/python3.11/dist-packages/pandas/_typing.py in 196 int, 197 np.ndarray, --> 198 np.random.Generator, 199 np.random.BitGenerator, 200 np.random.RandomState,
/usr/local/lib/python3.11/dist-packages/numpy/init.py in getattr(attr) 335 336 def dir(): --> 337 public_symbols = globals().keys() | {'testing'} 338 public_symbols -= { 339 "core", "matrixlib",
/usr/local/lib/python3.11/dist-packages/numpy/random/init.py in 178 179 # add these for module-freeze analysis (like PyInstaller) --> 180 from . import _pickle 181 from . import _common 182 from . import _bounded_integers
/usr/local/lib/python3.11/dist-packages/numpy/random/_pickle.py in ----> 1 from .mtrand import RandomState 2 from ._philox import Philox 3 from ._pcg64 import PCG64, PCG64DXSM 4 from ._sfc64 import SFC64 5
numpy/random/mtrand.pyx in init numpy.random.mtrand()
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
- Assistant
The error message you're encountering suggests that there's a compatibility issue between the installed versions of NumPy and another library, likely Pandas or another library that depends on NumPy. Specifically, the error message indicates that there is a binary incompatibility, meaning that the compiled extension modules in the libraries are not matching the expected data structures in NumPy.