def test_message(): """Test converting value and coords to message.""" np.random.seed(0) data = np.random.random((10, 15)) layer = Image(data) msg = layer.get_status((0, ) * 2) assert type(msg) == str
def test_message(): """Test converting value and coords to message.""" shapes = [(40, 20), (20, 10), (10, 5)] np.random.seed(0) data = [np.random.random(s) for s in shapes] layer = Image(data, multiscale=True) msg = layer.get_status((0, ) * 2) assert type(msg) == str
def test_message(): """Test converting value and coords to message.""" np.random.seed(0) data = np.random.random((10, 15, 20)) layer = Image(data) layer._slice_dims(ndisplay=3) msg = layer.get_status(layer.position) assert type(msg) == str
def test_message_3d(): """Test converting values and coords to message in 3D.""" np.random.seed(0) data = np.random.random((10, 15, 15)) layer = Image(data) layer._ndisplay = 3 msg = layer.get_status((0, 0, 0), view_direction=[1, 0, 0], dims_displayed=[0, 1, 2]) assert type(msg) == str