# Path: pymorph/mmorph.py
# def intershow(Iab):
#     """
#     s = intershow(Iab)
# 
#     Visualize an interval.
# 
#     `intershow` creates a representation for an interval using `0`, `1`
#     and `.` (don't care).
# 
#     Parameters
#     ----------
#     Iab : Interval
# 
#     Returns
#     -------
#     s : string representation of the interval.
# 
#     Examples
#     --------
#     ::
# 
#         print intershow(homothick())
# 
#     prints out
# 
#     ::
# 
#         0 0 0
#         . 0 .
#         0 0 0
#     """
#     from numpy import array, product, reshape, choose
#     from string import join
# 
#     assert (type(Iab) is tuple) and (len(Iab) == 2),'pymorph.intershow: not proper format of hit-or-miss template'
#     A,B = Iab
#     s = ''
#     for y in xrange(A.shape[0]):
#         for x in xrange(A.shape[1]):
#             if A[y,x]:
#                 s += '1 '
#             elif B[y,x]:
#                 s += '0 '
#             else:
#                 s += '. '
#         s += '\n'
#     return s


from pymorph.mmorph import intershow
import numpy as np
def test_intershow():
    A = np.array([
            [0,1],
            [1,0]])
    B = np.array([
            [1,0],
            [0,0]])
    res = '0 1 \n1 . \n'

# Path: pymorph/mmorph.py
# def intershow(Iab):
#     """
#     s = intershow(Iab)
# 
#     Visualize an interval.
# 
#     `intershow` creates a representation for an interval using `0`, `1`
#     and `.` (don't care).
# 
#     Parameters
#     ----------
#     Iab : Interval
# 
#     Returns
#     -------
#     s : string representation of the interval.
# 
#     Examples
#     --------
#     ::
# 
#         print intershow(homothick())
# 
#     prints out
# 
#     ::
# 
#         0 0 0
#         . 0 .
#         0 0 0
#     """
#     from numpy import array, product, reshape, choose
#     from string import join
# 
#     assert (type(Iab) is tuple) and (len(Iab) == 2),'pymorph.intershow: not proper format of hit-or-miss template'
#     A,B = Iab
#     s = ''
#     for y in xrange(A.shape[0]):
#         for x in xrange(A.shape[1]):
#             if A[y,x]:
#                 s += '1 '
#             elif B[y,x]:
#                 s += '0 '
#             else:
#                 s += '. '
#         s += '\n'
#     return s


# Path: tests/test_intershow.py
from pymorph.mmorph import intershow
import numpy as np

def test_intershow():
    A = np.array([
            [0,1],
            [1,0]])
    B = np.array([
            [1,0],
            [0,0]])
    res = '0 1 \n1 . \n'

    assert intershow((A, B)) == res