---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[43], [line 12](vscode-notebook-cell:?execution_count=43&line=12)
[9](vscode-notebook-cell:?execution_count=43&line=9) plt.plot(decoded.restrict(ep),'--', color = 'grey', linewidth = 2, label = 'decoded HD', zorder = 1) #Decoded HD, in grey
[11](vscode-notebook-cell:?execution_count=43&line=11) #Plot the smoothed probability distribution
---> [12](vscode-notebook-cell:?execution_count=43&line=12) plt.imshow(p_feature.restrict(ep).T, aspect = 'auto',interpolation = 'bilinear', extent = [ep['start'].values[0],ep['end'].values[0],0,2*np.pi], origin = 'lower', cmap = 'viridis')
[13](vscode-notebook-cell:?execution_count=43&line=13) # plt.imshow(
[14](vscode-notebook-cell:?execution_count=43&line=14) # np.transpose(p_feature.restrict(ep).values),
[15](vscode-notebook-cell:?execution_count=43&line=15) # aspect="auto",
(...)
[19](vscode-notebook-cell:?execution_count=43&line=19) # cmap="viridis",
[20](vscode-notebook-cell:?execution_count=43&line=20) # )
[21](vscode-notebook-cell:?execution_count=43&line=21) plt.xlabel('Time (s)') #X-axis is time in seconds
```pytb
File c:\Users\lucia\anaconda3\Lib\site-packages\pynapple\core\time_series.py:122, in BaseTsd.__getattr__(self, name)
[118](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:118) return np_func(self, *args, **kwargs)
[120](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:120) return method
--> [122](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:122) raise AttributeError(
[123](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:123) "Time series object does not have the attribute {}".format(name)
[124](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:124) )
AttributeError: Time series object does not have the attribute T
Thank you very much for your scripts :)
This line uses .T, which does not work
https://github.com/PeyracheLab/pynacollada/blame/dc18e7781cbf86549014c46dafd5483ceb02ee4c/pynacollada/Pynapple%20Paper%20Figures/Peyrache%202015/Peyrache_dataset.ipynb#L1894
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[43], [line 12](vscode-notebook-cell:?execution_count=43&line=12) [9](vscode-notebook-cell:?execution_count=43&line=9) plt.plot(decoded.restrict(ep),'--', color = 'grey', linewidth = 2, label = 'decoded HD', zorder = 1) #Decoded HD, in grey [11](vscode-notebook-cell:?execution_count=43&line=11) #Plot the smoothed probability distribution ---> [12](vscode-notebook-cell:?execution_count=43&line=12) plt.imshow(p_feature.restrict(ep).T, aspect = 'auto',interpolation = 'bilinear', extent = [ep['start'].values[0],ep['end'].values[0],0,2*np.pi], origin = 'lower', cmap = 'viridis') [13](vscode-notebook-cell:?execution_count=43&line=13) # plt.imshow( [14](vscode-notebook-cell:?execution_count=43&line=14) # np.transpose(p_feature.restrict(ep).values), [15](vscode-notebook-cell:?execution_count=43&line=15) # aspect="auto", (...) [19](vscode-notebook-cell:?execution_count=43&line=19) # cmap="viridis", [20](vscode-notebook-cell:?execution_count=43&line=20) # ) [21](vscode-notebook-cell:?execution_count=43&line=21) plt.xlabel('Time (s)') #X-axis is time in seconds ```pytb File c:\Users\lucia\anaconda3\Lib\site-packages\pynapple\core\time_series.py:122, in BaseTsd.__getattr__(self, name) [118](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:118) return np_func(self, *args, **kwargs) [120](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:120) return method --> [122](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:122) raise AttributeError( [123](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:123) "Time series object does not have the attribute {}".format(name) [124](file:///C:/Users/lucia/anaconda3/Lib/site-packages/pynapple/core/time_series.py:124) ) AttributeError: Time series object does not have the attribute THere there is another example of your code that does work beautifully
https://pynapple-org.github.io/pynapple/generated/examples/tutorial_HD_dataset/
thank you! :)