Exemplo n.º 1
0
 def it_raises_on_malformed_arrays():
     with zest.raises(AssertionError):
         im = imstack[:, 0, 0]
         imops.dump("name", im)
Exemplo n.º 2
0
 def it_converts_2d_arrays_to_3d():
     im = imstack[:, :, 0]
     assert im.ndim == 2
     imops.dump("name", im)
Exemplo n.º 3
0
 def it_dumps_to_local_path_if_root_not_set():
     imops.dump_set_root_path(None)
     imops.dump("name", imstack)
     assert m_imstack_write.called_once_with(None, "name.npy", imstack)
Exemplo n.º 4
0
 def it_converts_lists_to_array_stacks():
     list_stack = [imstack[:, :, 0], imstack[:, :, 1]]
     imops.dump("name", list_stack)
Exemplo n.º 5
0
 def it_dumps_to_the_root_path_if_set():
     imops.dump_set_root_path("/dir")
     imops.dump("name", imstack)
     assert m_imstack_write.called_once_with("/dir", "name.npy", imstack)