Fixed database typo and removed unnecessary class identifier.
This commit is contained in:
parent
00ad49a143
commit
45fb349a7d
5098 changed files with 952558 additions and 85 deletions
35
venv/Lib/site-packages/skimage/io/_image_stack.py
Normal file
35
venv/Lib/site-packages/skimage/io/_image_stack.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
import numpy as np
|
||||
|
||||
|
||||
__all__ = ['image_stack', 'push', 'pop']
|
||||
|
||||
|
||||
# Shared image queue
|
||||
image_stack = []
|
||||
|
||||
|
||||
def push(img):
|
||||
"""Push an image onto the shared image stack.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
img : ndarray
|
||||
Image to push.
|
||||
|
||||
"""
|
||||
if not isinstance(img, np.ndarray):
|
||||
raise ValueError("Can only push ndarrays to the image stack.")
|
||||
|
||||
image_stack.append(img)
|
||||
|
||||
|
||||
def pop():
|
||||
"""Pop an image from the shared image stack.
|
||||
|
||||
Returns
|
||||
-------
|
||||
img : ndarray
|
||||
Image popped from the stack.
|
||||
|
||||
"""
|
||||
return image_stack.pop()
|
Loading…
Add table
Add a link
Reference in a new issue