Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfd-turbine plot.py does not work with recent pandas versions #4

Open
MakisH opened this issue May 14, 2024 · 0 comments
Open

cfd-turbine plot.py does not work with recent pandas versions #4

MakisH opened this issue May 14, 2024 · 0 comments

Comments

@MakisH
Copy link
Member

MakisH commented May 14, 2024

Only documenting, not meant to ask for debugging/extra work:

openfast-adapter/cases/cfd-turbine/fluid [main]$ python3 plot.py 
Performance from 0.0--191.0 degrees:
Mean TSR = 6.00
Mean C_P = 0.14
Mean C_D = 1.06
Traceback (most recent call last):
  File "/home/gc/repos/precice/openfast-adapter/cases/cfd-turbine/fluid/plot.py", line 72, in <module>
    plot_cp()
  File "/home/gc/repos/precice/openfast-adapter/cases/cfd-turbine/fluid/plot.py", line 29, in plot_cp
    plt.plot(df.angle_deg, df.cp)
  File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 2757, in plot
    return gca().plot(
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_axes.py", line 1632, in plot
    lines = [*self._get_lines(*args, data=data, **kwargs)]
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 312, in __call__
    yield from self._plot_args(this, kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 487, in _plot_args
    x = _check_1d(xy[0])
  File "/usr/lib/python3/dist-packages/matplotlib/cbook/__init__.py", line 1327, in _check_1d
    ndim = x[:, None].ndim
  File "/home/gc/.local/lib/python3.10/site-packages/pandas/core/series.py", line 1144, in __getitem__
    return self._get_with(key)
  File "/home/gc/.local/lib/python3.10/site-packages/pandas/core/series.py", line 1154, in _get_with
    return self._get_values_tuple(key)
  File "/home/gc/.local/lib/python3.10/site-packages/pandas/core/series.py", line 1194, in _get_values_tuple
    disallow_ndim_indexing(result)
  File "/home/gc/.local/lib/python3.10/site-packages/pandas/core/indexers/utils.py", line 341, in disallow_ndim_indexing
    raise ValueError(
ValueError: Multi-dimensional indexing (e.g. `obj[:, None]`) is no longer supported. Convert to a numpy array before indexing instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant