@@ -423,19 +423,24 @@ def custom_callback(name, progress):
423423image_from_arr = itk .image_from_array (test_arr )
424424image_from_transpose = itk .image_from_array (test_arr .T )
425425image_from_transpose_copy = itk .image_from_array (test_arr .T .copy ())
426- assert np .array_equal (image_from_arr .shape , test_arr .shape ), \
427- f"Expected shape { test_arr .shape } , got { image_from_arr .shape } "
428- assert np .array_equal (image_from_transpose .shape , test_arr .T .shape ), \
429- f"Expected shape { test_arr .T .shape } , got { image_from_transpose .shape } "
430- assert np .array_equal (image_from_transpose_copy .shape , test_arr .T .shape ), \
431- f"Expected shape { test_arr .T .shape } , got { image_from_transpose_copy .shape } "
426+ assert np .array_equal (
427+ image_from_arr .shape , test_arr .shape
428+ ), f"Expected shape { test_arr .shape } , got { image_from_arr .shape } "
429+ assert np .array_equal (
430+ image_from_transpose .shape , test_arr .T .shape
431+ ), f"Expected shape { test_arr .T .shape } , got { image_from_transpose .shape } "
432+ assert np .array_equal (
433+ image_from_transpose_copy .shape , test_arr .T .shape
434+ ), f"Expected shape { test_arr .T .shape } , got { image_from_transpose_copy .shape } "
432435# Also verify with image_view_from_array for consistency
433436image_view_from_arr = itk .image_view_from_array (test_arr )
434437image_view_from_transpose = itk .image_view_from_array (test_arr .T )
435- assert np .array_equal (image_view_from_arr .shape , test_arr .shape ), \
436- f"Expected shape { test_arr .shape } , got { image_view_from_arr .shape } "
437- assert np .array_equal (image_view_from_transpose .shape , test_arr .T .shape ), \
438- f"Expected shape { test_arr .T .shape } , got { image_view_from_transpose .shape } "
438+ assert np .array_equal (
439+ image_view_from_arr .shape , test_arr .shape
440+ ), f"Expected shape { test_arr .shape } , got { image_view_from_arr .shape } "
441+ assert np .array_equal (
442+ image_view_from_transpose .shape , test_arr .T .shape
443+ ), f"Expected shape { test_arr .T .shape } , got { image_view_from_transpose .shape } "
439444image = itk .image_from_array (arr , is_vector = True )
440445assert image .GetImageDimension () == 2
441446image = itk .GetImageViewFromArray (arr , is_vector = True )
0 commit comments