Skip to content

Commit 8883342

Browse files
committed
Adsk Contrib - remove ascontiguarray and just test if test raises error
Signed-off-by: Afsaneh Sheikhmiri <[email protected]>
1 parent f56ef65 commit 8883342

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

tests/python/CPUProcessorTest.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -407,41 +407,6 @@ def test_apply_rgb_buffer_column_major(self):
407407
with self.assertRaises(RuntimeError):
408408
cpu_proc_fwd.applyRGB(arr_copy)
409409

410-
# Convert back to C-order and retry
411-
arr_copy_c = np.ascontiguousarray(arr_copy)
412-
cpu_proc_fwd.applyRGB(arr_copy_c)
413-
414-
# Check forward transform
415-
for i in range(arr_copy_c.size):
416-
if arr.dtype in (np.float32, np.float16):
417-
self.assertAlmostEqual(
418-
arr_copy_c.flat[i],
419-
arr.flat[i] * 0.5,
420-
delta=self.FLOAT_DELTA
421-
)
422-
else:
423-
self.assertAlmostEqual(
424-
arr_copy_c.flat[i],
425-
arr.flat[i] // 2,
426-
delta=self.UINT_DELTA
427-
)
428-
429-
# Inverse transform
430-
cpu_proc_inv.applyRGB(arr_copy_c)
431-
for i in range(arr_copy_c.size):
432-
if arr.dtype in (np.float32, np.float16):
433-
self.assertAlmostEqual(
434-
arr_copy_c.flat[i],
435-
arr.flat[i],
436-
delta=self.FLOAT_DELTA
437-
)
438-
else:
439-
self.assertAlmostEqual(
440-
arr_copy_c.flat[i],
441-
arr.flat[i],
442-
delta=self.UINT_DELTA
443-
)
444-
445410
def test_apply_rgb_buffer(self):
446411
if not np:
447412
logger.warning("NumPy not found. Skipping test!")

0 commit comments

Comments
 (0)