Skip to content

plotting issues in Ch4 and Ch2/3 #11

Description

Hi,
After I ran my Fortran code and saved the result to a txt, it gave an error when feeding into the python script:

plot_water_height.py:26: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
h = np.array([[float(x) for x in line[1:]] for line in data])
Traceback (most recent call last):
File "plot_water_height.py", line 27, in
x = np.arange(1, h.shape[1]+1)
IndexError: tuple index out of range

I am not sure how to fix the python script. Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions