Update the README with some warning hints

Update the readme with some warning hints

Tweak README

Tweak README

Fix preferred plugins test

Pep8 fix

Remove imshow from PIL plugin

Fix spelling

Tweak readme
This commit is contained in:
Steven Silvester
2015-02-07 10:30:22 -06:00
parent 5ccdd36bc3
commit fa226ad807
3 changed files with 19 additions and 20 deletions
+13
View File
@@ -3,3 +3,16 @@ To build docs, run `make` in this directory. `make help` lists all targets.
## Requirements ##
Sphinx is needed to build doc. Install with `pip install sphinx`.
## Fixing Warnings ##
- "citation not found: R###"
$ cd doc/build; grep -rin R### .
There is probably an underscore after the reference (e.g. [1]_)
- "Duplicate citation R###, other instance in...""
There is probably a [2] without a [1] in one of
the docstrings
- Make sure to use pre-sphinxification paths to images
(not the _images directory)
-17
View File
@@ -260,20 +260,3 @@ def imsave(fname, arr, format_str=None):
img = ndarray_to_pil(arr, format_str=format_str)
img.save(fname, format=format_str)
def imshow(arr):
"""Display an image, using PIL's default display command.
Parameters
----------
arr : ndarray
Image to display. Images of dtype float are assumed to be in
[0, 1]. Images of dtype uint8 are in [0, 255].
"""
Image.fromarray(img_as_ubyte(arr)).show()
def _app_show():
pass
+6 -3
View File
@@ -93,15 +93,18 @@ def test_available():
def test_load_preferred_plugins_all():
from skimage.io._plugins import pil_plugin
from skimage.io._plugins import pil_plugin, matplotlib_plugin
with protect_preferred_plugins():
manage_plugins.preferred_plugins = {'all': ['pil']}
manage_plugins.preferred_plugins = {'all': ['pil'],
'imshow': ['matplotlib']}
manage_plugins.reset_plugins()
for plugin_type in ('imread', 'imsave', 'imshow'):
for plugin_type in ('imread', 'imsave'):
plug, func = manage_plugins.plugin_store[plugin_type][0]
assert func == getattr(pil_plugin, plugin_type)
plug, func = manage_plugins.plugin_store['imshow'][0]
assert func == getattr(matplotlib_plugin, 'imshow')
def test_load_preferred_plugins_imread():