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

🐛 FIX: BandsData matplotlib with NaN values #5024

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aiida/orm/nodes/data/array/bands.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,9 @@ def _matplotlib_get_dict(

# axis limits
if y_max_lim is None:
y_max_lim = numpy.array(bands).max()
y_max_lim = numpy.nanmax(bands)
if y_min_lim is None:
y_min_lim = numpy.array(bands).min()
y_min_lim = numpy.nanmin(bands)
x_min_lim = min(x) # this isn't a numpy array, but a list
x_max_lim = max(x)
all_data['x_min_lim'] = x_min_lim
Expand Down