yposmax and yposmin do not work when data is only negative/positive #21
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If data is negative the function errors and does not display anything:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/damaris/gui/DamarisGUI.py", line 2555, in datapool_idle_listener
self.update_display( )
File "/usr/lib/python3/dist-packages/damaris/gui/DamarisGUI.py", line 2935, in update_display
yminpos = in_result.get_yminpos()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/damaris/data/Drawable.py", line 168, in get_yminpos
ymins.append(ys[mask].min())
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/numpy/core/_methods.py", line 45, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial, where)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation minimum which has no identity
The problem is that yposmin etc. is not needed for linear axyes, moving calls to the log axis clauses should fix this. If data is negative it can not be plotted anyway!