8000 PiecewiseLinearNorm by OceanWolf · Pull Request #5061 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

PiecewiseLinearNorm #5061

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

Closed
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Return a scalar when passed in a scalar
Since possibly some earlier versions of numpy returned a scalar,
wrap the value in atleast_1d before indexing.
  • Loading branch information
jkseppan authored and OceanWolf committed Sep 13, 2015
commit a8d4956997c00681729f768fb1218e00dfe94044
2 changes: 2 additions & 0 deletions lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,8 @@ def __call__(self, value, clip=None):
result = ma.masked_array(np.interp(result, x, y),
mask=ma.getmask(result))

if is_scalar:
result = np.atleast_1d(result)[0]
return result

def autoscale_None(self, A):
Expand Down
0