mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-13 17:45:20 +08:00
cpu_count may raise NotImplementedError
This commit is contained in:
@@ -80,7 +80,10 @@ def apply_chunks(function, array, chunks=None, depth=0, mode=None,
|
||||
"""
|
||||
if chunks is None:
|
||||
shape = array.shape
|
||||
ncpu = cpu_count()
|
||||
try:
|
||||
ncpu = cpu_count()
|
||||
except NotImplementedError:
|
||||
ncpu = 4
|
||||
chunks = _get_chunks(shape, ncpu)
|
||||
|
||||
if mode == 'wrap':
|
||||
|
||||
Reference in New Issue
Block a user