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

Commita19c5ad

Browse files
trygvradtimhoffm
andcommitted
Apply suggestions from code review
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
1 parent3a4f6b9 commita19c5ad

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

‎lib/matplotlib/colors.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3352,7 +3352,7 @@ def n_components(self):
33523352

33533353
@property
33543354
defnorms(self):
3355-
"""The individual norms held by this `MultiNorm`"""
3355+
"""The individual norms held by this `MultiNorm`."""
33563356
returnself._norms
33573357

33583358
@property
@@ -3404,15 +3404,15 @@ def _changed(self):
34043404
"""
34053405
self.callbacks.process('changed')
34063406

3407-
def__call__(self,value,clip=None,structured_output=None):
3407+
def__call__(self,values,clip=None,structured_output=None):
34083408
"""
34093409
Normalize the data and return the normalized data.
34103410
3411-
Each component of the input isassigned to the constituent norm.
3411+
Each component of the input isnormalized via the constituent norm.
34123412
34133413
Parameters
34143414
----------
3415-
value : array-like
3415+
values : array-like
34163416
Data to normalize, as tuple, scalar array or structured array.
34173417
34183418
- If tuple, must be of length `n_components`
@@ -3439,44 +3439,44 @@ def __call__(self, value, clip=None, structured_output=None):
34393439
Notes
34403440
-----
34413441
If not already initialized, ``self.vmin`` and ``self.vmax`` are
3442-
initialized using ``self.autoscale_None(value)``.
3442+
initialized using ``self.autoscale_None(values)``.
34433443
"""
34443444
ifclipisNone:
34453445
clip=self.clip
34463446
elifnotnp.iterable(clip):
34473447
clip= [clip]*self.n_components
34483448

34493449
ifstructured_outputisNone:
3450-
ifisinstance(value,np.ndarray)andvalue.dtype.fieldsisnotNone:
3450+
ifisinstance(values,np.ndarray)andvalues.dtype.fieldsisnotNone:
34513451
structured_output=True
34523452
else:
34533453
structured_output=False
34543454

3455-
value=self._iterable_components_in_data(value,self.n_components)
3455+
values=self._iterable_components_in_data(values,self.n_components)
34563456

3457-
result=tuple(n(v,clip=c)forn,v,cinzip(self.norms,value,clip))
3457+
result=tuple(n(v,clip=c)forn,v,cinzip(self.norms,values,clip))
34583458

34593459
ifstructured_output:
34603460
result=self._ensure_multicomponent_data(result,self.n_components)
34613461

34623462
returnresult
34633463

3464-
definverse(self,value):
3464+
definverse(self,values):
34653465
"""
3466-
Map the normalizedvalue (i.e., index in the colormap) back toimagedatavalue.
3466+
Map the normalizedvalues (i.e., index in the colormap) back to datavalues.
34673467
34683468
Parameters
34693469
----------
3470-
value
3471-
Normalizedvalue, as tuple, scalar array or structured array.
3470+
values
3471+
Normalizedvalues, as tuple, scalar array or structured array.
34723472
34733473
- If tuple, must be of length `n_components`
34743474
- If scalar array, the first axis must be of length `n_components`
34753475
- If structured array, must have `n_components` fields.
34763476
34773477
"""
3478-
value=self._iterable_components_in_data(value,self.n_components)
3479-
result= [n.inverse(v)forn,vinzip(self.norms,value)]
3478+
values=self._iterable_components_in_data(values,self.n_components)
3479+
result= [n.inverse(v)forn,vinzip(self.norms,values)]
34803480
returnresult
34813481

34823482
defautoscale(self,A):
@@ -3487,8 +3487,8 @@ def autoscale(self, A):
34873487
Parameters
34883488
----------
34893489
A
3490-
Data, must be of length `n_components` or be a structuredarray or scalar
3491-
with `n_components` fields.
3490+
Data, must be of length `n_components` or be a structuredscalar or
3491+
structured arraywith `n_components` fields.
34923492
"""
34933493
withself.callbacks.blocked():
34943494
# Pause callbacks while we are updating so we only get
@@ -3561,7 +3561,7 @@ def _ensure_multicomponent_data(data, n_components):
35613561
Parameters
35623562
----------
35633563
n_components : int
3564-
- numberof omponents in the data
3564+
Numberof omponents in the data.
35653565
data : np.ndarray, PIL.Image or None
35663566
35673567
Returns

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp