Skip to content

Commit

Permalink
Improved readability and simplicity of fix
Browse files Browse the repository at this point in the history
Added suggestion from pull request
  • Loading branch information
ullmannJan committed Dec 1, 2023
1 parent e9ea1b2 commit 81196c9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vispy/visuals/surface_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ def _update_z_data(self, z):
if z is not None:
if self._x is not None and z.shape[0] != len(self._x):
raise TypeError('Z values must have shape (len(x), len(y))')
if self._y is not None and\
((self._y.ndim == 1 and z.shape[1] != len(self._y)) or \
(self._y.ndim == 2 and z.shape[1] != self._y.shape[1])):
if self._y is not None and z.shape[1] != self._y.shape[-1]:
raise TypeError('Z values must have shape (len(x), len(y)) or (x.shape[0], y.shape[1])')
self._z = z
if (self.__vertices is not None and
Expand Down

0 comments on commit 81196c9

Please sign in to comment.