Commit Graph

311 Commits

Author SHA1 Message Date
Steven Silvester a4e4e57ba5 Create new expected_warnings helper and some cleanup
Add new helper function for expected warnings during test

Indentation cleanups and avoid skipping doctests if possible.
2014-12-23 16:50:18 -06:00
Steven Silvester 4680f30466 Add a test setup helper function
Add a function to set up a skimage test

Switch to new test helper function

Import local packages that raise warnings in test setup function

More fixes to doctests

Fix regionprops doc test

Try and fix the test_rank failure.

Remove no longer needed RectangleSelector shim

Skip more doctests in _regionprops

Try importing another scipy subpackage
2014-12-23 16:49:20 -06:00
Steven Silvester f72882fbd2 Import scipy before turning on warnings 2014-12-23 16:49:19 -06:00
Steven Silvester 542cd4fabe Fix some doctest warnings
Fix doctest errors

Suppress warnings when importing scipy.ndimage for the first time
2014-12-23 16:49:01 -06:00
Steven Silvester 0debedd82c Handle more warnings and reset io plugins as needed
Reset plugins prior to running collections test

Handle warnings in morphology pkg

Add __init__ for morpohology tests

Handle warnings for novice pkg

Handle warnings for restoration pkg

Handle warnings for segmentation pkg

Handle warnings for _shared pkg

Handle warnings for transform pkg

Handle warnings for util pkg

Handle warnings in viewer module
2014-12-23 16:48:16 -06:00
Pratap Vardhan 2d4a77d94e DOC: Change selem.ellipse params 2014-12-16 10:40:01 +05:30
Pratap Vardhan db7b43199d BUG: Change dtype 2014-12-15 18:13:39 +05:30
Pratap Vardhan 65c6b773ce DOC: Clean up doc strings 2014-12-15 14:49:26 +05:30
Pratap Vardhan 8d50561d18 TST: Test for ellipse structuring element 2014-12-15 13:21:15 +05:30
Pratap Vardhan 4c68a5ad44 ENH: ellipse structuring element 2014-12-15 13:10:06 +05:30
Juan Nunez-Iglesias 53bb6f9369 Merge pull request #1290 from pratapvardhan/morph-selem
TST: Test for selem.cube
2014-12-14 18:13:04 +11:00
Josh Warner 1213a3ea1a Merge pull request #1289 from ahojnnes/random
STY: Misc PEP8 fixes
2014-12-13 23:25:37 -06:00
Pratap Vardhan 073f28e90e TST: Test for selem.cube 2014-12-14 10:52:53 +05:30
Johannes Schönberger 3a1079a180 Misc PEP8 fixes 2014-12-14 02:56:14 +01:00
Pratap Vardhan 9d6516903d DOC: Add test functions docstrings 2014-12-14 01:28:09 +05:30
Pratap Vardhan 2058fe23cb CLN: Minor cleanup - unused imports, pep8 2014-12-14 01:17:27 +05:30
Pratap Vardhan 8f7d9d69fe CLN: Remove unused import and add module docstring 2014-12-11 20:17:29 +05:30
Stefan van der Walt 36aa4cdb6f Merge pull request #1254 from matejak/label3d
Refactor labeling and extend to 3D
2014-12-04 12:31:29 +02:00
Matěj Týč e41bff898a Added fix for the strange input array shapes + tests 2014-11-28 16:45:52 +01:00
Matěj Týč abf3dbc593 Added and tested proper exception handling concerning array shape 2014-11-16 15:33:13 +01:00
Matěj Týč 7c7ecc4bdc Mainly typo fixes 2014-11-11 21:49:57 +01:00
Matěj Týč 438a9355d6 Fixed bugs so test pass now 2014-11-11 00:39:49 +01:00
Stefan van der Walt 78a7b7307a Rename and deprecate filter module to prevent shadowing of built-in keyword 2014-11-10 12:53:50 +02:00
Matěj Týč 53f93a7f8e Added tests for 3D labelling (that fail) 2014-11-08 12:09:19 +01:00
Rebecca 1b217f971e replacing lena in examples and most tests 2014-11-07 16:01:23 +02:00
Steven Silvester 2374b6a1ff Merge pull request #1219 from jni/reconstruct-error
Raise meaningful error when wrong "method" passed to `reconstruct`
2014-11-05 20:42:35 -06:00
Steven Silvester 66aaf71943 Merge pull request #1217 from jni/morpho-out
Allow discontiguous out arrays in `skimage.morphology.grey`
2014-11-05 20:35:56 -06:00
Juan Nunez-Iglesias 39d042e4ba Test correct error for wrong method in reconstruct 2014-11-06 10:29:43 +11:00
Juan Nunez-Iglesias f52f2c1779 Raise meaningful error in reconstruct w bad method
If a method other than 'erosion' or 'dilation' was passed, an
`UnboundLocalVariable` error for `pad_value` was raised, which made it
difficult to determine the source of the error. Now, an eloquent
`ValueError` is raised instead.

See #1218.
2014-11-06 10:27:43 +11:00
Juan Nunez-Iglesias 1a3ec0299c Add tests for discontiguous out arrays in grey morpho 2014-11-04 15:20:21 +11:00
Juan Nunez-Iglesias d7fdfebb96 Remove contiguous conversion for out array 2014-11-04 15:08:38 +11:00
Juan Nunez-Iglesias ec5432a247 Merge pull request #1191 from ahojnnes/morph-ref
Refer to rank filters from morphology functions
2014-10-10 15:50:06 +11:00
Johannes Schönberger df1e2061a1 Use correct rank filter replacement function 2014-10-09 16:32:50 -04:00
Johannes Schönberger c73d1c98e0 Clarify that uint16 images are only faster up to a certain bit depth 2014-10-07 08:38:26 -04:00
Pratap Vardhan 12dab41c39 CLN: Correct dtype typo 2014-10-07 18:05:57 +05:30
Pratap Vardhan 39267d103c CLN: Improve performance of disk and diamond selems 2014-10-07 17:55:44 +05:30
Johannes Schönberger fdeeaa298a Add note about supported data types in rank filter replacements 2014-10-06 08:29:04 -04:00
Johannes Schönberger 99c95f8e4f Refer to rank filters from morphology functions 2014-10-05 11:19:37 -04:00
Juan Nunez-Iglesias 8711c74533 Test type warning from remove_small_objects 2014-09-30 15:04:28 +10:00
Juan Nunez-Iglesias a2def31fca Warn users of remove_small_objects about type
When input type is `int`, we assume that the image is pre-labeled.
However, when only 0 and 1 are present, it may be that the user expects
us to treat it as a binary image. We don't, but now issue a warning
that they might want to use a bool image.

Fixes #1178.
2014-09-30 14:51:00 +10:00
Stefan van der Walt 5ba4b7ccd3 Expose point_in_poly and move to measure module 2014-09-22 17:56:18 +02:00
Steven Silvester 1a1d665c0a Use functools.wraps in default_fallback dectorator 2014-09-13 08:10:14 -05:00
Julian Taylor 87c72ae60f BUG: add signed flag to chars
Sign of char is undefined and there are numerous places where its sign
is important. Fixes tests with -funsigned-char.
Closes gh-1110
2014-09-05 23:51:39 +02:00
blink1073 b6dcf3c336 Update Travis build to use Anaconda.
Update Travis build to use Anaconda

Travis updates and fixes

More travis fixes

Another travis attempt

Revert changes

Use PIL and Pillow

Refactor travis into 4 different builds

Fix activation error

Remove explicit mpl in build_versions.py

Make matplotlib an explicit requirement

Rearrange travis

Make pillow a hard requirement

Try again to make Pillow optional

Fix bash syntax error

Fix bash syntax error

Bump required cython version

More rearrangments

Remove mpl from build_versions, rearrange travis

Fix version check

Make matplotlib explicit again

Conda install into test env

Check for proper install

Allow tests to skip if networkx is not available

Allow tests to skip if networkx is not available

Try swapping pillow for matplotlib

Allow tests to pass when matplotlib is not present

Remove matplotlib from build_versions

Print PIL version

Get pillow from PIP

Allow tests to skip if matplotlib is not present.

Allow tests to skip if networkx is not present.

travis fix

Remove unused mpl import that caused test error

Use nose-cov and do not run doctests without optional libs

Bump required numpy version and fix nose calls

Make overlay test repeatable

bump numpy version again

Move low-end numpy to python 2.7

Play with minimum versions

Add version requirements and use functions

Add version requirements and use functions

Allow require to skip a test

More implementation of require decorator

Update require decorator and clean up tests

Only use requires decorator when needed

Fix python3 error in version_requirements

Fix build errors

Fix handling of require with tests

More fixes for require handler

Use latest miniconda

Fix more build errors

Fix another dict comprehension and travis file.

Fix missing imports

Fix dictionary again

Fix import warning

Fix last failing test on 2.6

Skip doc examples on python2.6

Do not run doctests on python2.6

Fix typo in travis.yml

Make numpy-1.6 compatibility changes

Use numpy-1.6 in travis python2.6

Add tests for version requirements

Fix line noise in PR

Add additional io plugins

Fix simpleitk test.

Fix python 3 error in freeimage_plugin.

Install imread in Travis.

Put matplotlib settings in XDG recommended directory

Fix formatting in travis yml

Fix formatting in travis yml

Make sure to close PIL file atexit

Fix name of apt package xcftools

Fix pil fp closing

Fix matplotlibrc creation

Only download SimpleITK on py2x, run coverage on py27

Fix travis yml syntax error

Run coveralls on py2.7

Install SimpleITK on py3.3 and run coverage on py3.3

Make simpleitk install quiet

Use standard nose and clean up incantation

Fix travis yml syntax error

Put in miniconda workout for libc error.

Fix imread plugin.

Fix travis syntax

Remove unused import

Remove miniconda libpng in favor of system png

Fix imread install and move libm removal to after optional pkg install.

Fix png header copy in travis yml

Another attempt to use png headers

Debug freeimage

Add jpeg library for freeimage and debug imread.

More debug for imread and freeimage

More freeimage and imread debugging

More debugging

Use correct paths for test env

Make sure imread is tied to libpng15

Add a TODO note for simpleitk test causing error.

Fix typo in yml

Cleanup and add more comments to travis yml

Update comment

Try and add 3.2 support.

Docstring formatting

Add more travis comments.

Try numpy 1.6 on python 2.7

Fix travis syntax error

Rename CONDA to ENV for clarity

Alias python on python 3.2

Use python 3.2 as the system python

Clean up libfreeimage install

Fix order on py3.2 pre_install

Move old numpy back to py26

Use the appropriate python calls.

Debug 3.2 build.

Update comment

Fix syntax error

Another fix for syntax error.

Install scipy after downloading import tools

More debugging for py32

Do not install conda on py3.2 (duh)

Fix typo in travis yml

Fix py32 qt install, separate pyfits and imread to find error

Fix syntax error and front-load option lib check for debug

pyfits is not supported in py3.2, try imread now

imread is also not supported on py3.2

install imread before pyfits to show relationship with libs

Make pip builds quiet

Minor formatting to retrigger build

Allow simpleitk to fail to download without breaking the build

Use travis_retry for SimpleITK

See what breaks when we keep libm in

Now remove libm again
2014-08-02 06:47:09 -05:00
Juan Nunez-Iglesias 85a5cea533 Merge pull request #1054 from blink1073/add_test_seeds
Add random seeds to tests per #1044

Additionally, change all `np.random.random` to `np.random.rand` calls, as the former are not affected by `np.random.seed`.
2014-07-20 07:48:49 -05:00
blink1073 5677dafe41 Move away from random.random in favor of random.rand 2014-07-19 18:18:23 -05:00
Nelson Brown 6e8ae37f07 Change ndimage test image to fit uint8 range 2014-07-16 20:03:37 -07:00
Nelson Brown eb4725826d Change test of ndimage equivalence to use uint8 test image 2014-07-16 19:57:25 -07:00
Nelson Brown 4449c77884 Fix calls to ndimage to use footprint argument 2014-07-15 08:39:34 -07:00
Nelson Brown 7976520e7a Add test that the 2D results correspond to scipy's
Remove trailing whitespace
2014-07-15 08:25:17 -07:00