pik-copan / pyunicorn

Unified Complex Network and Recurrence Analysis Toolbox
http://pik-potsdam.de/~donges/pyunicorn/
Other
195 stars 86 forks source link

An AttributeError: can't set attribute error occurs when the RecurrencePlot method is referenced #176

Closed Feaonan closed 1 year ago

Feaonan commented 1 year ago

Traceback (most recent call last): File "D:\Software\Python3.7\lib\site-packages\pandas\core\generic.py", line 5518, in setattr object.setattr(self, name, value) AttributeError: can't set attribute

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:/pyunicorn/text.py", line 104, in normalize=False, recurrence_rate=RR) File "D:\Software\Python3.7\lib\site-packages\pyunicorn\timeseries\recurrence_plot.py", line 149, in init self.time_series.shape = (self.time_series.shape[0], -1) File "D:\Software\Python3.7\lib\site-packages\pandas\core\generic.py", line 5528, in setattr object.setattr(self, name, value) AttributeError: can't set attribute Can anyone who knows what the problem is point out

zugnachpankow commented 1 year ago

Hey @Feaonan,

thank you for reaching out to us. Since pandas seems to be raising an error, but pyunicorn does not use pandas, could you tell me if your input time series is a pandas series or data frame? If yes, please try to cast the pandas object into a numpy array, e.g. with pandas.to_numpy() method.

If not, could you please tell me whats the shape of your time series and also provide a minimum example of code that reproduces your error, so i can look into it.

Thank you!

Feaonan commented 1 year ago

Problem solved thank you very much