Merge pull request #1295 from stefanv/doc_build_fixes

Doc build fixes
This commit is contained in:
Johannes Schönberger
2014-12-15 10:04:42 +01:00
10 changed files with 77 additions and 28 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ def _clahe(image, ntiles_x, ntiles_y, clip_limit, nbins=128):
image = pad(image, ((0, h_pad), (0, w_pad)), mode='reflect')
h_inner, w_inner = image.shape
bin_size = 1 + NR_OF_GREY / nbins
bin_size = 1 + NR_OF_GREY // nbins
lut = np.arange(NR_OF_GREY)
lut //= bin_size
img_blocks = view_as_blocks(image, (height, width))
+1 -1
View File
@@ -26,7 +26,7 @@ def _format_plugin_info_table(info_table, column_lengths):
info_table.insert(0, _separator('=', column_lengths))
info_table.insert(1, ('Plugin', 'Description'))
info_table.insert(2, _separator('-', column_lengths))
info_table.append(_separator('-', column_lengths))
info_table.append(_separator('=', column_lengths))
def _update_doc(doc):
+1 -1
View File
@@ -142,7 +142,7 @@ class Plugin(QtGui.QDialog):
plugin += Widget(...)
Widgets can adjust required or optional arguments of filter function or
parameters for the plugin. This is specified by the Widget's `ptype'.
parameters for the plugin. This is specified by the Widget's `ptype`.
"""
if widget.ptype == 'kwarg':
name = widget.name.replace(' ', '_')
+10 -8
View File
@@ -73,14 +73,16 @@ class ColorHistogram(PlotPlugin):
The selected pixels.
data : dict
The data describing the histogram and the selected region.
Keys:
- 'bins' : array of float, the bin boundaries for both
`a` and `b` channels.
- 'hist' : 2D array of float, the normalized histogram.
- 'edges' : tuple of array of float, the bin edges
along each dimension
- 'extents' : tuple of float, the left and right and
top and bottom of the selected region.
The dictionary contains:
- 'bins' : array of float
The bin boundaries for both `a` and `b` channels.
- 'hist' : 2D array of float
The normalized histogram.
- 'edges' : tuple of array of float
The bin edges along each dimension
- 'extents' : tuple of float
The left and right and top and bottom of the selected region.
"""
return (self.mask, self.data)
+2 -5
View File
@@ -72,16 +72,13 @@ class RequiredAttr(object):
instances = dict()
def __init__(self, msg='Required attribute not set', init_val=None):
def __init__(self, init_val=None):
self.instances[self, None] = init_val
self.msg = msg
def __get__(self, obj, objtype):
value = self.instances[self, obj]
if value is None:
# Should raise an error but that causes issues with the buildbot.
warnings.warn(self.msg)
self.__set__(obj, self.init_val)
raise AttributeError('Required attribute not set')
return value
def __set__(self, obj, value):