Skip to content

Commit

Permalink
BUG: improved fix for np 1.9 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 committed Jul 9, 2014
1 parent b163b1e commit 5484b9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/matplotlib/tri/triinterpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _interpolate_multikeys(self, x, y, tri_index=None,
ret_loc = np.empty(size_ret, dtype=np.float64)
ret_loc[~mask_in] = np.nan
ret_loc[mask_in] = self._interpolate_single_key(
return_key, valid_tri_index, valid_x, valid_y).ravel() * scale
return_key, valid_tri_index, valid_x, valid_y) * scale
ret += [np.ma.masked_invalid(ret_loc.reshape(sh_ret), copy=False)]

return ret
Expand Down Expand Up @@ -462,9 +462,9 @@ def _interpolate_single_key(self, return_key, tri_index, x, y):
dzdx = self._ReferenceElement.get_function_derivatives(
alpha, J, ecc, dof)
if return_key == 'dzdx':
return dzdx[:, 0]
return dzdx[:, 0, 0]
else:
return dzdx[:, 1]
return dzdx[:, 1, 0]
else:
raise ValueError("Invalid return_key: " + return_key)

Expand Down

0 comments on commit 5484b9f

Please sign in to comment.