Beispiel #1
0
 def it_raises_on_malformed_arrays():
     with zest.raises(AssertionError):
         im = imstack[:, 0, 0]
         imops.dump("name", im)
Beispiel #2
0
 def it_converts_2d_arrays_to_3d():
     im = imstack[:, :, 0]
     assert im.ndim == 2
     imops.dump("name", im)
Beispiel #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)
Beispiel #4
0
 def it_converts_lists_to_array_stacks():
     list_stack = [imstack[:, :, 0], imstack[:, :, 1]]
     imops.dump("name", list_stack)
Beispiel #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)