Skip to content

Commit dd29016

Browse files
committed
minor bug fixes in __str__ and code examples
1 parent ad89723 commit dd29016

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

machinevisiontoolbox/ImageWholeFeatures.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ def __str__(self):
493493
.. runblock:: pycon
494494
495495
>>> from machinevisiontoolbox import Image
496-
>>> img = Image.Random()
496+
>>> im = Image.Random()
497497
>>> h = im.hist(100)
498498
>>> print(h)
499499
"""
500500
s = f"histogram with {len(self.x)} bins"
501501
if self.nplanes > 1:
502-
s += f" x {self.h.shape[1]} planes"
503-
s += f": xrange {self.x[0]} - {self.x[-1]}, yrange {np.min(self.h)} - {np.max(self.h)}"
502+
s += f" x {self._h.shape[1]} planes"
503+
s += f": xrange {self.x[0]} - {self.x[-1]}, yrange {np.min(self._h)} - {np.max(self.h)}"
504504
return s
505505

506506
def __repr__(self):
@@ -515,7 +515,7 @@ def __repr__(self):
515515
.. runblock:: pycon
516516
517517
>>> from machinevisiontoolbox import Image
518-
>>> img = Image.Random()
518+
>>> im = Image.Random()
519519
>>> h = im.hist(100)
520520
>>> h
521521
"""

0 commit comments

Comments
 (0)