doctest with block_reduce has ImportError
See original GitHub issueThis has been reported upstream at scikit-image/scikit-image#3551 . Not sure how best to handle this failure in the meantime.
https://travis-ci.org/astropy/astropy/jobs/455917279
_______________________ [doctest] docs/nddata/index.rst ________________________
323
324 The functions `~astropy.nddata.block_reduce` and
325 `~astropy.nddata.block_replicate` resize images. The example below reduces the
326 size of the image by a factor of 4. Note that the result is a `numpy.ndarray`;
327 the mask, metadata, etc are discarded:
328
329 .. doctest-requires:: skimage
330
331 >>> from astropy.nddata import block_reduce, block_replicate
332 >>> smaller = block_reduce(ccd, 4)
UNEXPECTED EXCEPTION: ImportError("cannot import name '_validate_lengths'",)
Traceback (most recent call last):
File "/home/travis/miniconda/envs/test/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest index.rst[61]>", line 1, in <module>
File "/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/astropy/utils/decorators.py", line 827, in block_reduce
func = make_function_with_signature(func, name=name, **wrapped_args)
File "/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/astropy/nddata/decorators.py", line 245, in wrapper
result = func(data, *args, **kwargs)
File "/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/astropy/nddata/utils.py", line 370, in block_reduce
from skimage.measure import block_reduce
File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/measure/__init__.py", line 3, in <module>
from ._marching_cubes_classic import (marching_cubes_classic,
File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/measure/_marching_cubes_classic.py", line 3, in <module>
from .._shared.utils import warn
File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/_shared/utils.py", line 10, in <module>
from ..util import img_as_float
File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/util/__init__.py", line 8, in <module>
from .arraycrop import crop
File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/util/arraycrop.py", line 8, in <module>
from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name '_validate_lengths'
/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/docs/nddata/index.rst:332: UnexpectedException
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Run all my doctests for all python modules in a folder ...
try: import simplejson as json except ImportError: import json. Update: Another option is to provide mock replacements for the missing modules.
Read more >Running single test function with `--doctest-modules` raises ...
Origin: question on SO Prep for reproducing: $ mkdir issue $ printf 'def test_spam():\n assert True\n' > issue/test_eggs.py $ pytest ...
Read more >sympy/__init__.py
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax ...
Read more >run doctests with nose — nose 1.3.7 documentation
DocTestCase # system version of doctest is acceptable, but needs a monkeypatch except (ImportError, AttributeError): # system version is too old import ......
Read more >verde.utils | Verde v1.7.0
if delayed: return dask.delayed(function) if client is not None: return ... data_names="dummy") >>> print(grid) # doctest: +SKIP <xarray.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
scikit-image 0.14.2 is available now both on conda and pip, so I’m closing this issue.
Attempting to hack around it at #8357