Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd49737f

Browse files
committed
Let MultiNorm inherit from Norm ABC
1 parentbd8e726 commitd49737f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

‎lib/matplotlib/colors.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3277,7 +3277,7 @@ def inverse(self, value):
32773277
returnvalue
32783278

32793279

3280-
classMultiNorm(Normalize):
3280+
classMultiNorm(Norm):
32813281
"""
32823282
A class which contains multiple scalar norms
32833283
"""
@@ -3442,6 +3442,12 @@ def autoscale(self, A):
34423442
"""
34433443
For each constituent norm, Set *vmin*, *vmax* to min, max of the corresponding
34443444
variate in *A*.
3445+
3446+
Parameters
3447+
----------
3448+
A
3449+
Data, must be of length `n_variables` or be a structured array or scalar
3450+
with `n_variables` fields.
34453451
"""
34463452
withself.callbacks.blocked():
34473453
# Pause callbacks while we are updating so we only get

‎lib/matplotlib/colors.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ class BoundaryNorm(Normalize):
411411

412412
classNoNorm(Normalize): ...
413413

414-
classMultiNorm(Normalize):
414+
classMultiNorm(Norm):
415415
# Here "type: ignore[override]" is used for functions with a return type
416416
# that differs from the function in the base class.
417417
# i.e. where `MultiNorm` returns a tuple and Normalize returns a `float` etc.
@@ -438,6 +438,9 @@ class MultiNorm(Normalize):
438438
defclip(self,value:ArrayLike|bool)->None: ...
439439
def__call__(self,value:ArrayLike,clip:ArrayLike|bool|None= ...)->list: ...# type: ignore[override]
440440
definverse(self,value:ArrayLike)->list: ...# type: ignore[override]
441+
defautoscale(self,A:ArrayLike)->None: ...
442+
defautoscale_None(self,A:ArrayLike)->None: ...
443+
defscaled(self)->bool: ...
441444

442445
defrgb_to_hsv(arr:ArrayLike)->np.ndarray: ...
443446
defhsv_to_rgb(hsv:ArrayLike)->np.ndarray: ...

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp